In a recent interview with Scott Hanselman, Roberta Arcoverde, Head of Engineering at Stack Overflow, revealed the story of the architecture of Stack Overflow. They handle more than 6000 requests per second, 2 billion page views per month, and they manage to render a page in about 12 milliseconds. We imagine they use a microservice solution running in the Cloud with Kubernetes.

But the story is a bit different. Their solution is 15 years old, a giant monolithic application running on-premise. It is a single application on IIS which runs 200 sites. This single app is running on nine web servers and a single SQL Server (with the addition of one hot standby).

They also use two levels of cache, one on SQL Server with large RAM (1.5TB), where they have 30% of DB access in RAM, and two Redis servers (master and replica). Besides this, they have three tag engine servers and 3 Elastic search servers, which are used for 34 million daily searches.

All this is handled by a team of 50 engineers, who manage to deploy to production in 4 minutes several times daily.

Their full tech stack is:

  • C# + ASP.NET MVC
  • Dapper ORM
  • StackExchange Redis
  • MiniProfiler
  • Jil JSON Deseliazier
  • Exceptional logger for SQL
  • Sigil, a .Net CIL generation helper (for when C# isn’t fast enough)
  • NetGain, a high-performance web socket server
  • Opserver, monitoring dashboard polling most systems and feeding from Orion, Bosun, or WMI.
  • Bosun, backend monitoring system, written in Go

If you want to learn more about their architecture, there is a series of articles from Nick Craver, one of the engineers from 2016. This needs to be updated, but the architecture should be the same.

Thanks for reading, and stay awesome!