Stateful vs Stateless Design Explained
Where does a server keep what it knows about a client between one request and the next? The answer to that one question decides how easily the whole system scales.
Where does a server keep what it knows about a client between one request and the next? The answer to that one question decides how easily the whole system scales.
Every write to a replicated system eventually has to answer one question: does the caller wait for every copy to agree before we call it done, or do we acknowledge fast and let the copies catch up on their own time?
Long polling vs. WebSockets, push vs. pull, message queues vs. direct calls — nearly every specific communication tradeoff in system design is really this one underlying decision, applied to a particular piece of a system.
TCP and UDP are both ways to send bytes across a network, but "TCP is reliable, UDP isn't" undersells the actual tradeoff — UDP isn't a worse TCP, it's a deliberate bet that a late packet is worse than a lost one.
Most caching is about skipping work — a database query, a computation. A CDN caches something different: distance itself, the physical time it takes a signal to travel across the planet.