Here's a back-of-the-envelope calculation:
This page describes the architecture of the Stack Exchange network. It consists of:
- 9 web servers
- 4 sql servers
- 2 redis servers
- 3 tag servers
- 3 elasticsearch servers
- 2 haproxy servers
So that's 23 servers in total. Not all servers are equal, but since we do not have exact energy consumption figures we will use an estimate for 1 web server and multiply by 23.
Recent measurements done by an organization I cooperate with showed that their server energy consumption is between 1160 and 1770 kWh a year. Let's take 1600 kWh as a rough estimate of server energy consumption per year.
The EPA reports 7.07 × 10-4 metric tons CO2/kWh as the average carbon footprint for 1 kWh in the US, but that average kWh is generated with only 17.64% renewable energy. This meta post says that the Stack Exchange servers are hosted in New Jersey by a company called QTS. In the QTS Sustainability Report 2018 it says that 32% of their power is from renewable energy sources. It's not entirely correct, but we estimate that the carbon footprint of 1 kWh used by a QTS server is 0.707 / (100 - 17.64) * (100 - 32) = 0.584 kg CO2e per kWh. So for 1 server this results in 1600 * 0.584 = 934 kg CO2e per year.
So far we only looked at the carbon footprint of the 'use phase' and ignored the production and disposal phase. This 2010 paper from Dell says that the GHG emissions in the use phase of a Dell rack server accounts for over 90% of the total life-cycle impact, so we add another 10% to get the impact over the entire lifecycle of the server: 934 / 90 * 100 = 1038 kg CO2e per server per year
With 23 servers that results in 23,900 kg CO2e per year for the entire Stack Exchange production environment (so not including servers for developing or testing the platform).
With 1.3 billion page views per month that is approximately 1.5 mg CO2 per view