Node.js · Senior · Question 42 of 75
How do you keep a slow dependency from taking down the whole service (bulkhead pattern)?
- 1Run all dependencies through one shared connection
- 2Increase timeouts for every call
- ✓Correct answer: Limit concurrent calls per dependency (separate pools or semaphores) so one slow dependency can't use up all resources
Explanation
Like compartments in a ship, isolated limits contain failures. Combine with timeouts and circuit breakers.