Move only deferrable work off the request path#
If checkout waits for payment, inventory, email, analytics, and receipt generation in sequence, latency accumulates and one slow optional dependency becomes user-facing. Keep the correctness-critical acknowledgement boundary synchronous; enqueue work that may safely finish later.
| Prefer synchronous | Prefer asynchronous |
|---|---|
| Immediate result, authorization, required commit | Email, notification, indexing, media processing |
| Simple low-volume operation | Long-running work, retries, burst absorption |
| Delayed failure breaks the contract | Completion can be observed later |
Related practice problems
Use the manifest-backed prompts below to apply this lesson in a complete design.
- RabbitMQ reliability guideRabbitMQ Documentation
Reach this point to mark the lesson as read.