The electricity that powers the computers on which code is run comes from a variety of sources – renewable, low-carbon, and fossil fuel based. We call this the fuel mix. And it’s this fuel mix that can influence the carbon intensity of code.
The Grid Intensity CLI 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.
What is the Grid Intensity CLI?
It is a tool that enables developers and operations teams to surface, monitor, and understand the carbon intensity of the code they run.
Why use it?
The fuel mix will be different depending when and where you run your code. Because of this, you can influence the carbon intensity of the code you write by moving it through time and space.
Moving through time
Sometime code needs to be run in a particular region. In these instances, developers can use grid information to identify periods of low carbon intensity. These are times when more green or renewable electricity is in the fuel mix. Scheduled jobs or heavy computational tasks can then be run during these times, making them less carbon intensive.
Moving through space
Increasingly, code is deployed to multiple regions around the world. In this scenario, developers can use the Grid Intensity CLI to easily consolidate carbon intensity data for different regions into a single dashboard or dataset.
With this information at hand, they can look for ways to run code in locations with a greener fuel mix. This can be extended to smarter, carbon-aware routing so that more requests are directed to code running in regions with a lower carbon intensity.
How to use it
To get started using our Grid Intensity CLI, refer to our developer documentation.
If you’d like to view our open source repo, you can see it in GitHub.
The above are just a few examples of the many and varied ways the Grid Intensity CLI can be used. If you’re using the Grid Intensity CLI in production we’d love to hear how! Drop us a line.