---
title: "Tech Tip #36: Let quiet services scale to zero"
description: "Why run a service all night for zero requests?"
url: https://greencode.ai/tech-tips/36-scale-to-zero/
---

# Tech Tip #36: Let quiet services scale to zero

**Why run a service all night for zero requests?**

[Watch the video](https://media.greencode.ai/shorts/scale-to-zero-863aa01f2ae8.mp4)

Video created by [explainapaper.com](https://explainapaper.com/?utm_source=greencode.ai&utm_medium=film&utm_campaign=made-by)

### The problem

Services with bursty or office-hours traffic run at full size around the clock because autoscaling was never set up, or has a minimum of several replicas.

### The fix you can use today

- Add autoscaling matched to demand instead of static provisioning.
- Use event-driven scaling (for example KEDA) to scale idle workloads to zero.
- Measure cold-start cost and keep one warm replica only where latency needs it.

### Tools that help

- [GreenCode Constitution skill](https://greencode-constitution.org/?utm_source=greencode.ai&utm_medium=referral&utm_campaign=greencode) (GreenCode researchers): open-source energy principles and a catalogue of 37 energy anti-patterns that an AI coding agent can follow to find and fix waste like this
- [KEDA](https://keda.sh/?utm_source=greencode.ai&utm_medium=referral&utm_campaign=greencode): event-driven autoscaling for Kubernetes, including scaling a workload to zero when there is nothing to do
- [Kepler](https://github.com/sustainable-computing-io/kepler?utm_source=greencode.ai&utm_medium=referral&utm_campaign=greencode): exports energy estimates per pod and container on Kubernetes, using eBPF and hardware counters

### How GreenCode helps

GreenCode helps tackle this by mapping a running estate, including services that barely run at all. It rebuilds the estate as infrastructure as code and attributes energy and CO2e to the services that cause it. [More on this](https://greencode.ai/feature/infrastructure-carbon-footprint-assessment/).

### Tags

#kubernetes#autoscaling#serverless#idle

### Sources

- [GreenCode Constitution skill, energy anti-patterns: H7 static provisioning: implement auto-scaling matched to demand](https://greencode-constitution.org/skill.md?utm_source=greencode.ai&utm_medium=referral&utm_campaign=greencode)
- [GreenCode State of the Art Review, D2.1 (2025), PDF p. 42: Kubernetes Horizontal Pod Autoscaler reduces waste by matching resources to demand](https://greencode.ai/publications/d2-1-state-of-the-art-review/)
- [Green Software Foundation, Green Software Patterns: Scale down Kubernetes workloads](https://github.com/Green-Software-Foundation/patterns/blob/main/docs/operations/capacity-management/scale-down-kubernetes-workloads.md?utm_source=greencode.ai&utm_medium=referral&utm_campaign=greencode)
- [Green Software Foundation, Green Software Patterns: Use serverless cloud services](https://github.com/Green-Software-Foundation/patterns/blob/main/docs/architecture/technology-selection/use-serverless.md?utm_source=greencode.ai&utm_medium=referral&utm_campaign=greencode)
- [Green Software Foundation, Green Software Patterns: scale Kubernetes workloads on demand metrics (KEDA)](https://github.com/Green-Software-Foundation/patterns/blob/main/docs/operations/capacity-management/scale-kubernetes-workloads-based-on-events.md?utm_source=greencode.ai&utm_medium=referral&utm_campaign=greencode)
- [KEDA (CNCF), Scaling deployments: scale to zero when there is no work](https://keda.sh/docs/2.17/concepts/scaling-deployments/?utm_source=greencode.ai&utm_medium=referral&utm_campaign=greencode)

[All GreenCode Tech Tips](https://greencode.ai/tech-tips/)

#### Key Facts

- Tip **#36**
- For **Ops and infrastructure**
- Category **Containers, Kubernetes and serverless**
- Format **short video**
![GreenCode](https://greencode.ai/wp-content/uploads/2024/12/greencode-logo-website-small-colours-2.webp)

Want this checked on your own system? Talk to the GreenCode team.

[Get in touch](https://greencode.ai/contact/)
