Message queues

A queue decouples the producer from the consumer: the request is accepted quickly, and the slow work happens later at the pace workers can sustain. It smooths spikes and isolates failures.

Where it shows up in real systems

  • Message queue

    A queue absorbs spikes: the API answers as soon as the message is stored, and workers drain the backlog at their own pace. Standard queues deliver at least once and may reorder; FIFO queues keep order but cap throughput. Messages that fail repeatedly go to a dead-letter queue.

    In production: Amazon SQS, RabbitMQ, Azure Service Bus, Google Cloud Tasks

  • Push notification service

    Apple and Google gateways accept large batches but deliver on their own schedule. Fan-out to millions of devices belongs in a queue with many workers, and invalid device tokens must be cleaned up.

    In production: Firebase Cloud Messaging, Apple Push Notification service, Amazon SNS Mobile Push, OneSignal

See it break, then fix it

Build an architecture, send it a day of traffic and outages, and learn why it holds or fails. Free to start.