Design a scalable event email system
Company: StubHub
Role: Software Engineer
Category: System Design
Difficulty: hard
Interview Round: Onsite
Design an event management system that supports creating and managing at least 1,000,000 concurrent events and sending notification emails to all registered participants for each event. Define core APIs (create event, register participant, schedule or trigger emails, cancel/update), the data model and storage strategy (schemas, indexes, partitioning, and retention), and the end-to-end email delivery pipeline (producers, queues, consumers, batching, retries, idempotency keys, deduplication, and bounce/complaint handling). Provide capacity estimates (QPS, fan-out per event, peak email throughput), sharding and autoscaling approaches, and scheduling strategies (time-based vs. event-driven, distributed scheduler, backpressure). Explain rate limiting across tenants and providers, adherence to provider quotas, and how you ensure at-least-once vs. exactly-once delivery semantics with dead-letter queues and reprocessing. Describe observability (metrics, SLOs, tracing, alerting), abuse prevention and compliance (unsubscribe lists, suppression, double opt-in, CAN-SPAM/GDPR), as well as multi-region availability, disaster recovery, and consistency trade-offs. Include a cost estimate and discuss managed services vs. self-hosting. Walk through a failure scenario (e.g., regional outage or provider throttling) and how the system recovers.
Quick Answer: This question evaluates a candidate's ability to architect a scalable, multi-tenant event-driven email notification system, covering competencies in large-scale distributed systems, data modeling, delivery pipelines, rate limiting and quotas, observability, compliance, and disaster recovery.