Serve Meta AI Chat at Low Latency for Billions of WhatsApp Users

Last updated: November 29, 2026

Quick Overview

Design the LLM serving system behind Meta AI in WhatsApp, Messenger and Instagram, supporting streaming responses for very large traffic with tight latency and cost targets. Cover routing, batching, caching, and capacity planning across GPU regions.

Meta
ML System Design
Software Engineer
Meta
November 29, 2026
Software Engineer
System Design Round
ML System Design
Hard

0

0

0 solved


Design the LLM serving system behind Meta AI in WhatsApp, Messenger and Instagram, supporting streaming responses for very large traffic with tight latency and cost targets. Cover routing, batching, caching, and capacity planning across GPU regions.

Meta AI runs on Llama models across apps with billions of users, which makes serving cost and latency first-class design concerns. Interviewers look for knowledge of LLM serving mechanics (prefill and decode, continuous batching, KV cache), model routing by request difficulty, and graceful degradation during peaks.

What the Interviewer Expects
  • Defines latency targets such as time to first token and tokens per second
  • Explains prefill and decode phases and continuous batching
  • Routes requests to model sizes based on difficulty and load
  • Uses prompt and prefix caching and speculative decoding where they help
  • Plans capacity across regions and degrades gracefully under overload
Key Topics to Cover
LLM serving
continuous batching
KV cache
model routing
capacity planning
How to Approach This
  1. Start by mapping the business objective to a concrete ML objective and metric.
  2. Cover the full pipeline: data collection, feature engineering, model selection, training, serving.
  3. Discuss online vs offline evaluation. Plan an A/B test to validate real-world impact.
  4. Address the serving latency budget and whether batch or real-time inference is needed.
  5. Think about the data flywheel: how user feedback improves the model over time.
Possible Follow-up Questions
  • How do you decide which requests go to the large model versus a small one?
  • What happens to in-flight streams when a GPU host fails?
  • How would you handle a traffic spike 3 times normal during a global event?
  • How do you keep cost per conversation flat as context lengths grow?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice ML System Design Problems
Sample Answer
Requirements
  • Requests from chat surfaces, streamed back token by token.
  • Targets: time to first token under about 1 second at p95, steady 20 or more tokens per second per stream.
  • Traffic peaks by time zone an...
High-Level Design
  1. Edge and gateway: authenticates, applies rate limits, attaches conversation context, and selects region by proximity and capacity.
  2. Router: a light classifier estimates request difficulty...

Submit Your Answer
Markdown supported