AZ-305 · Question 44 · Domain 4.2: Application Architecture
You are designing a distributed microservices application.
A business transaction spans three microservices: Order, Payment, and Inventory. Each microservice has its own dedicated database. If the Order and Payment steps succeed, but the Inventory step fails (e.g., item out of stock), the system must undo the Order and Payment steps to maintain data consistency.
Which architectural pattern should you implement?
Answer options:
Two-Phase Commit (2PC)
Saga pattern
Command and Query Responsibility Segregation (CQRS)
Circuit Breaker pattern
55 questions · hints · full answers · grading