As we know that without transactions there won’t be a use of any real-time application. The transaction could be anything like fund transfer, email sending, placing the order, bill payment etc. In a simpler words transaction is a unit of work which will be performed in any business application which
Monolithic vs Microservices
Monolithic applications primarily stick to ACID properties while dealing with transactions. The Biggest advantage for Monolithic application in transaction management is a single and common database server. Transactions can be initiated at the database level and can be committed or rolled back based on the final outcome of the transaction. This way of initiating a transaction, performing operations and persisting or non-persistence of data is much easier to develop. However, this advantage becomes a serious challenge while running high volume production application. A simple lock on a critical table can lead to disastrous results like non-availability of the entire application.
Microservices guidelines strongly recommend you to use the Single Repository Principle(SRP), which means each microservice maintains its own database and no other service should access the other service’s database directly. There is no direct and simple way of maintaining ACID principles across multiple databases. This is the way the real challenge lies for transaction management in Microservices.












