From the course: Microservices and API Security for Security Architects: From Gateway Protection to Container Security
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
Circuit breaker
- [Instructor] Circuit breakers are essential resilience patterns that prevent cascading failures in microservice architectures. Envoy Gateway provides a robust circuit breaking capability at the network layer, protecting your backend services from overload when they're struggling to handle requests. Circuit breakers work by monitoring the health of services and automatically, quote unquote, opening the circuit when failure thresholds are exceeded, preventing additional requests from reaching an already struggling service. This gives the service time to recover before traffic is gradually restored. Let's look at how circuit breaking is implemented in Envoy gateways, using Kubernetes custom resources. This policy implements two key circuit breaking mechanisms. First, the outlier detection component monitors for service health and will eject backend instances from the load balancing pool when they return five or more…