In February 2016 the Stack Exchange network, which includes Stack Overflow, answered about 209 million HTTP requests in a day. It did so with one main web application running on nine web servers, backed by four SQL Server machines in its primary data centre, all on hardware the company owned. At a time when the standard advice was to split everything into microservices and scale out in the cloud, this is the best documented example of the opposite choice, and it is worth understanding why it worked.
Most of what follows comes from a series of posts by Nick Craver, an engineer at the company at the time, written in 2016. Every figure is tied to its date, because the system has since changed.
The problem and the scale
A question and answer site is read far more than it is written. Most visitors arrive from a search engine, read one question page and leave. The engineering problem is to render that page very quickly, a very large number of times, while keeping the comparatively rare writes (questions, answers, votes, edits) correct.
Craver published the numbers for a single day, 9 February 2016:
| Measure (9 February 2016) | Value |
|---|---|
| HTTP requests reaching the load balancers | 209,420,973 |
| Page loads | 66,294,789 |
| SQL queries issued from HTTP requests | 504,816,843 |
| Redis hits | 5,831,683,114 |
| Elasticsearch searches | 17,158,874 |
| Average time to render a question page | 22.71 ms |
The same post compares the day with one in November 2013. Requests had grown by more than 60 million a day, yet total time spent in ASP.NET had fallen from 757 hours to 447. More traffic was being handled with less compute, through new hardware and steady performance work.
The server list for the New York data centre in that post is short: 4 HAProxy load balancers, 11 web servers (9 primary and 2 for development and meta sites), 4 SQL Servers arranged as 2 clusters, 2 Redis servers, 3 Tag Engine servers and 3 Elasticsearch servers. A second data centre in Colorado existed for disaster recovery.
The request path: load balancers and one application
A request first reaches HAProxy, an open-source load balancer, running on Linux. In 2016 HAProxy terminated TLS, so the web servers behind it did not spend CPU on encryption, and it routed requests to the right pool of servers by looking at the Host header. It also applied rate limits and logged timing headers for every request, which gave the team per-request performance data.
Behind HAProxy sat the web tier: Windows servers running IIS and ASP.NET MVC. The important fact is how little variety there was. Craver describes the main Q&A application as multi-tenant: a single codebase and a single deployed application served Stack Overflow, Super User, Server Fault and every other Q&A site in the network, choosing the right database and settings per request. A few things, such as the API and the careers product, were separate applications, but the bulk of the traffic went to one.
This is a monolith in the usual sense of the word. One build, one deployment, function calls where a microservice design would have network calls. The web servers held no data of their own that could not be rebuilt, so any of them could serve any request, and the tier could be scaled by adding identical machines.
It rarely needed to be. The 2016 post states that the sites could run on a single web server, and that this had been tested by accident more than once. The remaining servers were there for rolling deployments, headroom and redundancy. Each web server, according to the hardware post from March 2016, was a Dell R630 with two 12-core Intel processors and 64 GB of RAM.

SQL Server: one source of truth, scaled up
All primary data lived in Microsoft SQL Server. Craver calls it the single source of truth: everything in Redis and Elasticsearch was derived from it and could be rebuilt from it.
There were two clusters in 2016:
| Cluster | Holds | RAM per server (2016) |
|---|---|---|
| 1 | Stack Overflow and a few related databases | 384 GB |
| 2 | Everything else, including the other Q&A sites and chat | 768 GB |
Each cluster had one primary that took almost all of the load, one replica in New York and one replica in Colorado, kept in step using SQL Server's AlwaysOn Availability Groups. The post says all replicas were asynchronous.
This is vertical scaling. The database was not sharded across many small machines. The company bought servers with a great deal of memory and fast solid-state storage. The hardware post notes that the SQL Servers almost always ran at 5 to 10% CPU.
Low database load was not only bought with hardware. The team treated query speed as part of the application. New data access code used Dapper, a small library the team wrote and open-sourced that maps query results to objects with very little overhead, while older code still used LINQ to SQL. A profiler they also open-sourced, MiniProfiler, ran on every page so that developers could see where the time went. The database contained just one stored procedure in 2016; the logic lived in application code.
Two cache layers, a tag engine and search
The cheapest query is the one that is never sent. Stack Overflow used two cache layers, which Craver labels L1 and L2:
- L1 is memory inside each web server process. A lookup costs about as much as reading a variable.
- L2 is Redis, shared by all web servers. A lookup costs a network round trip, which the 2019 caching post puts at roughly 0.2 to 0.5 ms on their network.
A read checks L1, then L2, then the database, and stores the result back in both layers on the way out. When a cached value must be removed, the application deletes it from Redis and publishes the key on a Redis pub/sub channel; every web server is subscribed and drops its local copy.
In 2016 the main Redis deployment was 2 servers, a primary and a replica, each with 256 GB of RAM, handling about 160 billion operations a month at under 2% CPU. The same pub/sub mechanism fed the site's websocket connections for live updates, about 500,000 of them open at peak in 2016.
The 2019 post is frank that caching has a price: invalidation logic, memory, and bugs that are hard to see. Its stated rule is to cache only where it is needed. The team even removed full-page output caching, because the hit rate was too low to justify the memory.
Two specialised components completed the picture. The Tag Engine was an in-house service on 3 servers that answered "which questions match this tag" from memory, a query that is awkward and expensive in a relational database. Elasticsearch, a 3-node cluster per data centre, served full-text search and related questions, and was fed from SQL Server.
The trade-offs they accepted
Stack Overflow's design is not free of costs. It moved them to places the team was willing to pay.
- A capacity ceiling per machine. Vertical scaling ends at the largest server you can buy. A read-heavy workload whose data fits in a few hundred gigabytes of RAM never reached that ceiling, but a different workload might.
- Owning hardware. The hardware post describes specifying each server for its workload. That gives control and predictable performance, and it also means buying, racking and replacing machines, and running data centre networking.

- Coupled deployment. With one application, every team ships in the same build. That is simple while the team is small and the codebase is disciplined; it gets harder as an organisation grows.
- Performance as a standing duty. The architecture works only if the code stays fast. Craver's hardware post puts the attitude in four words: "performance is a feature". Carefully tuned SQL and custom libraries are the cost of that.
- Asynchronous replicas. An asynchronous replica can lag the primary, so a failover may lose the most recent writes. They accepted that in exchange for writes that never wait on a second machine.
What changed: the move to the cloud
The design lasted a long time. According to the company's own blog, the Stack Exchange sites ran on physical hardware in a New Jersey data centre, which staff referred to as New York, from October 2010.
Two things changed. In 2023 the company finished moving its business product, Stack Overflow for Teams, to Azure. Then the operator of the New Jersey data centre decided to close the facility, and the contract ended on 31 July 2025 with no option to renew. The engineering team migrated the public sites to Google Cloud. The blog post on the unracking says the servers, about 50 of them, were removed on 2 July 2025, and that the Colorado site had been shut down the month before.
The August 2025 engineering post describes the new platform: applications on Kubernetes, Redis as a managed service, self-hosted Elasticsearch, and a CDN in front. It also gives a second reason for the move: the old platform was built around individual servers, which made standalone services and team autonomy difficult.
One part of the old thinking survived. SQL Server was not replaced by a managed or distributed database. It runs on very large virtual machines, with the roughly 1.5 TB database held in memory. The database tier is still scaled up.
The computer science underneath
Vertical and horizontal scaling. Scaling up means a bigger machine; scaling out means more machines. Stack Overflow did both, in different tiers: stateless web servers scaled out behind a load balancer, and the stateful database scaled up. Our lesson on vertical vs horizontal scaling explains why state is what makes scaling out hard.
Monoliths and microservices. A monolith replaces network calls with function calls, which removes latency, serialisation and partial failure from most of the request path. Microservices buy independent deployment and team autonomy at the price of those things. The lesson on monolith vs microservices sets out both sides.
Caching and invalidation. The L1 and L2 design is the cache-aside pattern applied twice, with a publish and subscribe channel to keep the local copies honest. See caching strategies for the patterns and their failure modes.
Load balancing and replication. HAProxy spreading requests across identical web servers is described in load balancing. The primary and replica arrangement in SQL Server, and what asynchronous replication means for failover, is covered in replication and failover.
What an interviewer could ask from this
How could so few servers handle that much traffic? The workload is mostly reads of a dataset that fits in memory. Fast page rendering (about 23 ms for a question page in 2016), two cache layers and well-tuned SQL meant each request used very little CPU.
Why did they scale the database up and not shard it? Sharding adds routing, cross-shard queries and rebalancing. Their data fitted on one large server per cluster with CPU to spare, so they avoided that complexity.
Why have both an in-process cache and Redis? In-process memory is the fastest lookup but is private to one server and lost on restart. Redis is shared, so one server's work benefits all, at the cost of a network hop.
How do the web servers keep their local caches consistent? On invalidation the application deletes the key in Redis and publishes it on a pub/sub channel. Every web server receives the message and removes its local copy.
What is the risk of asynchronous replicas? The primary confirms a write before the replica has it. If the primary fails, the newest writes may be missing on the replica that takes over.
When would this architecture be the wrong choice? When data or write volume exceeds what one machine can hold, when many teams need to deploy independently, or when traffic varies so much that owning peak capacity is wasteful.
Takeaways
- In February 2016 Stack Overflow's network served about 209 million requests a day from one multi-tenant application on nine primary web servers.
- The web tier was stateless and scaled out; SQL Server was the single source of truth and scaled up, with asynchronous replicas for failover.
- Low latency came from measuring every request, tuned SQL and a two-layer cache, not from a large server count.
- Every architecture has costs. Theirs were owning hardware, coupled deployments and constant performance discipline.
- By July 2025 the public sites had left their own data centre for Google Cloud, after the facility closed, while keeping a large scaled-up SQL Server.












