-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #311 from Green-Software-Foundation/dev
Publish 6 new Patterns
- Loading branch information
Showing
6 changed files
with
243 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
version: 1.0 | ||
submitted_by: franziska-warncke | ||
published_date: 2024-03-14 | ||
category: cloud | ||
tags: | ||
- cloud | ||
- size:medium | ||
--- | ||
|
||
# Compress stored data | ||
|
||
## Description | ||
|
||
Storing too much uncompressed data can result in bandwidth waste and increase the storage capacity requirements. | ||
|
||
## Solution | ||
|
||
Using the right compression tool for each use case reduces the storage requirements. This includes both the capacity and required bandwidth to write or retrieve data. | ||
|
||
## SCI Impact | ||
|
||
`SCI = (E * I) + M per R` | ||
[Software Carbon Intensity Spec](https://grnsft.org/sci) | ||
|
||
Using compression when storing data impacts SCI as follows: | ||
|
||
- `E`: Decreasing the amount of storage means less energy is consumed for the storage. However, compressing and de-compressing data may also cause a slight increase in energy consumed. | ||
- `M`: Decreasing the amount of storage means there is less embodied carbon emitted. | ||
|
||
## Assumptions | ||
- You have the ability to choose whether you use compression or not. This is not the case if you store a lot of data, as compression is needed to keep storage costs reasonable. In the same way, if you have a limited amount of storage space, you will be forced to use a high compression (even when a high CPU is required). | ||
|
||
## Considerations | ||
- The benefit of compression should always be considered in terms of the trade-off with the increased carbon cost of the resources (e.g. CPU, RAM) needed to perform the compression/decompression. | ||
|
||
## References | ||
- [Microsoft Azure Well-Architected Framework](https://learn.microsoft.com/en-us/azure/well-architected/sustainability/sustainability-storage#enable-storage-compression) |
40 changes: 40 additions & 0 deletions
40
docs/catalog/cloud/containerize-your-workload-where-applicable.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
version: 1.0 | ||
submitted_by: yelghali | ||
published_date: 2024-03-14 | ||
category: cloud | ||
tags: | ||
- cloud | ||
- compute | ||
- kubernetes | ||
- role:cloud-engineer | ||
- size:medium | ||
--- | ||
|
||
# Containerize your workloads | ||
|
||
## Description | ||
Containers allow resources to be used more flexibly, as workloads can be easily moved between machines. Containers allow for bin packing and require less compute resources than virtual machines, meaning a reduction in unnecessary resource allocation and an increase in utilization of the compute resources. | ||
|
||
## Solution | ||
Containerize your applications with their minimal dependencies. This can be done using tools for generating Dockerfiles and Kubernetes manifests. | ||
|
||
## SCI Impact | ||
`SCI = (E * I) + M per R` | ||
[Software Carbon Intensity Spec](https://grnsft.org/sci) | ||
|
||
Containerizing workloads impacts SCI as follows: | ||
|
||
- `E`: By reducing CPU and RAM usage, we reduce the amount of energy required. | ||
- `M`: Reducing compute resources decreases the embodied carbon emissions. | ||
|
||
## Assumptions | ||
- The application supports containerization. | ||
|
||
## Considerations | ||
- Using containers may not be enough to reduce the carbon impact of a large monolith application. | ||
- Consider modernizing your applications into micro-service architectures that allow independent sizing and scaling of their logical components. | ||
- You may use a container orchestration system for automating software deployment, scaling, and management. | ||
|
||
## References | ||
Microsoft Azure Well Architected Framework [sustainability patterns](https://learn.microsoft.com/en-us/azure/architecture/framework/sustainability/sustainability-application-platform) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
version: 1.0 | ||
submitted_by: yelghali | ||
published_date: 2024-03-14 | ||
category: cloud | ||
tags: | ||
- cloud | ||
- security | ||
- network | ||
- kubernetes | ||
- role:cloud-engineer | ||
- size:medium | ||
--- | ||
|
||
# Use a service mesh only if needed | ||
|
||
## Description | ||
A service mesh deploys additional containers for communication, typically in a sidecar pattern, to provide more operational capabilities. This can result in an increase in CPU usage and network traffic but also allows you to decouple your application from these capabilities, moving them out from the application layer and down to the infrastructure layer. | ||
|
||
## Solution | ||
Use a service mesh if your application lacks features that can be added one by one, such as distributed tracing or traffic encryption. However, use it for required applications only, and not the entire platform. | ||
|
||
## SCI Impact | ||
`SCI = (E * I) + M per R` | ||
[Software Carbon Intensity Spec](https://grnsft.org/sci) | ||
|
||
Not using a service mesh impacts SCI as follows: | ||
|
||
- `E`: By reducing CPU usage and network traffic, we reduce the amount of energy required. | ||
- `M`: reducing CPU usage and network data reduces the amount of resources required, which decreases the embodied carbon emissions. | ||
|
||
## Assumptions | ||
The application does not have compliance requirements for using a service mesh. | ||
|
||
## Considerations | ||
Consider alternative methods outside of an service mesh to fulfill application requirements, for example custom DNS servers or a configuration that is injected into the application |
39 changes: 39 additions & 0 deletions
39
docs/catalog/cloud/scale-logical-components-independently.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
version: 1.0 | ||
submitted_by: yelghali | ||
published_date: 2024-03-14 | ||
category: cloud | ||
tags: | ||
- compute | ||
- cloud | ||
- kubernetes | ||
- role:software-engineer | ||
- role:cloud-engineer | ||
- size:medium | ||
--- | ||
|
||
# Scale logical components independently | ||
|
||
## Description | ||
A microservice architecture may reduce the amount of compute resources required as it allows each independent component to be scaled according to its own demand. | ||
|
||
## Solution | ||
|
||
Using cloud native projects can help you separate your application functionality into different microservices. This kind of microservice architecture allows for independent scaling of the application's logical components. | ||
|
||
## SCI Impact | ||
`SCI = (E * I) + M per R` | ||
[Software Carbon Intensity Spec](https://grnsft.org/sci) | ||
|
||
Scaling logical components independently will impact SCI as follows: | ||
|
||
- `E`: By optimizing the scaling of the most consuming application components, we reduce the amount of energy consumed by the application globally. | ||
- `M`: By scaling each component independently, we can right-size its resources to maximize their utilization, thereby reducing the application's total embodied carbon emissions. | ||
|
||
## Assumptions | ||
|
||
- The application's logical components are deployed on platforms with auto-scaling capabilities, such as Kubernetes. | ||
|
||
## Considerations | ||
- Microservice frameworks use additional components or resources in order to provide additional capabilities (messaging, secure traffic, tracing, etc.). This may result in an increase in carbon emissions. As such, only the necessary framework capabilities should be used. | ||
- Communication incurs overheads, which also have a carbon impact. As such, microservices should not be made too small. Alternatively, communication tools other than http/s should be considered, such as GPRC. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
version: 1.0 | ||
submitted_by: markus-ntt-seidl | ||
published_date: 2024-03-14 | ||
category: cloud | ||
description: Distributed denial of service (DDoS) attacks are used to increase the server load so that it is unable to respond to any legitimate requests. This is usually done to harm the owner of the service or hardware. | ||
tags: | ||
- cloud | ||
- size:small | ||
--- | ||
|
||
# Use DDoS protection | ||
|
||
## Description | ||
|
||
Distributed denial of service (DDoS) attacks are used to increase the server load so that it is unable to respond to any legitimate requests. This is usually done to harm the owner of the service or hardware. | ||
Due to the nature of attack, a lot of environmental resources are used up by nonsensical requests. | ||
|
||
## Solution | ||
|
||
All cloud providers have some form of DDoS protection (AWS Shield, Azure DDoS Protection, GCP DDoS Protection, CloudFlare, etc.) that can prevent those attacks. | ||
|
||
## SCI Impact | ||
|
||
`SCI = (E * I) + M per R` | ||
[Software Carbon Intensity Spec](https://grnsft.org/sci) | ||
|
||
DDoS protection impacts the SCI as follows: | ||
|
||
- `R`: The functional unit is impacted because the amount of requests will be reduced. | ||
|
||
## Assumptions | ||
|
||
- There is budget for the DDoS protection service. | ||
|
||
## Considerations | ||
|
||
- Consider purchasing advanced protection to be fully protected against other attack patterns similar to DDoS attacks. | ||
|
||
## References | ||
|
||
- [Azure Well-Architected Framework Sustainability Pillar](https://learn.microsoft.com/en-us/azure/architecture/framework/sustainability/sustainability-application-design) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
version: 1.0 | ||
submitted_by: yelghali | ||
published_date: 2024-03-14 | ||
category: cloud | ||
tags: | ||
- cloud | ||
- compute | ||
- kubernetes | ||
- role:software-engineer | ||
- role:cloud-engineer | ||
- size:medium | ||
--- | ||
|
||
# Use cloud native processor VMs | ||
|
||
## Description | ||
|
||
Cloud virtual machines come with different capabilities based on different hardware processors. As such, using virtual machines based on the efficiency of their processors would impact hardware efficiency and reduce carbon emissions. | ||
|
||
|
||
## Solution | ||
|
||
Using new cloud virtual machines that have been engineered with [cloud native processors](https://www.forbes.com/sites/davealtavilla/2022/10/13/amperes-efficient-128-core-cloud-native-processor-builds-momentum-in-sustainable-data-centers/) allows you to efficiently run scale-out, cloud-native workloads and consume energy efficiently. | ||
|
||
|
||
## SCI Impact | ||
`SCI = (E * I) + M per R` | ||
[Software Carbon Intensity Spec](https://grnsft.org/sci) | ||
|
||
Using energy efficient hardware impacts SCI as follows: | ||
|
||
- `E`: By using energy efficient hardware, we reduce the total embodied carbon emissions. | ||
- `M`: By using energy efficient hardware, we also reduce the embodied emissions. | ||
|
||
## Assumptions | ||
|
||
The cloud provider offers VM SKUs based on efficient hardware. | ||
|
||
|
||
## Considerations | ||
|
||
Energy efficient VMs tend to be cost effective as well. However, you should consider SKU availability in the region you choose for deployment: | ||
|
||
- Azure: https://azure.microsoft.com/en-us/blog/azure-virtual-machines-with-ampere-altra-arm-based-processors-generally-available/ | ||
- Google: https://cloud.google.com/blog/products/compute/tau-t2a-is-first-compute-engine-vm-on-an-arm-chip | ||
|