The bulkhead architecture is used to build fault tolerance, its a common application design that is tolerant of failure. In this architecture, elements of an application are isolated into pools so that if one fails, the others will continue to function. Use this pattern to:
- Isolate resources used to consume a set of backend services, if your application can provide some level of functionality even when one of the services is not responding.
- Isolate critical consumers from standard consumers.
- Protect the application from cascading failures.
Typically in cloud-based applications, each service may have one or more consumers. Excessive load or failure in service will impact all consumers of the service. If we limit the max number of threads that can be used for an endpoint, we will always have some resources to process and this will avoid saturation of all endpoints. To implement the bulkhead pattern, we need to make sure that all our services work independently of each other and failure in one will not create a failure in another service. Techniques such as maintaining a single-responsibility pattern, an asynchronous-communication pattern, or fail-fast and failure-handling patterns help us to achieve.
No comments:
Post a Comment