Llm Inference Serving hard
You serve a 70B-class model with 8-way tensor parallelism on a single node. Interactive p99 inter-token latency already meets its SLO, but traffic is about to double and you have been given a second identical 8-GPU node. What is the best use of it?
- A Extend tensor parallelism to 16 GPUs across both nodes, halving per-GPU weight reads so the one replica serves twice the tokens per second.
- B Run a second independent 8-way replica behind the load balancer, doubling aggregate throughput while leaving per-token latency unchanged.
- C Raise the max batch size on the existing node until throughput doubles, and keep the new node idle as a hot standby for failover events.
- D Use 2-stage pipeline parallelism across both nodes so each holds half the layers, which doubles KV capacity and per-sequence decode speed.
Answer: B. Run a second independent 8-way replica behind the load balancer, doubling aggregate throughput while leaving per-token latency unchanged.
When latency is already met and the goal is throughput, **independent replicas scale capacity almost linearly** with no new communication on the critical path. Stretching tensor parallelism across nodes puts per-layer all-reduces on the slow inter-node network for every token, so latency can get worse even though more GPUs were added. Multi-node parallelism is the right call only when the model does not fit on one node or single-stream latency must drop.
One system design question a day, with spaced repetition so the ones you miss come back.
Get the appRelated questions
- Your 70B-class model servers each handle about 40 concurrent chats with 4K-token contexts. Product raises the maximum context to 32K tokens, and many users start using it. What is the main capacity consequence?
- A 70B-class model (80 layers, grouped-query attention with 8 KV heads of dimension 128) is served in fp16 on one 8-GPU node with about 640 GB of total HBM. Product wants 256 concurrent sessions, each holding a full 32K-token context. What is the binding constraint, and what does it imply?
- Your server reserves a contiguous KV region sized for max_tokens = 8,192 for every request at admission, but the average sequence ends near 600 tokens. The node reports out-of-KV-memory at about 20 concurrent requests while GPU compute sits at 30%. Which change best raises concurrency without restricting legitimate long outputs?
- You must summarize 10 million documents overnight, and no user is waiting on any single result. How should you configure the serving stack compared with your interactive chat deployment?
- You serve a 7B-parameter model in fp16 (about 14 GB of weights) for a chat app. Users say single-conversation token generation is too slow, and you are choosing new GPU hardware. Which hardware spec most directly increases per-sequence decode speed?
- Your RAG workload sends 8K-token prompts and gets ~150-token answers from a 70B-class model. You plan to move prefill and decode onto separate GPU pools so long prefills stop stalling decode. What new resource must you size carefully?