> Each site was more or less a fork of the codebase, and required a separate DB instance.
I don't believe this is true. At least as of 2016, the various sites were on a shared codebase [0], and there were two SQL Server clusters total [1], for all the various sites, chat, devops, other systems, etc.
[0]: https://nickcraver.com/blog/2016/02/17/stack-overflow-the-ar...
[1]: https://nickcraver.com/blog/2016/02/17/stack-overflow-the-ar...