Distributed Transactions

Checkout lesson on UDEMY Section preview

In Microservices architecture the data is distributed across multiple databases that are owned & operated by different teams. Failures in microservice owned database can lead to data inconsistencies. In the illustration:

failed-shipment

  1. Customer successfully added the order
  2. Events were emitted and processed
  3. Shipping microservice failed to update the database. Customer will NOT receive the order they paid for !!!

Local transactions cannot help. Two-phase commit is complex and would require support from underlying database platform(s)