Essay - Published: 2023.03.29 | tech-stack | technology |
DISCLOSURE: If you buy through affiliate links, I may earn a small commission. (disclosures)
In this post we'll explore how Stack Overflow - one of the most popular websites in the world - runs its services, all with monoliths.
Stack Overflow is one of the top 250 most popular websites in the world. It's most known as a popular Q&A site for developers but also runs Stack Exchange - Q&A software for public and private usecases at scale.
Some stats:

Stack Overflow System Architecture
Application
Let's start with the main Stack Overflow / Stack Exchange application. It's a monolithic, multi-tenant .NET app running on 9 servers.
Data
Stack Overflow runs on 4 large SQL Servers - 2 for Stack Overflow, 2 for Stack Exchange. They use Dapper ORM - a lightweight, performant .NET ORM (the same ORM I use in F# projects).
Note: The size of the DB cache means ~1/3 can be stored in memory at one time.
Cache
Most of the caching is actually done within the databases. Arcoverde mentioned that Stack Overflow attempted more advanced caching but uniform access patterns across all Q&A questions led to poor cache hit rates, rendering the complexity / cost not worth it (see Arcoverde - Hanselminutes Podcast).
Another data point that monoliths scale! For more on scaling monoliths, check out Software Monoliths for Scale
The best way to support my work is to like / comment / share for the algorithm and subscribe for future updates.