_CORE
AI & Agentic Systems Core Information Systems Cloud & Platform Engineering Data Platform & Integration Security & Compliance QA, Testing & Observability IoT, Automation & Robotics Mobile & Digital Banking & Finance Insurance Public Administration Defense & Security Healthcare Energy & Utilities Telco & Media Manufacturing Logistics & E-commerce Retail & Loyalty
References Technologies Blog Know-how Tools
About Collaboration Careers
CS EN
Let's talk

Bulkhead Pattern — izolace selhání

27. 11. 2025 1 min read intermediate

Architecture Intermediate

Bulkhead Pattern — izolace selhání

BulkheadResilienceIsolation 3 min read

Izolace zdrojů pro prevenci kaskádového selhání. Thread pools, connection pools.

Principle

Jako vodotěsné přepážky v lodi — pokud jeden oddíl zaplaví, ostatní zůstanou suché. Každá závislost má vlastní pool zdrojů.

Implementation

class BulkheadedService {
    orderPool = new ConnectionPool({ maxSize: 20 });
    paymentPool = new ConnectionPool({ maxSize: 10 });

    async getOrder(id) {
        return this.orderPool.execute(() =>
            fetch('http://order-service/orders/' + id)
        );
    }
    async processPayment(data) {
        // Pomalý payment nevyčerpá pool orders
        return this.paymentPool.execute(() =>
            fetch('http://payment-service/pay', { method: 'POST', body: JSON.stringify(data) })
        );
    }
}

Types

  • Thread Pool Isolation — vlastní thread pool per závislost
  • Semaphore Isolation — omezení souběžných requestů
  • Process Isolation — kontejnery s resource limits

Summary

Bulkhead izoluje selhání závislostí. Kombinujte s Circuit Breaker pro maximální odolnost.

Need Help with Implementation?

Our team has experience designing and implementing modern architectures. We’re happy to help.

Free Consultation

Share:

CORE SYSTEMS tým

Stavíme core systémy a AI agenty, které drží provoz. 15 let zkušeností s enterprise IT.