#01Gmail Spam Filter
1 / 20
Google logoGoogle System
EasyProduct Systems
25–35 min

Gmail Spam Filter

Design a real-time email ingestion and spam classification pipeline capable of evaluating incoming messages with ML heuristics, rule-based fallbacks, and user feedback telemetry.

Scale & Traffic100M+ emails/day · 50ms latency SLA
Monthly Cloud Budget$3,000/month
Latency Target (P99)< 50ms Realtime SLA
Availability SLA99.99% Multi-AZ Active

System Requirements

  • Classify every incoming email before delivering to inbox in < 100ms
  • Support high-throughput stream ingestion for incoming SMTP traffic
  • Rule-based fallback engine when ML inference models are degraded
  • User feedback telemetry loop (spam/not-spam clicks) to retrain models
  • System metrics, quarantine storage, and error alerting

Graded Constraints

01Total estimated architecture cost must stay under $3,000/month
02Must include Client / Ingestion source, Load Balancer or Gateway, and Compute Service
03Must connect a Message Queue / Stream (Kafka or Queue) for asynchronous feedback processing
04Must include Persistent Storage or Database for quarantine & classification rules
05Compute engine must have both input from gateway and output to storage/queues

Ready to design?

Open this challenge in the interactive system design playground and satisfy all architecture constraints.

Explore More

Related Architecture Challenges

All Problems
Gmail Spam Filter — System Design Problem | Mimir Nest