How GitHub built Copilot: a globally-distributed LLM code completion service serving 400M+ requests at under 200ms
GitHub needed to serve LLM-based code completions with latency competitive against locally-run IDE autocomplete, despite the overhead of network latency, shared server resources, and cloud outages. Authentication at scale and efficient request cancellation were also unsolved challenges.
The alpha required users to supply their own OpenAI API keys and scaled to only dozens of users. Standard HTTP/1-based cancellation forced costly TCP reconnections after every cancelled request. A point-of-presence model caused traffic tromboning and high operational burden. Most cloud load balancers downgraded HTTP/2 to HTTP/1 on the backend, undermining stream-level cancellation.
GitHub Copilot serves more than 400 million completion requests with a mean response time under 200 milliseconds and peaks at 8,000 requests per second, achieving global resilience through regional proxy colocation and self-healing DNS routing.
Show all 6 reported metrics
Frequently asked questions
What did this team achieve with this AI workflow?
GitHub Copilot serves more than 400 million completion requests with a mean response time under 200 milliseconds and peaks at 8,000 requests per second, achieving global resilience through regional proxy colocation an…
What tools did this team use?
GitHub Copilot, copilot-proxy, Go, HTTP/2, GLB, HAProxy, octoDNS, Azure, OpenAI, VS Code.
What results were reported?
Completion requests served: more than 400 million; Peak requests per second: 8,000; Mean response time: less than 200 milliseconds; Typed-through (cancelled) request rate: around half (source-reported, not independently verified).
What failed first in this deployment?
The alpha required users to supply their own OpenAI API keys and scaled to only dozens of users.
How is this workflow AI workflow structured?
User pauses typing in IDE → Completion timing prediction → Short-lived token validation → Regional proxy routing → LLM code completion generation → Streaming response to IDE → HTTP/2 stream cancellation.