Sweaty Imposter

Synchronous APIs Versus Domain Events

TradeoffPrincipalUpdated

Checkout calls nine downstream domains synchronously, including fulfillment, loyalty, fraud, and analytics, and new consumers arrive every quarter. An outage in any one of them currently fails checkout.

Short answer: Domain Events. Publish an OrderPlaced event as the contract and let each domain consume it at its own pace.

The Two Options

A

Synchronous APIs

B

Domain Events

Drill This: Your Pick First

The Better Pick

Option B

Domain Events

Publish an OrderPlaced event as the contract and let each domain consume it at its own pace. Checkout's availability then stops depending on nine other teams, and a new consumer subscribes without any change to checkout. Version the event schema with the same care as a public API, because every consumer depends on it.

When the Other One Wins

Synchronous APIs

When checkout needs an answer before it can proceed, such as a fraud decision or an inventory reservation, keep that call synchronous and use events for everything downstream.