Health check

In the microservices world, instances can start, change, update, and stop at random. They can also scale up and down based on their traffic and other settings. This requires a health check service that will constantly monitor the availability of the services.

Services can send their status periodically to this health check service, and this keeps a track of the health of the services. When a service goes down, the health check service will stop getting the heartbeat from the service. Then, the health check service will mark the service down and cascade the information to the service registry. Similarly, when the service resumes, the heartbeat is sent to the health check service. Upon receiving a few positive heartbeats, the service is marked UP and then the information is sent to the service registry.

The health check service can check for health in two ways:

  • Push configuration: All the services will send their heartbeat periodically to the health check service.
  • Pull configuration: A single health check service instance will query for the availability of the systems periodically.

This also requires a high availability system. All the services should connect to this service to share their heartbeat and this has to connect to the service registry to tell them whether a service is available. This normally is part of the service discovery system.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.222.115.120