Real-Time Feature Aggregation at Scale: iFood’s Path to Sub-Sec Latency
summary
iFood builds a dual-path feature platform using Spark Structured Streaming and Redis that combines batch precomputed “transaction” tables with a Kafka-driven real-time path that writes intermediate events to Redis and recomputes deltas. The system delivers ~1 second ingest-to-ready freshness, runs 200+ realtime features (1,800 total), about ~4M online retrievals/s at peak and ~400 Spark jobs. Microbatching creates limits on very high-volume topics; low-overhead real-time/continuous modes reduce that while keeping correctness.
AI-written summary · about
chapters (11)
- 0:00Introduction
- 1:11iFood’s scale and ML needs
- 2:59Building the feature platform
- 5:51Dual-path architecture design
- 8:01Real-time aggregator solution
- 11:38Production results and metrics
- 12:20Benefits of Spark integration
- 14:49Limitations and challenges
- 16:57Spark’s real-time mode
- 18:20Redis scalability and HA
- 20:08Q&A and closing
