Chapter 2. Timeouts

In Chapter 1, I introduced the two golden rules of computing, namely:

  1. You cannot beam information instantaneously between two points

  2. Sometimes you can’t reach the thing you want to talk to

In this chapter, I’m going to address these points head on, looking at things 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 how timeouts can help. Along the way I’ll be sharing a real-world example of a system outage that I was involved with, and the role that timeouts played.

Get Building Resilient Distributed Systems now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.