Design the Serving Path for Copilot Inline Code Suggestions

Last updated: November 29, 2026

Quick Overview

Design the backend that returns ghost-text code completions to GitHub Copilot users in their editor as they type, keeping latency low enough to feel instant while controlling GPU cost across millions of developers.

Microsoft
System Design
Software Engineer
Microsoft
November 29, 2026
Software Engineer
System Design Round
System Design
Hard

0

0

0 solved


Design the backend that returns ghost-text code completions to GitHub Copilot users in their editor as they type, keeping latency low enough to feel instant while controlling GPU cost across millions of developers.

Inline completions are triggered on nearly every pause in typing, so the request rate is huge and most responses are thrown away when the user keeps typing. Microsoft and GitHub interviewers look for latency budgeting, cancellation, context assembly on the client, GPU batching, and safety filtering, rather than model architecture details.

What the Interviewer Expects
  • Sets a latency budget and splits it between client, network, and inference
  • Assembles prompt context on the client (current file, neighboring tabs, imports) with size limits
  • Debounces and cancels in-flight requests as the user types
  • Routes to regional GPU pools with continuous batching and KV cache reuse
  • Applies content filters (secrets, public code matching) before returning
  • Measures acceptance rate and latency, not just throughput
Key Topics to Cover
Latency budgets
Request cancellation
GPU batching
Prompt caching
Content filtering
How to Approach This
  1. Start by clarifying functional and non-functional requirements with the interviewer.
  2. Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
  3. Draw a high-level architecture first, then deep dive into 1-2 critical components.
  4. Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
  5. Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
  • How do you reuse computation when consecutive requests share 95% of the prompt?
  • Enterprise customers require data to stay in their region and never be retained: what changes?
  • How would you A/B test a new model safely given acceptance rate is noisy?
  • GPU capacity is short during a regional outage: what do you degrade first?
Sharpen Your Skills on Codemia

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

Practice System Design Problems
Sample Answer
Requirements

Functional: given cursor position and surrounding context, return one or a few completions; support multiple languages and editors (VS Code, Visual Studio, JetBrains). Non-functional: end-to-end p50 a...

High-Level Design

The editor extension decides when to ask: after a short debounce (about 75 ms of no typing), and not inside comments or strings if the heuristics say a suggestion is unlikely. It builds the prompt loc...


Submit Your Answer
Markdown supported