- It solve the following problems
- Non-transient failures
- Resilient systems
- Cascading failures
- Fault tolerance
- Retries and recovery
- It is a cloud design pattern To deal with non-transient failure in micro services.
- A non-transient failure is a permanent failure that can render the system Unavailable or the recovery can take longer than few seconds.
- Examples of non-transient failure are
- Timeout
- Database failure
- Connection failure
- Services bombarded with multiple request and all the request resulting in failure due to memory or CPU issue in application.
- Circuit breaker helps to Avoid cascading failures, where downtime of one service impacts other dependent services.
- We try to stop the calls to the failing service until it recovers.
- The circuit breaker Logic will decide if the request from A will be passed through or rejected or returned with an error.
- There are three states of circuit breaker
- Closed
- When closed all traffic goes as normal.
- Half open
- When half open some traffic Go for testing purposes, if the calling service can call downstream service and check if there are any failure or not.
- Open
- When the circuit breaker is open The calling service will not be able to call downstream service and will return an error message.
- When half open if the service recovers, the circuit goes into close, state, else it goes into open state.
- Default state is closed.
- After failure, the circuit keeps switching between open and half open state to check recovery.
- We can make our circuit pattern more efficient by having a control over type of and count of errors.
- We should also have manual control Over states, for example, if we want to open the circuit breaker, even though services are doing well.
- We should keep a check on timeout for different states.
- We should check for concurrency as one service might be getting called from many other services.
- We should log and monitor different states.
- We do not need This, when we have a few services or scenarios, where load is not heavy.
- Effective way to bring resilience in the systems.
- Should not be used to solve transient failures.
- CQRS Design Pattern
- FAANG/MAANG Engineer
- Low Code Platforms
- Software Testing
- Secure Coding
- IOT
- Microservices
- Web Security
- UML Diagrams
- Fork–join model
- Dependency Injection
- Adapter Pattern
- Join Pattern
- DevOps
- Agile
- Security Awareness
- API gateway pattern
- Serverless Architecture
- Event Driven API paradigms
- Rational Application Development
- COTS
- Rational Software Architecture
- N layer/tier Architecture
- OAuth 2.0
- Scaling Microservices
- SAGA Pattern
- Circuit Breaker Pattern
- Singleton
- Immutable
Circuit Breaker Pattern
Subscribe to:
Posts (Atom)
Recursion
Q What do you understand by a Recursive Programme? Recursion Is the process of repeating items in a self similar way. In programming langua...
-
Inheritanceis tightly coupled. Inheritance is basically used for polymorphism which can be done in other ways to. Generally over a time we d...
-
How can we secure our micro-services? Application security User security Spring access controls Framework security Interaction with downstre...
-
Q What is the difference between wireless sensor networks and IOT networks? Ans : IoT exists at a higher level then WSN. In other words,...
No comments:
Post a Comment