Bulkheads
On This Lesson 4 topics
This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.
In this lesson
isolate resource pools per dependency.
Planned topics
- Named after ship compartments: a leak floods one section, not the whole ship.
- Give each dependency its own limit on concurrent calls (semaphore) or its own thread pool.
- A slow
reviewscall can then use at most its share, leaving capacity forpayments. - Excess calls are rejected quickly rather than queued.
- Size limits from expected concurrency, not guesses; revisit with load tests.
Draft outline details
Demonstration
BulkheadConfig cfg = BulkheadConfig.custom()
.maxConcurrentCalls(20).maxWaitDuration(Duration.ZERO).build();Check your understanding
What does a bulkhead protect?
Show answer
Other dependencies and endpoints from one slow dependency using all shared capacity.
Practice
Apply this lesson with the module's lab, exercises and quiz.
Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.