Resiliency Patterns - A Interview Question
This is one of the most tricky interview question asked. What if the system doesn’t work as expected. What if one microservices doesn’t return the response as expected. How are we gonna handle those scenarios. Answer lies with these resiliency patterns.
Let’s dive in. This is one of the most important concepts in System Design is Resiliency Patterns
"Fall seven times, stand up eight."
A brief intro.
[1.] Circuit Breaker
◾ Acts like an electrical circuit breaker.
◾ When a service experiences repeated failures, the circuit breaker 'trips' and stops sending requests to that service for a period of time.
◾ This allows the failing service to recover without being overwhelmed.
The main circuit breaker states -
◾ Closed - Requests are allowed to pass through.
◾ Open - Requests are immediately rejected with an error.
◾ Circuit breakers are effective for protecting against cascading failures and isolating problematic services.