May 06, 2022
Sustainable web development
Climate change is real! In the face of increasingly noticeable climate change, we must do what it takes to mitigate the impending catastrophe. Of course, buying my fruits and vegetables regionally and seasonally at the market around the corner and switching to a green electricity provider is only a tiny, albeit well-intentioned, step. Instead, we should make an effort to turn all the screws that are available to us.
As a web developer, the Internet and its use spontaneously come to my mind. After all, the contribution to global CO2 emissions from Internet use is not negligible: Depending on the estimate, it is 1.8 to 3.9% of total global emissions and thus even ahead of that of total worldwide air traffic — and that’s before Corona!  For those who already find this worrying, this figure will only continue to rise in the future. After all, it can be assumed that digitalization and digitality will continue to advance.
Digital vs. non-digital
Of course, the Internet is a great thing, and not using it would not only throw us back into the Stone Age, but also make me unemployed. So, unfortunately, digital self-mortification is not an attractive way to solve the problem. And additionally not a sensible one either! Because basically, digitization — done right — is already a step in the right direction.
Let’s take a look at the comparison between the classic postal letter and an e-mail, for example: A postal letter generates an estimated 20 g of CO2 on average. An e-mail, on the other hand, produces only 10 g. That sounds great at first, CO2 emissions are reduced by 50%. However, if you consider the inflationary quantities of e-mails that are sent, it quickly becomes clear that the balance is unfortunately not as rosy as it seems at first glance. Due to the speed of exchange that is possible via e-mail, the volume of mailings also increases.
The problem is not new
Incidentally, this is also the case with the use of the bandwidth available to us. If you look at the information content of each megabyte transmitted, it has developed almost antiproportionally to the bandwidth: The actual utility of the transmitted data is getting smaller and smaller, while the bandwidth is getting larger and larger. Economist William Stanley Jevons noted as early as the mid-19th century that more efficient use of a commodity leads to increased use of that commodity, rather than decreased use as expected. At the time, the issue was coal. Jervons originally assumed that wider and more efficient use of the commodity would result in a reduction in demand. As we know, the opposite has occurred. We can observe exactly the same effect with the resource “Internet”, as described above.
In addition, the Swiss computer scientist Niklaus Wirth found 25 years ago that software becomes memory-hungry (and thus energy-hungry) faster than hardware improves. So increasing computing capacity and faster hardware does not save energy: quite the opposite. We are consuming more and more energy.
The Internet’s hunger for energy
The question that now arises for me as a web developer is: What can we do about it in our professional environment? After all, we are the ones who provide websites and services. This means that we are basically responsible for ensuring that the systems we design and develop use the available resources as sparingly as possible and are as durable as possible. Only then can we speak of sustainable software. To achieve this, we first need to understand where the Internet’s hunger for energy comes from in order to know where we can take action to improve the balance of our software.
On the one hand, there are the data centers of the hosting providers. Every time a web page is called up, a server delivers the corresponding data and, of course, consumes electricity to do so. Every single request to be answered by a server therefore results in increased power consumption in the data center. And on the other hand, there are the end devices that display the requested web pages and in turn consume electricity. Whether it’s a PC or a mobile device, they all require energy. Even leaving aside the energy that was needed to produce all this equipment, it still adds up. In addition, the content also has to be transported from the data center to the end device via the actual network infrastructure, which takes up further capacity.
It can now be observed that the energy transition is slowly picking up speed and some of the large Internet companies are getting involved here and promoting and driving the development toward less emissions on their own initiative: Google, for example, wants to offset its entire CO2 emissions since its founding. And Amazon, according to its own statements, also wants to be climate-neutral by 2040. But even if one day no more data centers are operated with fossil energy, it is still not sustainable to consume more energy than necessary. Because even if the server that delivers a website is powered by solar energy, the energy it requires is still precious and a resource worth protecting.
A step towards sustainable web development
That’s where we as web developers come into play: What actions can we take to make the web a more climate-friendly place? To simply give a concrete example: One effective way is to optimize assets, such as images, that can unnecessarily inflate the size of a website. By using Responsive Images, we can deliver precisely fitting images whose resolution depends on the size of the viewport used. By using this simple technique, we ensure that no images are loaded that are, for example, larger than the screen of a mobile device can even display them.
However, in addition to this, there is a whole range of other measures we can take to keep the energy hunger of our websites in check. If you want to get an overview of the CO2 emissions caused by your own website, you can use the Website Carbon Calculator. And if you, like me, see the need for action, you can look forward to our blog post series, in which we will look at different topics of web development from a sustainable perspective. We will highlight issues and energy hogs and present solutions to address and avoid them. As a Drupal developer I will always have an eye on Drupal CMS in these approaches. However, what has been said can easily be transferred and applied to other systems as well.
This series will cover the following topics:
- Backend Optimization
- Frontend Optimization
- User Experience and User Interface
- Sustainable Project Management
I wish you and me a lot of fun on this journey to a greener and climate friendly web.