InterviewSolution
| 1. |
How to tackle service failures when there are dependent services? |
|
Answer» In real time, it happens that a particular service is causing a downtime, but the other services are functioning as per mandate. So, under such conditions, the particular service and its dependent services get affected DUE to the downtime. In order to solve this ISSUE, there is a concept in the microservices architecture pattern, called the circuit breaker. Any service calling remote service can call a proxy layer which acts as an electric circuit breaker. If the remote service is slow or down for ‘N’ attempts then proxy layer should fail fast and keep checking the remote service for its availability again. As well as the calling services should handle the errors and provide retry logic. Once the remote service RESUMES then the services starts working again and the circuit becomes complete. This way, all other functionalities WORK as expected. Only one or the dependent services get affected. |
|