Practice this topic in a realistic system design interview
A distributed system often fails because too many things share the same limited resources. One slow dependency can use up every request thread. One heavy workload can drain the whole connection pool. The original problem is small, but because everything shares the same capacity, the whole service suffers.
The Bulkhead pattern prevents that. It divides resources into isolated pools so that a problem in one area cannot consume everything the system has available.
This chapter covers what the Bulkhead pattern is, how it prevents a failure in one part of a system from taking down everything else, the different ways to apply it, and the trade-offs that come with dividing resources into isolated pools.
Suppose we have a product service in an e-commerce application. To build a product page, it calls three other services: inventory to check stock, pricing to get the current price, and reviews to load customer feedback.
The product service handles requests using a shared pool of 200 threads. Any request can use any thread.
Most of the time, this works fine. But imagine the review service suddenly becomes slow. Calls that normally take 50 milliseconds now take 10 seconds.
Reviews are not critical, but a slow review service has made the entire product service unavailable.
The slow review service is only part of the incident. The bigger problem is that every dependency shares the same pool of resources, so a non-critical feature was allowed to use capacity that everything else needs.
This is the problem the Bulkhead pattern solves.