Chapter 3. Timeouts
In Chapter 1, I introduced the three rules of distributed systems:
-
You cannot beam information instantaneously between two points.
-
Sometimes you can’t reach the thing you want to talk to.
-
Resource pools are not infinite.
In this chapter, I’m going to address these points head-on, primarily from the viewpoint of clients talking to remote services. Specifically, I’m going to look at what happens when a server takes too long to respond, and at how timeouts can help. Along the way I’ll share a real-world example of a system outage that I was involved with and talk about the role that timeouts played.
The Problem with Time
When one computer attempts to talk to another and that other computer just doesn’t respond, how you deal with the situation is somewhat straightforward: ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access