Journey to greener cloud apps: Deutsche Bahn's optimisation successes with Kubernetes
30X emissions reductions and 4X cost savings could be achievable, says platforms chief Gualter Barbas Baptista
Engineers set great store by metrics. After all, as the old saying goes, if you can't measure it you can't manage it.
But, as Computing' s own research has found, when it comes to their ecological footprint cloud providers tend to keep a lot of the detail to themselves. And that's a big problem because it means that customers are unable to take meaningful decisions about the environmental impact of their IT, at a time when this is increasingly urgent, says Dr Gualter Barbas Baptista, lead consultant for platform strategy and enablement at Germany's national railway operator Deutsche Bahn.
According to the International Energy Agency, in the next three years global electricity consumption is set to rise by 3.4% annually with datacentres playing a significant role in that increase. "We are reaching an exponential consumption phase," Baptista noted. In the absence of meaningful mitigations that's bad news for the planet.
With a background in environmental engineering and a passion for improving developer experience, Baptista has long been concerned about the ecological impact of enterprise IT, and worried that developers do not have the information they need to make a difference.
Deutsche Bahn (DB) is a cloud-first organisation, and as a state-owned business one with strict sustainability, regulatory, performance and financial targets to meet. The company's green transformation programme includes ambitious goals around climate, nature conservation and resource protection, aiming to factor the environment into all decision making.
Unfortunately, though, reliable information about the environmental impact of IT systems, such as applications running in the cloud, is hard to come by. The tools offered by cloud providers (DB uses AWS and Azure) do not provide granular energy usage data at the application level, and the scant information they do supply is often weeks out of date.
"We needed a system that could provide us with accurate and timely information on energy consumption, but we found that the tools available from cloud providers fell short of our sustainability goals" Baptista told Computing at the recent KubeCon event. "This means that you are not able to establish the causal relationship between the actions that you do day-to-day and the effect on emissions."
So, in 2022 Baptista and his colleagues decided to take matters into their own hands, securing support and funding from DB to develop an innovative system to provide real-time application energy consumption data to the company's developers and architects.
The energy monitoring system is based on Kubernetes, the cloud orchestration platform on which many of DB's applications run. It makes use of several open source tools within the Kubernetes ecosystem, including Kepler, which provides real-time energy usage statistics from the underlying hardware; Prometheus, the monitoring and alerting system; and Grafana, the data visualisation solution.
A platform for change
Central to the whole approach is DB's platform strategy. The company's platform engineers provide for the evolving needs of developers, improving their experience by automating compliance, security and resource provisioning, reducing duplication, standardising approaches and having everything in one place. Given the right data there's no reason why "sane defaults" around energy usage and environmental impact cannot be built into the developer experience platform, Baptista explained, for example setting test and dev environments to switch off when no-one is likely to be using them.
More than that, it's about empowering developers to make informed decisions about environmental impact, just as they do around cost management, said Baptista.
"It's crucial that developers understand the energy implications of their work. With the right information, they can make a real difference," Baptista said. "Every team has the potential to contribute to this critical global effort."
Displaying the application energy use information alongside other metrics tracked by developers on the platform is also important, so that it doesn't become just one more dashboard, and to give the the big picture overview essential for making informed decisions.
Big savings down the track
Energy reduction and cost savings go hand in hand, and deployment choices together with management based on real-time information can have a substantial impact on both. Just how substantial is jaw-dropping.
Baptista's admittedly "back of the envelope" calculations comparing an application running on VMs (EC2) versus running the same application in containers on a shared container platform (OpenShift), suggest that four-fold cost reductions and CO2 emissions cuts of a whopping 30 times are eminently possible, thanks to the high container density offered by Kubernetes, and features like vertical pod autoscaling and scheduling. (The difference between the two figures, by the way, is because the cost of the managed services are transfer red to the team.)
"Kubernetes is not just a container orchestration tool. It's much more powerful than that. It's a platform building tool, and it's a green IT tool," he said.
Whether such impressive reductions will be realised at scale remains to be seen - the new energy monitoring system is still being rolled out rolled out at DB - but the journey doesn't end there. The train operator is also taking a stand by incorporating sustainability criteria into its procurement terms for cloud providers.
Baptista believes customer demand can drive cloud providers to offer more sustainable services and said the company intends to use its influence to advocate for greener practices.
"We want our cloud providers to walk the talk when it comes to carbon-neutral computing. It's high time that we, as customers, start demanding more sustainable practices from them," he said.
Sunnier skies ahead? Computing's latest research into the sustainability of cloud service providers finds that while there is still a long way to go, they are at least dialling back on the greenwash and cherrypicking, becoming more transparent about their environmental impact as customers demand better. One CSP in particular has made impressive progress. To find out which, don't miss Penny Horwood's report next week.
You may also like
/news/4338523/tatas-uk-gigafactory-project-takes-major-step-forward
Components
Tata's UK gigafactory project takes major step forward
Sir Robert McAlpine to build multi-billion-pound factory
/podcasts/4333508/national-grid-analogue-digital-ctrl-alt-lead-podcast
Public Sector
National Grid is turning analogue to digital - Ctrl Alt Lead podcast
'We can't do what we've always done, just more efficiently'
/opinion/4332800/peter-cochrane-energy-resources-free
Green
Peter Cochrane: Energy and resources are no longer free
We need new thinking