02 · Architecture decision record
ADR-007 Decouple billing from checkout
Accepted- Context
- A slow payment response blocks order creation, and billing load hits the same database as checkout.
- Options
- A · Keep synchronous calls; add timeouts and retries
- B · Extract billing behind an event queue
- C · Decompose the monolith into microservices
- Decision
- B. Extract billing with its own datastore; keep the rest as a modular monolith for now.
- Consequences
- + Checkout no longer waits on the payment provider
- + Billing deploys and scales on its own
- − Order status must handle “payment pending”
- − One more component to operate and monitor