Creating a sustainable website

Websites are part of our everyday life, we no longer think about browsing or surfing the web, we simply search and consume content. With all our searching and consuming we load lots of web pages, and these webpages aren’t just something in the ether with no physical cost. “An average website produces 4.61 grams of CO2 for every page view”, over the span of a year that adds up to significant numbers. For a website that has 1,000 views per month that’s 55kg or 122 lbs of CO2.

It’s not all doom and gloom. There’s a few things we can do to collectively and as individual developers. Most importantly, we can simply reduce the weight of our websites (the amount of code that has to send over the wire). Reducing the payload size of a website, saves on energy costs across countless servers and networks.

The other key thing we can do, is focus on SEO. [But SEO is for search rankings…?] Right, SEO is the art and practice of tuning a webpage to rank higher on discovery platforms, but considering that search engines give preference to pages that answer real questions, reduce fluff, and deliver a better user experience to the end-user.

Ok, so why are you talking about this…

Well this website is a simple (and hopefully a visually appealing) example of developing a sustainable website. Starting with the biggest energy sinks, this website is built on serverless technology. I know serverless still uses servers, but the magic of serverless, is you only consume CPU resources when a request is made. The “Function-as-a-Service” model allows vendors like AWS or Azure to deliver on-demand server actions to more users than if they had to dedicate servers that often sit idle.

The other big thing about this site is it’s engineered to load quickly and with minimal CPU work. In all honestly, I’ve over-engineered it, but that’s just the perfectionist in me coming out.