Development

Developing sustainable web technology. Part 2

Following on from our previous article about sustainable web development where we spoke about the long term sustainability of a web site, there’s another aspect of sustainability which we must develop for: Environmental Sustainability. In this post that it is: energy consumption, and its partner in crime, COâ‚‚ equivalent emissions.

Energy Consumption of web sites

A modern trend is for client-side processing, that is, web sites that predominantly run code in your browser rather than on the server you load it from. This has big advantages for scalability – every visitor brings more computing power with them – but it also acts as an emissions multiplier. While you might know that Facebook has millions of servers, they are also indirectly responsible for the energy consumed by every browser and app that visits their site. Like many such trends, the balance between client- and server-side processing oscillates. Continuous advances in processor performance and efficiency mean that we can do the same amount of processing using less and less energy at both ends (this is great news!), but at the same time, we also have ever-increasing demand to soak up much of these efficiency gains. Movement to “the cloud” generally means a centralisation and concentration of consumption, which can allow data centres to obtain economies of scale, operating servers at peak efficiency and utilisation for more of the time, getting the most processing power for the lowest cost (in both money and energy terms).

Reducing energy consumption of web sites

We can’t make a web site “green” simply by moving it to renewable-powered hosting. Decisions made during development also have an impact on consumption – every bit delivered takes energy, as does every CPU cycle consumed in generating or processing input and output, at either end. There is plenty that can be done in using lightweight programming frameworks, reducing the number of networks involved in delivery, minimising their (network-wise) proximity to clients, local caching, better formats and codecs for image (WebP, HEIC, AVIF) and video compression (H.265/HEVC), and so on.

The lesson here is to host with services powered by renewable energy, and to take energy consumption into account during development. These measures will often have a handy side-effect of improving accessibility and performance, especially on older, low-end, or poorly-connected devices.

Measuring the energy use of web sites

Energy consumption can be measured for web sites, at least approximately.

This is how the DCD Development site performed: