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

Joined February 2018
1,779 Photos and videos
Pinned Tweet
Backend Interview Question: Which API design scales better? What's your choice?
192
54
1,825
513,167
Ritesh Roushan retweeted
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.
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 πŸ‘‡
22
3
29
341
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.
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 πŸ‘‡
22
3
29
341
Ritesh Roushan retweeted
System Design Question: You're designing Uber. A ride is completed. You need to update: β€’ Billing β€’ Driver Earnings β€’ Notifications β€’ Analytics What's your first choice? A) REST B) Message Queue Explain your reasoning πŸ‘‡
57
3
73
1,355
Ritesh Roushan retweeted
Builders & Developers πŸ‘‡ What are you building right now? Drop your product link one line about what it does. I’ll check it out and give you honest feedback. The community can too. No sugarcoating, Real opinions only. Let’s help each other improve. Share below πŸ”₯
47
1
49
1,497
Ritesh Roushan retweeted
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 πŸ‘‡
45
9
117
55,555
Backend Interview Question: Which API design scales better? What's your choice?
192
54
1,825
513,167

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 πŸ‘‡
5
42,852
Who's gonna first achieved AGI?
91
4
143
105,885

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 πŸ‘‡
2
1,516
Ritesh Roushan retweeted
Who's gonna first achieved AGI?
91
4
143
105,885

System Design Series - Finale πŸŽ‰ First, a big thank you. 4 months ago, Started sharing Tech content from my learning and work experience. In mid March, I started this series with just over 1000 followers. Today, as we close Week 10, we’ve crossed 4,700 followers πŸš€ What started as a simple idea, sharing one System Design topic every day turned into something much bigger. 10 weeks. 10 topics. 40 posts. One complete Backend System Design series Production Ready. Here’s everything we covered the foundation every backend engineer needs: Week 1: APIs & Databases β€” REST, SQL vs NoSQL, indexes, pagination Week 2: Caching β€” Redis, cache invalidation, CDN, multi-layer caching Week 3: Message Queues β€” RabbitMQ, async processing, retry patterns Week 4: Load Balancing β€” Algorithms, horizontal scaling, stateless design Week 5: Microservices β€” Monolith vs microservices vs modular monolith Week 6: Database Scaling β€” Read replicas, replication lag, failover with Patroni Week 7: API Gateway & Rate Limiting β€” DDoS protection, circuit breakers, strategies Week 8: Monitoring & Observability β€” Metrics, logs, traces, alerting Week 9: Security β€” OWASP, authentication, encryption, common vulnerabilities Week 10: CI/CD & Deployment β€” GitHub Actions, Docker, deployment strategies Every topic has a full deep-dive article on Medium πŸ“ Check the Highlights section on my profile for all Post in one place and Bio Link for medium deep dive articles. Thank you for every reply, bookmark, and follow. 10 weeks. Completed. #SystemDesign #Backend
1
1
30
79,866

Who's gonna first achieved AGI?
1
1
7
81,895
Ritesh Roushan retweeted
Backend Interview Question: Which API design scales better? What's your choice?
192
54
1,825
513,167
Good morning and Happy Saturday β˜€οΈ I've been inconsistent over the last 2–3 weeks. Life happens. But starting today, I'm getting back to what I enjoy most: ➜ Backend Development ➜ System Design ➜ Software Engineering ➜ AI & Building Products Expect more interview questions, real-world engineering lessons, and production insights. Let's make the next few months count. Thanks for being here.
39
1
50
1,142
Your life can change dramatically in a year One skill. One opportunity. One decision. One person. That's why writing yourself off too early is a mistake. A lot can happen in 12 months.
12
1
28
594
Ritesh Roushan retweeted
Wells Fargo SDE-1 interview experience Interview Process (3 Rounds) πŸ“Œ Round 1: Recruiter Screening β€’ Current role & responsibilities β€’ Tech stack discussion β€’ Why switch? β€’ Notice period & availability Focus: Communication, confidence, and how clearly you explain your work. πŸ“Œ Round 2: Java Resume Deep Dive Questions asked: β€’ Explain OOP concepts with real-world examples β€’ Polymorphism vs Inheritance β€’ Encapsulation use cases β€’ Checked vs Unchecked Exceptions β€’ List vs Set vs Map β€’ ArrayList vs LinkedList β€’ How does HashMap work? β€’ Projects mentioned in resume Focus: Fundamentals practical understanding, not textbook definitions. πŸ“Œ Round 3: Advanced Java DSA SQL Java: β€’ Multithreading concepts β€’ Exception handling in production systems β€’ Collections internals β€’ HashMap collision handling DSA: Maximum Subarray Sum β†’ Expected: Kadane's Algorithm SEND MORE = MONEY β†’ Backtracking approach β†’ Constraint handling & logical reasoning SQL: Find employees having the minimum salary in each department. Example: SELECT department_id, employee_id, salary FROM Employees e WHERE salary = ( SELECT MIN(salary) FROM Employees WHERE department_id = e.department_id ); Key takeaway: Wells Fargo seems to focus heavily on: βœ“ Java fundamentals βœ“ DSA patterns βœ“ SQL basics βœ“ Resume projects βœ“ Communication & problem explanation Many candidates spend months grinding hard LeetCode problems, but interviews like this show that strong fundamentals and clear thinking often matter more. (Source: LeetCode Discuss)
31
5
72
2,576