1.

What should one do so that troubleshooting becomes easier in microservice based architecture?

Answer»

This is a very interesting question. In monolith where HTTP Request waits for a response, the PROCESSING happens in memory and it makes sure that the transaction from all such modules work at its best and ensures that everything is done according to expectation. But it becomes challenging in the case of microservices because all services are running independently, their datastores can be independent, REST Apis can be deployed on different endpoints. Each service is doing a  bit without knowing the context of other microservices.

In this case, we can use the following measures to MAKE sure we are able to trace the errors easily.

  1. Services should log and aggregators push logs to centralized logging servers. For example, use ELK Stack to analyze.
  2. Unique value per client request(correlation-id) which should be logged in all the microservices so that errors can be traced on a central logging server.
  3. One should have good MONITORING in place for each and EVERY microservice in the ecosystem, which can record application metrics and health checks of the services, TRAFFIC pattern and service failures.


Discussion

No Comment Found