Sustainable Systems: Architectural Choices and Sustainability
Green Software Foundation
Creating a trusted ecosystem of people, standards, tooling and best practices for building green software
Architecting for minimal carbon is about improving how software is designed.
The most efficient code is no code at all, and the best time to spot unnecessary work is as early as possible in the design process.
As we discussed in the first part of this series, at the end of 2021, AWS added sustainability to the well-architected pillars that define their “key concepts, design principles, and architectural best practices for designing and running workloads in the cloud.” A year earlier, Azure had posted their sustainable architecture guide, written by our own GSF chair, Asim Hussain. Their cloud recommendations are covered in a new whitepaper on sustainable architecture for the cloud from the Coed:Ethics community in London, which the GSF is closely connected to.
What it Means for Us
In the first article, we outlined the four main approaches to tech sustainability:
In this post we will focus on the second, how to improve the way your software is designed.
What is Green Software?
Sustainable or green software is designed and coded to require less power and fewer machines to perform the same tasks. This is also known as carbon efficiency. It also aims to draw power at times and in places where the available electricity is from low carbon sources like wind, solar, geothermal, hydro, or nuclear. This is called carbon awareness and is a fundamental concept of sustainable computing.???
Architecting for Minimum Carbon
Software applications can be designed in ways that are more carbon aware and energy efficient, and some architectures are easier to run at low or zero carbon than others.?
Carbon Awareness
This is all about running on carbon free electricity (CFE), which unless you operate in France (nuclear) or Iceland (geothermal) is likely to be highly variable in its availability. The tech industry, therefore, needs to be flexible in its electricity demand.?
Markers of sustainability
Markers of a good architecture from a sustainable perspective are:
领英推荐
The techniques involved are often referred to as demand shifting or demand shaping. Tools like Microsoft’s Azure Machine Learning resource metrics can help understand the energetic costs of AI workloads across their lifecycle or AWS’ CloudWatch provides similar data. Demand shaping can also mean changing the offering of a service based on the carbon intensity of the electricity currently available on the local grid. In times of 100% carbon-free electricity (CFE), full functionality can be offered. In times of CFE scarcity, service can be gracefully degraded.?
The above often relies on a microservice or a distributed systems architecture.
Johnston states, “In many systems, the only thing that needs to be always on is the interface e.g. the API Gateway or the pub/sub system. Everything else could be rewritten as an event driven system.”
Use Managed Services
There is a real efficiency advantage in high compute density via managed cloud services. Such services, which can share resources between thousands or millions of users, achieve extremely high utilisation.?
Serverless services like Lambda functions or Azure functions are particularly helpful in minimising the hardware footprint needed upfront and helping directly in capabilities like autoscaling, rightsizing, and pay as you go.
Enterprises may sometimes fear data security in these shared environments. However, since these are likely to play a major role in the future of sustainable software, cloud providers need to address these fears.?
Doing Less
The most efficient code is no code at all, and the best time to spot unnecessary work is as early as possible in the design process.
According to Adrian Cockcroft, VP of Sustainable Architecture at AWS, “The biggest win is often changing requirements or SLAs. Reduce retention time for log files. Relax overspecified goals.”?
Sometimes overspecified goals are unavoidable, out of date regulations for example. But, often they are internally driven, rather than in response to external pressures or genuine user needs. If that is the case, drop them until you know you require them.
Conclusion
When it comes to sustainability, architecture matters. An interesting thought experiment is: could you run 90% of your system’s CPU load on a spot instance? How about in a managed service??
What service brownout options are available to you to operate with a lower electricity draw? Could you reduce response time targets or encoding quality? What else? Google is working on how to run fewer machines at times of high carbon electricity. How could you do the same??