Earlier this year, I worked with a group of googlers on publishing carbon characteristics of Google Cloud datacenters. Our main goal is to help customers take carbon information into consideration when selecting a location for their workloads.
But this adds one extra dimension to the already complex region selection process: customers need to compare carbon impact, price and latency. This basically means they have to solve for a 3 dimensional optimization problem, with information scattered in many different places.
So I built a very simple webapp to help: It has 3 sliders (carbon, price, latency) to pick how important each parameter is. The tool then sorts Google Cloud regions based on these criteria.
See it in action:
What data is used?
The app is only using publicly available data:
- Carbon impact is approximated using the yearly carbon free energy percentage and average electricity carbon intensity of the region (source)
- Price is using Google Compute Engine price as a proxy, copied manually for now.
- Latency is using physical distance between selected countries and the location of the region, which is not ideal considering network topology is not connecting all countries with straight lines, but good enough for basic results. Using latency measured from the client and/or a latency matrix captured from varisu places in the world would be good improvements.
How does it work?
I heavily use the <details> HTML tag in order to provide a toggle behavior that is accessible and not using any JS. I am also using a <select> HTML element with the multiple attribute, which nicely adapts to desktop and mobile OSes.
I decided to use Firebase Hosting to host the static web app because it comes with server-side logging and metrics, which, in addition to being a great solution for static hosting, allows to measure pageviews without using any client side tracker.
Open the web app at https://gcp-region-picker.web.app
I hope you will find it useful when picking where to deploy your next workload.
Report issues or contribute on GitHub.
Or simply use it below: