Code Room
System designHardsd-g109
Subject Online inferenceLevel Senior–Staff~45 minCommon in ML systems · Networking & APIs · Algorithms & data structures interviewsIndustries Technology

Question

Design online serving for a graph neural network that powers 'people/items you may know' on a social graph with 1B nodes and 100B edges. The GNN's prediction for a node depends on aggregating its multi-hop neighborhood, so a naive online forward pass would have to fetch and process an exploding number of neighbors per request — infeasible within a serving latency budget. Design the system so GNN-powered recommendations are served at scale and low latency, and explain how you avoid the neighbor-explosion problem online.

What a strong answer looks like

Clarify scale and constraints first. Propose a clean component breakdown, then go deep on the hard parts — data model, bottlenecks, consistency, failure modes — and name the trade-offs you are making.

Narrate your design
Loading whiteboard…
Run or narrate your approach, then ask the coach.