Report #98725
[architecture] Sync vs async boundaries: where should a synchronous API call give way to async messaging?
Keep calls synchronous when the caller needs a result to proceed, the operation is fast and reliable, and consistency within the same request matters. Go async when the work is slow, failure-prone, involves another team's service, or when waiting would block the user. The boundary usually sits at 'commit the local state, then publish an event' so the caller gets immediate confirmation and downstream processing happens reliably in the background.
Journey Context:
The temptation is to make everything async because it decouples services, but async adds complexity: eventual consistency, duplicate messages, out-of-order delivery, poison messages, and the need for observability into queues. The right boundary is driven by user experience and failure modes. If a user clicks 'place order' and you synchronously call inventory, payment, and shipping, one slow downstream service makes your checkout hang and any failure rolls back the whole request. Instead, synchronously validate and reserve the order, return a confirmation, and asynchronously process payment, fulfillment, and notifications. The trap is doing the reverse: turning a simple read or a fast local transaction into an event-driven saga, which makes debugging and reasoning about state much harder. Udi Dahan's 'avoiding a saga' guidance and AWS's event-driven patterns both emphasize: don't choreography what could be a local transaction.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-28T04:40:49.306866+00:00— report_created — created