Design a Global Pub/Sub Messaging Service for Google Cloud

Last updated: November 29, 2026

Quick Overview

Design a managed publish-subscribe service where publishers send messages to topics and many independent subscriptions receive them with at-least-once delivery, acknowledgments, and redelivery.

Google
System Design
Software Engineer
Google
November 29, 2026
Software Engineer
System Design Round
System Design
Hard

0

0

0 solved


Design a managed publish-subscribe service where publishers send messages to topics and many independent subscriptions receive them with at-least-once delivery, acknowledgments, and redelivery.

Cloud Pub/Sub is a building block for many Google Cloud customers, and the design tests durable storage, fan-out, flow control, and acknowledgment tracking at scale. Interviewers check how per-subscription ack state is kept and how ordering is offered.

What the Interviewer Expects
  • Separates publish path from delivery path
  • Stores messages durably before acknowledging publish
  • Tracks acks per subscription efficiently
  • Supports push and pull with flow control
  • Explains ordering keys and exactly-once options
Key Topics to Cover
publish-subscribe
acknowledgment tracking
flow control
durable logs
ordering
How to Approach This
  1. Start by clarifying functional and non-functional requirements with the interviewer.
  2. Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
  3. Draw a high-level architecture first, then deep dive into 1-2 critical components.
  4. Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
  5. Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
  • How do you store ack state for a subscription with a billion unacked messages?
  • How do you deliver ordered messages per key without stalling everything?
  • How do you handle a subscriber that never acks?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice System Design Problems
Sample Answer
Requirements

Functional: create topics and subscriptions; publish messages (up to 10 MB); pull or push delivery; ack, nack, ack deadline extension; retention up to 7 days; seek to timestamp; optional ordering ...

High-Level Design
  1. Publish frontends receive messages, batch them, and write to storage servers that persist message batches replicated across zones before acking the publisher.
  2. Topics are split into **par...

Submit Your Answer
Markdown supported