Micro Services
Micro Services
Challenges of MicroService
The MicroService architecture helps a lot, but comes with its own challenges.
• Inter Service Communication – MicroServices will rely on each other and they will have to
communicate. A common communication channel needs to be framed using HTTP/ESB etc.
• Health Monitoring – There are more services to monitor which may be developed using
different programming languages.
• Distributed logging – Different services will have its own logging mechanism, resulting GBs of
distributed unstructured data.
• Transaction Spanning – MicroServices may result in spanning of transactions over multiple
services & database. An issues caused somewhere will result is some other issues somewhere
else.
• Finding root cause – Distributed logic with distributed data increases the effort of finding the
root cause. The performance related root cause can still be managed using APM tools like New
Relic & Dynatrace.
• Cyclic dependencies between services – Reproducing a problem will prove to be very difficult
when it’s gone in one version, and comes back with a newer one.
2. Advantages of MicroServices
• Evolutionary Design – No need to rewrite your whole application. Add new features as
MicroServices, and plug them into your existing application
• Small Codebase – Each MicroService deals with one concern(SoC) only – this result in a small
codebase, which means easier maintainability
• Auto Scale – freedom to scale only the loaded service, as that service will handle the bigger
load.
• Easy to Deploy – Deploy only the needed codebase, instead of redeploying the entire
application.
• System Resilience – If some of the services go down only some features will be affected, not
the entire application.
Each service implements a Compensation endpoint for a transaction and the coordinator calls it.
Other option is a choreography pattern where services themselves undo the previous
transactions