The Question
ML Design
Scalable Real-Time Email Spam Filtering
Design a real-time, high-throughput spam detection system for a global email provider with over 1 billion users. The system must process 10 million QPS with a P99 latency under 20ms. Address the challenges of extreme class imbalance, the high cost of false positives (important emails marked as spam), and the adversarial nature of spam campaigns. Your design should include a multi-tiered architecture for computational efficiency, a mechanism for rapid adaptation to new threats via user feedback loops, and a strategy for ensuring privacy and robustness against adversarial attacks.
XGBoost
DistilBERT
Kafka
Flink
Redis
LSH
INT8
Aerospike
SimHash
GNN
March 16, 2026