Data Consistency/

Distributed Transactions

Lesson overview

Distributed Transactions

Distributed transactions: challenges and solutions.

A distributed transaction is a transaction that involves multiple services or databases.

Distributed Transactions

Payment Service

Order Service

Inventory Service

create order

Deduct inventory

Process payment

if payment failed then: revert inventory action revert order action So we need mechanisms to ensure all steps succeed or the system recovers.

Loading Distributed Transactions