Database: Consistency Across Services
An order spans multiple services — payments, inventory, notifications. Explain how you keep them consistent without a distributed transaction.
Technical Reference & Key Concepts
The Challenge: Multi-Service Consistency
Order placement calls the Payments service, deducts inventory, and triggers notifications. Each service owns its own database. A network failure mid-flow leaves inconsistent state.
Core questions to address:
- Why can't you use a classic distributed transaction across services?
- What pattern keeps the services consistent, and what is the failure handling?
- What is the eventual-consistency window, and how do users experience it?