Fault tolerance and failover

In a microservices architecture, there might be many reasons for a fault. It is important to handle faults or failovers gracefully, as follows:

  • When the request takes a long time to complete, have a predetermined timeout instead of waiting for the service to respond.
  • When the request fails, identify the server, notify the service registry, and stop connecting to the server. This way, we can prevent other requests from going to that server.
  • Shut down the service when it is not responding and start a new service to make sure services are working as expected.

This can be achieved using the following:

  • Fault tolerance libraries, which prevent cascading failures by isolating the remote instance and services that ...

Get Full Stack Development with JHipster - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.