Ritesh Roushan

21.3K posts

Ritesh Roushan banner
Ritesh Roushan

Ritesh Roushan

@devXritesh

Software Engineer at Startup • System Design • Microservices • AI Infrastructure | Creating real-world content for devs

✉️ DM for Collab & Work เข้าร่วม Şubat 2018
894 กำลังติดตาม5.3K ผู้ติดตาม
ทวีตที่ปักหมุด
Ritesh Roushan
Ritesh Roushan@devXritesh·
Backend Interview Question: Which API design scales better? What's your choice?
Ritesh Roushan tweet media
English
193
54
1.8K
513.5K
Reethu
Reethu@ritu_twts·
every software developer's happiness started from this moment right ??😭
Reethu tweet media
English
12
0
10
60
Alfin
Alfin@AlfinCodes·
What's the hardest part of programming? - algorithms - system design - debugging - understanding someone else's code
English
15
0
16
109
ayesha
ayesha@ayesha_fatiima·
Send OTP → nothing happens. Click Resend OTP → suddenly both OTPs show up together. What's the real bottleneck here?
English
16
1
18
147
Ritesh Roushan
Ritesh Roushan@devXritesh·
@droidbuilds Build your self first, keep surround yourself who's talking about self development, finance, businesses etc. Everyone is distracted, so focus on yourself
English
0
0
0
10
DROID
DROID@droidbuilds·
I'm currently 21. Give me one piece of advice you'd wish you knew at my age. Could be about anything
English
27
0
31
244
Sourabh Gurwani
Sourabh Gurwani@SourabhGurwani·
I saw a man... He wasn't using AI. He was making AIs compete. Claude in one tab. ChatGPT in another. Gemini and DeepSeek waiting for their turn. Same prompt. Same question. Different answers. Bro turned a simple question into an AI Olympics. That man is me 👀😭
English
13
1
13
201
Dharmvir
Dharmvir@dharmvir_·
8 KILLER CODING WEBSITES THAT I USE REGULARLY: 1. REGEX101.COM Test, debug, and understand regex like a pro. 2. OVERAPI.COM The ultimate cheat sheet collection for everything: JS, Python, Git, Linux, Regex... 3. CARBON.NOW.SH Turn your code into beautiful images for social media or portfolios. 4. ROADMAP.SH All the developer roadmaps you need - from frontend to DevOps. 5. DEVDOCS.IO Offline-first, super-fast API documentation (React, JS, Python, etc.). 6. REPLIT.COM Code & deploy multi-language apps in the browser - even backend APIs. 7. SOURCEGRAPH.COM Search across real-world open source codebases - like you own GitHub. 8. HTMX.ORG Add dynamic behavior to HTML - no JS required. Bookmark it. Repost it You will never see this account unless you follow me right now
Dharmvir tweet media
English
9
0
10
32
Aditya
Aditya@Aditya_181105·
be honest, As a developer Is there any replacement better than Claude for coding ??
Aditya tweet media
English
22
0
25
197
Tanuj
Tanuj@tanujDE3180·
A. GET /posts?page=10000 B. GET /posts?cursor=eyJpZCI6... One of these works fine at 1 million rows. The other still works at 1 billion rows. Which one are you choosing for scale ?
Tanuj tweet media
English
14
2
21
483
Samay
Samay@Samaytwt·
Vibe coders, what’s your backup plan if Ai writes better code than you in the next 1–2 years?
Samay tweet media
English
44
0
43
328
Ritesh Roushan
Ritesh Roushan@devXritesh·
Most people answer: A) Database That's usually wrong. The first thing that fails is often the cache. Here's why 👇 1. Celebrity posts a tweet 50M followers. Millions immediately refresh. Everyone requests the same tweet. 2. Cache Miss Storm If the tweet isn't cached yet: Millions of requests hit Redis simultaneously. This is called a cache stampede. Suddenly: • Redis CPU spikes • Network saturation increases • Database gets hammered 3. Database Becomes the Next Victim After cache misses: - Millions of requests fall back to the database. - Now the database becomes overloaded. - Not because it's slow. Because the cache stopped protecting it. 4. How X/Twitter Handles This Request Flow: User ↓ CDN ↓ Load Balancer ↓ API Gateway ↓ Redis Cache ↓ Database Most reads never reach the database. 5. Celebrity Problem Normal users: - Fan-out on Write - Tweet gets pushed to follower timelines. - Fast reads. Celebrity users: - Fan-out on Read - Store the tweet once. - Generate timelines dynamically. Otherwise you'd write tens of millions of timeline entries. 6. Protection Layers • Redis caching • CDN edge caching • Request coalescing • Rate limiting • Read replicas • Queue-based timeline generation Production lesson: The database isn't usually the first thing that fails. The system fails when too many requests bypass the cache. Protect the cache. The cache protects everything else.
Ritesh Roushan tweet media
Ritesh Roushan@devXritesh

System Design Interview Question: A celebrity with 50M followers posts a tweet. Within seconds: • Millions open the app • Millions refresh feeds • Millions request the same content What fails first? A) Database B) Cache C) API Servers D) Message Queue And how would you prevent it? Explain your architecture 👇

English
23
3
31
383
Mr Ash
Mr Ash@ash_twtz·
iPhone Models and Their Release Year • 🍏 iPhone - 2007 • 🌐 iPhone 3G - 2008 • 🚀 iPhone 3GS - 2009 • 💎 iPhone 4 - 2010 • ⭐ iPhone 4S - 2011 • 🎵 iPhone 5 - 2012 • 🌈 iPhone 5c - 2013 • 👑 iPhone 5s - 2013 • 📘 iPhone 6 - 2014 • ➕ iPhone 6 Plus - 2014 • ✨ iPhone 6s - 2015 • 🏆 iPhone 6s Plus - 2015 • 🎯 iPhone SE - 2016 • 🎧 iPhone 7 - 2016 • 📷 iPhone 7 Plus - 2016 • 🔋 iPhone 8 - 2017 • ⚡ iPhone 8 Plus - 2017 • 🔟 iPhone X - 2017 • 🌈 iPhone XR - 2018 • 💫 iPhone XS - 2018 • 🦅 iPhone XS Max - 2018 • 📸 iPhone 11 - 2019 • 🎬 iPhone 11 Pro - 2019 • 🚁 iPhone 11 Pro Max - 2019 • 🎯 iPhone SE (2nd generation) - 2020 • 🤏 iPhone 12 mini - 2020 • 🧲 iPhone 12 - 2020 • 💠 iPhone 12 Pro - 2020 • 🏅 iPhone 12 Pro Max - 2020 • 🪶 iPhone 13 mini - 2021 • 🎥 iPhone 13 - 2021 • 💎 iPhone 13 Pro - 2021 • 🚀 iPhone 13 Pro Max - 2021 • 🎯 iPhone SE (3rd generation) - 2022 • 🟣 iPhone 14 - 2022 • 🌟 iPhone 14 Plus - 2022 • ✨ iPhone 14 Pro - 2022 • 👑 iPhone 14 Pro Max - 2022 • 🔌 iPhone 15 - 2023 • 🌊 iPhone 15 Plus - 2023 • 🛸 iPhone 15 Pro - 2023 • 🏔️ iPhone 15 Pro Max - 2023 • 🤖 iPhone 16 - 2024 • 🌌 iPhone 16 Plus - 2024 • 🔥 iPhone 16 Pro - 2024 • 🐉 iPhone 16 Pro Max - 2024 • 💎 iPhone 16e - 2025 • 🪶 iPhone Air - 2025 • 🎉 iPhone 17 - 2025 • 🌠 iPhone 17 Pro - 2025 • 🏰 iPhone 17 Pro Max - 2025 • 🆕 iPhone 17e - 2026 Which iPhone is your favorite?
English
41
0
52
1.9K
Kunal
Kunal@kunal_twts·
@devXritesh The first hit point is the cache
English
1
0
1
40
Neeraj
Neeraj@neerajjj6785·
Neeraj tweet media
ZXX
31
1
36
724
Kunal
Kunal@kunal_twts·
How many can do a POST request ?🙂
Kunal tweet media
English
10
0
11
185
Ray🫧
Ray🫧@ravikiran_dev7·
Hey @grok remove the most evil and controversial entrepreneur from this image!
Ray🫧 tweet media
English
27
1
25
429
Edgex
Edgex@SahilExec·
@devXritesh So the cache is the real hero here, protecting the database from a stampede of requests
English
1
0
1
52
Edgex
Edgex@SahilExec·
A junior dev validates emails like this: Works perfectly for valid emails. What's the hidden vulnerability and how does an attacker use it to take down your server?
Edgex tweet media
English
9
1
13
388