Backend for AIintermediate12 min · 10 steps
Message Queues
Services talk asynchronously through a durable broker, either a work queue where each message goes to one worker, or an event log every consumer group reads at its own pace, to decouple, absorb bursts and retry safely.
requestheavy workdataerrorsignal
ProblemStep 1 of 10
One slow consumer stalls everyone
When a ticket changes, the assistant must write a resolution summary, update dashboards and re-embed changed articles. If the webhook handler calls all three inline, the slowest one sets the response time, and if any one is down, the event is lost.
Bursts make it worse: 500 ticket updates in a minute arrive at 500 times the rate the summarizer can handle.
Lesson 12 of 20 in Backend for AI