Every request, every microsecond: scalable machine learning at Cloudflare
Jun 19, 2023Alex Bocharov

Summary
This post details the evolution of Cloudflare's machine learning feature serving infrastructure. It describes the transition from a Unix Domain Socket (UDS) based system (Gagarin) to using memory-mapped files for inter-process communication (IPC). The challenges with UDS, including high tail latency, suboptimal resource utilization, and scalability constraints, are highlighted. The new approach leverages memory-mapped files for reduced latency and CPU contention, combined with wait-free synchronization and efficient data deserialization techniques to serve millions of ML features per request.
More from the Artificial Intelligence Integration & Impact trail
- Introducing Clef-omni with full multimodality, plus a faster Clef and a cheaper Clef-flash
- Introducing Web Search API via AI Gateway
- Introducing Clef: our open-source decision models, and new RL fine-tuning platform
- One year later: Sovereign AI and the fight for choice
- AI Search is now generally available