Interview Questions/System Design/Design a Push Subscription & Pub/Sub System
IntermediateSystem-Design
30 min

Design a Push Subscription & Pub/Sub System

MessagingScalabilityReliability
Advertisement
Interview Question

Design a global publish/subscribe system with millions of subscribers, durable delivery, and filtering.

Key Points to Cover
  • Topics vs queues, fanout, and filtering
  • Durable storage, acknowledgments, retries
  • Ordering guarantees: per-partition vs global
  • Latency and throughput trade-offs
  • Backpressure, DLQs, and retries
Evaluation Rubric
Clear topic/subscription model25% weight
Durable delivery with retries25% weight
Considers ordering guarantees25% weight
Scalable to millions of subscribers25% weight
Hints
  • 💡Partition topics for ordering guarantees.
Common Pitfalls to Avoid
  • ⚠️**Assuming global ordering is feasible without significant performance penalties.**
  • ⚠️**Underestimating the complexity of idempotency for at-least-once delivery.**
  • ⚠️**Implementing filtering solely on the subscriber side, leading to excessive network traffic and client-side load.**
  • ⚠️**Not adequately planning for regional failures and disaster recovery in a global deployment.**
  • ⚠️**Ignoring the operational overhead and complexity of managing a large-scale distributed messaging system.**
Potential Follow-up Questions
  • How to support once-only delivery?
  • How to implement filtering efficiently?
Advertisement