Bulkhead, Rate Limiting, Fallback Mechanism and Fault Isolation
Learn Bulkhead, Rate Limiting, Fallback Mechanism and Fault Isolation (Phase 6 · Resilience and Fault Tolerance (Essential), Microservices) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.
Bulkhead pattern • Like ship bulkheads, a bulkhead isolates resources so one failing part cannot sink the rest. Without it, a slow dependency consumes all threads/connections of the service and every endpoint, including unrelated ones, hangs. • Types: semaphore bulkhead (limit concurrent calls: maxConcurrentCalls , maxWaitDuration ), thread-pool bulkhead (separate pool and queue per dependency), connection-pool partitioning (separate HTTP/DB pools per dependency), deployment bulkheads (separate service instances/queues for critical vs non-critical traffic), cell-based architecture. • With Java...