Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create balancing-efficiency-and-quality-with-ondemand-environments.md #318

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Balancing Efficiency and Quality with On-Demand Environments

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Titles should be in sentence casing.

Suggested change
# Balancing Efficiency and Quality with On-Demand Environments
# Balancing efficiency and quality with on-demand environments


## Description

Modern applications often rely on multiple environments during development and deployment. A typical workflow involves a development environment for coding, a staging or testing environment for quality assurance (QA), and finally, a production environment for live users.

While each additional environment provides valuable functionality, it also increases energy consumption and contributes to greenhouse gas emissions.
Therefore, it's crucial to find a balance between development efficiency and environmental impact.

## Solution

While minimizing deployed environments saves energy by reducing resource provisioning, some environments are crucial for maintaining application quality.
Bugs in production can lead to high energy consumption due to failed requests.
Instead of eliminating development and user acceptance testing (UAT) environments entirely, consider an on-demand approach.
These environments could spin up automatically when needed and shut down after a set period of inactivity (e.g., 2 hours after last access).
This reduces energy use while still providing the necessary testing grounds to catch bugs before they impact production.

In order to be generally used, this solution should be provided through a simple configuration from cloud providers leveraging IaC files.

## SCI Impact

`SCI = (E * I) + M per R`
[Software Carbon Intensity Spec](https://grnsft.org/sci)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just realized that this link is no longer working(need to change for other patterns aswell)? can we point this to https://sci.greensoftware.foundation/

Suggested change
[Software Carbon Intensity Spec](https://grnsft.org/sci)
[Software Carbon Intensity Spec](https://sci.greensoftware.foundation)


Reducing the amount of deployed environments will impact SCI as follows:

- `E`: We reduce the total electricity required by reducing provisioned resources when not used.
- `M`: By reducing the amount of VMs running on underlying machines, the total embodied carbon can be lowered as CSPs might be careful in investing only in HWs to follow the demand.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `M`: By reducing the amount of VMs running on underlying machines, the total embodied carbon can be lowered as CSPs might be careful in investing only in HWs to follow the demand.
- `M`: By reducing the number of virtual machines running on underlying hardware, customer service providers (CSPs) can lower the total embodied carbon as they should now invest only in hardware that aligns with demand.


## Assumptions
An environment is not required to be up and running within the next seconds any time in the day or night.

## Considerations
Spinning up an environment might take time. This might be a drawbac.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Spinning up an environment might take time. This might be a drawbac.
Spinning up an environment might take time. This might be a drawback.


The advantage is that developers validate the deployment of an environment from scratch each time they need to test.

## References

- [Energy Efficiency Principle](https://learn.greensoftware.foundation/practitioner/energy-efficiency)
- [Hardware Efficiency Principle](https://learn.greensoftware.foundation/practitioner/hardware-efficiency/)