Skip to content

A Carbon-Aware Internet with the Green Web Foundation

Green Web Foundation logo and text "Towards a fossil-free internet by 2030"

Using real-time data about electricity around the world, we annotated network connections with carbon-intensity. With this information, any digital infrastructure provider can move their compute workloads to greener regions.

At the Green Web Foundation, we seek to increase the Internet’s energy efficiency and speed the Internet’s transition away from fossil fuels by 2030. As part of this vision, we conducted the project A Carbon-Aware Internet with support from the RIPE NCC Community Projects Fund in 2022.

Using real-time data about electricity around the world, we annotated network connections with carbon-intensity. With this information, any digital infrastructure provider can move their compute workloads to greener regions.

Why does this matter? Several big cloud providers currently offer this service — but only for their products. We believe that the tools to simplify and incentivise a green Internet should be available to everyone. Our work is open source, and we are dedicated to open practices and an open, green Internet for all.

Spotlight: CO2.js

CO2.js is an open-source JavaScript library that enables developers to estimate the emissions related to use of their apps, websites, and software.

  • In 2023, Mozilla introduced carbon emissions estimates into its developer tooling. This case study explores how the Mozilla team and Green Web Foundation members made this possible using CO2.js.
  • Step CI is a testing and monitoring tool for APIs. In this case study, we look at how they introduced carbon emissions estimates using CO2.js.
  • Ecograder is one of the pioneering tools when it comes to estimating website carbon emissions. In this case study we look at the Ecograder story, and how CO2.js helped with its most recent update.

Action and results

Here’s what we learned and did thanks to the RIPE NCC Community Projects Fund:

Creation and publication of open data about carbon intensity

We partnered with two organisations to create an open dataset of carbon intensity. This data is needed so that Internet networking nodes can be annotated with carbon footprint figures per megabit transferred.

  • We partnered with Ember Climate to use their free carbon intensity data. There are two main approaches for measuring the carbon intensity of electricity – marginal and average.
  • We lobbied the United Nations Framework Convention on Climate Change (UNFCCC) to release their carbon intensity data, under a similarly permissive licence. Both sets of data are yearly figures, but they can be useful when making carbon estimates based on energy usage in different scenarios, and are used by different emerging standards.
  • We combined those two data sources – Ember Climate and UNFCCC – into open source libraries written in golang (grid-intensity-go), and javascript (CO2.js). Packaging this data in an easily reusable form allowed it to be easily republished and re-used, and now this data in CSV, and JSON is served from a number of CDNs globally. We published a release guide about the data set as well, helping developers make sense of this terminology.

Reference implementations that use this data and annotations to expose useful API and patterns in carbon-aware web development and design

The carbon intensity data from above enabled us to build examples of tools for carbon-aware routing and scheduling. We incorporated these annotations into user documentation and exemplary use cases in web development and design, building on our experience in making carbon-responsive websites.

We released the code openly on Github and further demonstrated carbon intensity in web development and design on Branch, an Ars Electronica award winning magazine as well as with leading WordPress developers. With the funding from the RIPE NCC Community Projects Fund, we created the following reference implementations:

  • Creation of the Grid Intensity CLI tool. This tool aims to make global carbon intensity data more accessible to developers. By doing so, developers can be better informed to make decisions about where and/or when to run their code. We published information about this project on our website, and we also wrote an intro blog post about the tool.
  • Introduction of grid intensity data into CO2.js package API. The CO2.js API, which is a second use case for the CO2.js packages API, aims to empower developers to easily access country-level data on carbon intensity for integration into their own calculations. Developers can choose between country-level average or marginal grid intensity data. We published a quick start guide, in which we explain the new use case in the section “Using Grid Intensity Data”.
  • IP to CO2 Intensity API. The IP to CO2 Intensity API allows you to query an IP address, and return the average annual grid intensity based on its real-world location. The Greencheck API provides endpoints that allow developers to query The Green Web Foundation’s dataset of green domains.

Integration into existing projects with partners

We convened and supported a community of digital infrastructure partners, including the RIPE community and members of the Green Web Foundation, to understand the potential of these annotations and in implementing them in their services.

  • We partnered with KDE to explore how to build carbon awareness into the linux operating system in a hackday. After prototyping with the library we identified where we would make the change, and we are now working together with the goal of merging this work back upstream into Debian once it’s in KDE, as a proof of concept. Because Debian is the underlying distribution for a significant majority of Linux distributions, making a change here means we would be able to make the new features available to every downstream provider.
  • And we also worked within the Kubernetes ecosystem, to identify where to build carbon awareness here, and identified the autoscalers as a key area. We have been working with the team on Keda core, one of the most popular software libraries for scheduling computing jobs, and a RabbitMQ autoscaling extension is now being developed using our library. We incorporated feedback and iterated on the offering to improve its usefulness and impact. Finally, we wanted to ensure that the developer documentation is open and accessible to everyone, which is why we published the entire documentation (on the grid intensity tool and the CO2.js package) on GitHub and on our own Developer website. The CO2.js package documentation was bookmarked by 140 users within the first twenty days after the release.
  • Additionally, we are members of larger Green Software Foundation, we were launch partners, and judges in Carbon Hack 2022 a hackathon focussed entirely around the concept of carbon aware digital services as we have been promoting. Partnering with them helped increase the reach of the work we did – a combined prize pot of 100,00 USD in prize money, and more than 400 developers entered. These ideas have now made it into the work of the Green Software Pattern Library and training materials, and we are in conversations with the Green Software Foundation about using the data we produced as the default dataset into the C# software libraries they publish.
  • Later in the year, the dataset we created formed the basis for a submission we made with the University of Rome for a new academic paper detailing how to extend the IPv6 protocol for carbon awareness. Together, we have submitted a position paper based on the dataset as a joint application for a coming workshop on the environmental impact of Internet applications and systems by the Internet Architecture Board (IAB). This would not have happened without us presenting work in progress of the project at RIPE84 during one of the keynotes.

Thanks to the RIPE NCC Community Projects Fund, carbon intensity data is now published in an open and accessible format to all digital infrastructure providers – a huge win!

If you’d like to learn more about this work, get in touch with us at the Green Web Foundation!