Progettare un sistema su larga scala comporta combinare molti concetti — gestire scale massicce, scegliere architetture appropriate, database, caching e gestire i trade-off. L'uso di un esempio concreto (un feed di notizie su social media) illustra come i pezzi si incastrano insieme.
Esempio: un feed di notizie su social media
Requirements: millions of users; post content; see a feed of followed users' posts;
read-HEAVY (far more feed views than posts); low latency; high availability.
High-level components:
→ CLIENTS → LOAD BALANCER → APPLICATION servers (stateless, horizontally scaled)
→ DATABASES → user/post data (sharded); a graph of follows
→ CACHING (Redis) → hot feeds, posts, user data (crucial for read-heavy load)
→ CDN → media (images/videos)
→ MESSAGE QUEUES → async work (fan-out, notifications)
