1.

What would be your logging strategy in a microservice architecture?

Answer»

Logging is a very important aspect of any application. If we have done proper logging in an application, it becomes easy to support other aspects of the application as WELL. Like in order to debug the ISSUES / in order to understand what business logic might have been executed, it becomes very critical to log important details.

Ideally, you should follow the following PRACTICES for logging.

  • In a microservice architecture, each request should have a unique VALUE (correlationid) and this value should be passed to each and every microservice so the correlationid can be logged across the services. Thus the requests can be traced.
  • Logs generated by all the services should be aggregated in a single location so that while searching becomes easier. Generally, PEOPLE use ELK stack for the same. So that it becomes easy for support persons to debug the issue.


Discussion

No Comment Found