Requirements & Trade-Offs Matrix
A complete system design requires establishing functional requirements (what the system does), non-functional requirements (p99 latency < 50ms, 99.999% availability, idempotent transactions), high-level component topologies, and deep-dive failure mode analyses.
Fan-Out On Write vs Fan-Out On Read (News Feed)
Fan-out on write (Push model): When a user posts, append the post id directly to all followers' pre-computed timeline caches (fast reads, expensive writes for celebrities). Fan-out on read (Pull model): Aggregate followers' posts at read time (fast writes, slow reads). Hybrid models push for standard users and pull for celebrities.
Production Readiness Checklist
Before deploying a distributed architecture: ensure idempotent APIs with unique idempotency keys, configure health checks and connection pools, establish distributed tracing with OpenTelemetry, define SLOs with error budgets, and rehearse disaster recovery failovers.