SystemCity
WorkspaceProblemsCanvasPricing
Sign in
S

SystemCity

AI-powered system design tutor. Learn architecture, ace interviews, build real systems.

Learn

  • Learn System Design
  • Interview Prep Guide
  • All Problems
  • Glossary
  • Compare
  • Design Canvas

Product

  • Pricing
  • Portfolio
  • Support

Legal

  • Terms
  • Privacy
  • Refunds

© 2026 SystemCity. All rights reserved.

Master system design · interview prep · 120+ problems

Back to glossary

Communication & APIs

Message Queue

Also known as: Queue, Job Queue

A buffer that holds messages between producers and consumers, enabling asynchronous processing and decoupling of services.

In depth

A message queue accepts messages from producers, durably stores them, and delivers them to consumers. The queue absorbs bursts (producers can publish faster than consumers can process), decouples services (producers and consumers can deploy and scale independently), and adds reliability (a message persists in the queue until processed and acknowledged).

Classic queueing semantics are point-to-point: each message is consumed by exactly one worker. SQS, RabbitMQ, ActiveMQ, and Beanstalkd are common implementations. Pub/sub is the related broadcast pattern where a message is delivered to every subscriber. Kafka and Pulsar combine both with append-only logs and consumer groups, providing replayable streams that scale to millions of messages per second.

Queues are the workhorse of background jobs, asynchronous workflows, and event-driven architectures. They turn a synchronous request-response into "accept the request, queue the work, ack later" — improving response times and isolating failures.

When to use

Use a queue for any work that is slow, expensive, or can be done after the user response: sending email, generating PDFs, video transcoding, indexing, analytics events.

Tradeoffs

Queues introduce eventual consistency (the work happens later), require idempotent consumers (messages can be redelivered), and add a critical piece of infrastructure to operate. Dead-letter queues and retry strategies must be designed thoughtfully.

Related terms

Pub/Sub

A messaging pattern where publishers emit messages to topics without knowing who consumes them, and subscribers receive messages from topics they care about.

Idempotency

A property of operations such that performing them multiple times has the same effect as performing them once — essential for safe retries.

REST API

An architectural style for web APIs based on HTTP verbs (GET, POST, PUT, DELETE) acting on resources identified by URLs.

gRPC

A high-performance RPC framework using HTTP/2, Protocol Buffers, and code generation for type-safe, low-latency service-to-service communication.

GraphQL

A query language for APIs that lets clients request exactly the fields they need in a single request, eliminating over- and under-fetching.

WebSocket

A persistent, bidirectional communication channel between client and server over a single TCP connection — the standard for real-time web features.

Practice this concept

EasyInfrastructure

Design a Multi-Device Screenshot Capture System

MediumE-Commerce

Design a Flash Sale System