Message queues.
A to-do inbox between two services, so work is not dropped when one of them is busy.
- Still waiting…1
The direct way: one service calls another and waits. If the other is slow, the caller is stuck too.
- There — done with my bit.2
Put an inbox between them. The sender drops a note and immediately gets on with its day.
- 3
The note waits safely in the queue, even if the receiver is busy or briefly down.
- 4
When it has capacity, the receiver pulls the next note and does the work at its own pace.
- Done. Clear it.5
Only once the work is finished is the note removed — so a crash mid-job loses nothing.
- 6
A sudden flood piles up and gets worked through steadily, instead of crushing the receiver all at once.
Semicolony semicolony.dev/eli5/message-queue/comic