
Designing an ultra-low latency distributed graph execution engine using gRPC and async breadth-first traversal
This article reveals Netflix's design for the serving layer of its Real-Time Distributed Graph (RDG), which processes complex multi-hop queries in sub-100ms. By replacing depth-first traversal with async breadth-first execution and adopting streaming adjacency lists, Netflix achieves high performance and safety under massive scale.
Highly recommended for backend architects, distributed systems engineers, and API designers who need to retrieve heavily connected, large-scale data with strict latency guarantees.
While Netflix built a Real-Time Distributed Graph (RDG) containing billions of nodes and edges, they faced a distinct set of challenges in the serving layer. They had to support diverse access patterns, from high-volume security lookups to deep exploratory queries, while maintaining a sub-100ms latency without accumulating sequential network hop overhead.
To solve this, the execution engine orchestrates breadth-first traversal to expand graph levels in parallel and uses asynchronous composition built on a small, dedicated thread pool (16-24 threads) to prevent blocking on I/O. Furthermore, the engine processes adjacency lists as streams to avoid over-fetching and selectively caches frequently accessed, stable node properties via EVCache.
Through this design, complex multi-hop queries, such as a 2-hop viewing history traversal, are resolved in under 100ms. Thousands of concurrent queries are managed safely and efficiently without thread exhaustion, achieving a 70-80% cache hit rate on selective node lookups.
Trade-off
The breadth-first approach requires holding each level of the graph frontier in memory simultaneously, scaling costs with breadth rather than depth. To mitigate memory pressure, strict per-edge-type limits must be applied at each hop, and the system relies on eventual consistency rather than strong consistency to achieve high throughput.
A graph traversal method that explores all nodes at the present depth level before moving to the nodes at the next depth level, minimizing network roundtrips in a distributed system.
A method of retrieving edge connections for a node as an active stream of batches rather than a monolithic payload, allowing early termination.
An execution model where I/O operations are chained non-blockingly, returning threads back to the execution pool while waiting for network responses.




