Ship's bulkheads: compartments so one flood doesn't sink the boat. Software bulkheads: thread pools per dependency so one slow service doesn't starve others.
The problem
Shared thread pool. Slow service A hangs. All 500 threads waiting on A. Fast service B starved even though it's healthy.
The problem
Shared thread pool. Slow service A hangs. All 500 threads waiting on A. Fast service B starved even though it's healthy.
The fix
Pool per dependency. Service A's slowness only exhausts A's pool. B has its own threads.
Sizing pools
Baseline load × safety factor. Not so many that concurrent slowdowns kill the app. Not so few that spikes queue.
Semaphore vs thread pool
Thread pool: fully isolated + heavy. Semaphore: cheaper + shares main thread pool but limits concurrency per dependency.
Metrics per pool
Emit active + queued + rejected per pool. Alert on rejections + high queue depth.