Opening Scenario
Your payment API is called by five different client apps. One morning, your database runs slowly for 90 seconds during a routine maintenance window. You expect a brief degradation. Instead, the order service retries every failed request three times, tripling the load on an already-struggling database. Simultaneously, the mobile app holds connections open waiting for responses, and the frontend's connection pool fills up. When the database recovers, the backlog of retried requests overwhelms it again. The 90-second degradation becomes a 20-minute outage.
Nobody's code had a bug. The patterns used to call your API caused the incident.
Question Progression
1. How do you stop a slow dependency from blocking all your resources?
Question: Your service calls an upstream API. That API is slow today — responding in 30 seconds instead of 200ms. Your service has 50 worker threads. How many requests before your service is completely unable to respond to anything?
In the full tutorial
- When to Reach for This