xxxxxxxxxx
The Bulkhead pattern is a type of application design that is tolerant of failure.
In a bulkhead architecture, elements of an application are isolated into pools so that if one fails, the others will continue to function. It's named after the sectioned partitions (bulkheads) of a ship's hull.
The Bulkhead pattern is a type of application design that is tolerant of failure.
In a bulkhead architecture, elements of an application are isolated into pools so that if one fails, the others will continue to function.
It's named after the sectioned partitions (bulkheads) of a ship's hull.
If the hull of a ship is compromised, only the damaged section fills with water, which prevents the ship from sinking.
xxxxxxxxxx
apiVersion: v1
kind: Pod
metadata:
name: drone-management
spec:
containers:
- name: drone-management-container
image: drone-service
resources:
requests:
memory: "64Mi"
cpu: "250m"
limits:
memory: "128Mi"
cpu: "1"
https://learn.microsoft.com/en-us/azure/architecture/patterns/bulkhead
Bulkhead pattern is used to isolate failures in a distributed
system.
▪ Based on the concept of a "bulkhead" in a ship, structural
partition that helps to prevent the entire ship from flooding if
one compartment is damaged.
▪ In microservices, isolate individual service instances or
groups of service instances from each other, to prevent failures
in one part of the system from affecting the entire system.
▪ One location does not affect other services by isolating the
services. The main purpose is isolated error place and secure
the rest of services.
▪ Naval architecture; ships or submarines are made not as a
whole, but by shielding from certain areas, if there is happens a
flood or fire, the relevant compartment is closed and isolated.
▪ Microservices able to respond to user requests by isolating the
relevant service so the erro
xxxxxxxxxx
@Service
public class RatingServiceClient {
private final RestTemplate restTemplate = new RestTemplate();
@Value("${rating.service.endpoint}")
private String ratingService;
@Bulkhead(name = "ratingService", fallbackMethod = "getDefault")
public ProductRatingDto getProductRatingDto(int productId){
return this.restTemplate.getForEntity(this.ratingService + productId, ProductRatingDto.class)
.getBody();
}
public ProductRatingDto getDefault(int productId, Throwable throwable){
return ProductRatingDto.of(0, Collections.emptyList());
}
}
https://learn.microsoft.com/en-us/azure/architecture/patterns/bulkhead