System Design Fundamentals
Back to Data and Communication

Message Queues & Async Communication

Decouple services. Kafka, RabbitMQ, SQS — and when to reach for async messaging instead of synchronous calls. FIND_VIDEO: search 'message queue kafka rabbitmq tutorial' — recommended channel: ByteByteGo / Hussein Nasser. Aim for 10 min or under.

16 minutesVideo LessonPDF notes
🎯 Free Guest Mode: You are learning for free. Sign in to save your completion progress and quiz answers.
Loading progress...

Key moments

  1. MQ Role & Fundamentals — Message queues enable asynchronous communication by buffering messages between producers and consumers.
  2. Core Queue APIs — Functional message systems require interfaces for queue creation, message publishing, and message retrieval.
  3. Multi-Tiered Architecture — Stateless front-end tiers are decoupled from back-end processing using load balancers for traffic distribution.
  4. Back-End Service Decomposition — The back-end separates into a metadata service for queue routing and message brokers for payload processing.
  5. Consistent Hashing for Metadata — Consistent hashing maps queue identifiers to specific metadata hosts to balance routing queries evenly.
  6. Broker Storage Strategies — Message brokers utilize local file systems and append-only logs for low-latency read and write performance.
  7. Durability and Replication — Synchronous replication across multi-datacenter clusters guarantees fault tolerance and prevents data loss.
  8. Health and Placement Services — Health monitoring and placement services dynamically manage broker allocation and handle failover routing.
PDF notes

Frequently asked questions

Why separate the Metadata Service from the Message Broker?

Metadata operations are lightweight and infrequent, whereas message brokerage requires high-throughput I/O; isolating them prevents administrative bottlenecks from impacting streaming traffic.

How does synchronous replication impact message publishing latency?

Synchronous replication guarantees durability by waiting for writes to succeed across all replica nodes before responding, adding network transit latency to write requests.

What happens when a Message Broker host fails?

The Health Service flags the node as down, and the Placement Service redirects front-end requests to an active replica in a different data center.

How was this lesson?

Your feedback helps us refine explanations and catch bugs.