Workflow · saas · workflow
Real-world engineering challenges: building Cursor — 100x growth, 1M+ QPS, and billions of daily code completions
Cursor needed to deliver sub-second AI code completions at massive scale — 1M+ transactions per second — without storing sensitive source code on the server.
How it works
Common implementation structure
How this type of workflow is generally built, generalized across documented cases — not tied to any one vendor's stack. Click any stage to read what happens there. Specific products that implement these stages appear in “Tools commonly seen” below.
Stage 1 · Context collected and encrypted locally
A small part of the current context window (code) is collected locally by the client, encrypted, and sent to the backend.
Tools used
TypeScriptRustElectronturbopufferPineconeWarpstreamDatadogPagerDutySlackSentryAmplitudeStripeWorkOSVercelLinearTerraformAWSAzureEC2AWS FirecrackerVisual Studio CodeOpenAI's embedding models
Outcome
Cursor reached $500M+ in annual revenue and 100x growth in load within 12 months, serving over 1M transactions per second and used by more than 50% of the 1,000 largest US companies.
What failed first
Cursor's initial database Yugabyte did not scale as expected and had to be migrated to PostgreSQL; a separate large indexing outage forced an emergency migration to turbopuffer.
Results
Time saved100x
Volume1M
Cost replaced$500M+
Running sinceMarch 2023
Grounding & classification
Source type: technical build writeup
52 fields verified against source quotes.
agentic workflowcode generationconversational airagcode diff prknowledge basefailure mode describedmetric backednamed customerproduction runtime claimedtools describedworkflow describedsoftwarerevenue increasethroughput increasetechnical build writeupagentic task executionrag answering