

With the advent of microservices architecture, there are two key problems with respect to distributed transaction management: Since the overall transaction boundary crosses multiple services and databases, it is considered to be a distributed transaction. If any of the steps fails, all of the completed preceding steps must roll back. To successfully complete the flight booking process for a traveler, all three steps must be completed. There would be one microservice to block a seat, another to accept payments, and finally, another microservice to allocate the blocked seat, each implementing a local transaction. ScenarioĬonsider a simple airline flight booking scenario implemented using a microservices architecture. In this case, the application must use an elaborate mechanism to manage transactions. The challenge, however, lies in handling a transaction that spans across multiple services, and in some cases needs a long period of time to finish. In a microservices architecture, transactions that are within a single service use ACID transactions to provide data consistency. A transaction is distributed to multiple services that are called sequentially or in parallel to complete the entire transaction. A microservice, in its true context, is a distributed system.
