Position them between the client and the API gateway, and between the gateway and internal microservices. Databases: SQL vs. NoSQL Choosing the wrong database can break your system.
For regular users, use fan-out on write (push model). When a user tweets, inject that tweet directly into the pre-computed home timeline caches of all their followers. For celebrity users with millions of followers, switch to fan-out on read (pull model). Blend both approaches dynamically to save memory and compute power. How to Design Uber (Geospatial Architecture)
: Exploration of microservices vs. monoliths, orchestration vs. choreography, and achieving loose coupling with high cohesion. Database & Distributed Principles
“If you’re reading this, you’ve already done the work. The interview isn’t a test of your system. It’s a test of your story. Tell them a good one. – S.B.”
The search for "Hacking The System Design Interview PDF" is ultimately a search for confidence. But a PDF is a map, not the terrain. You cannot learn to swim by reading a book about water.
What features are we building? For a service like Twitter, this might be: posting a tweet, following users, and viewing a timeline.