Your service can't scale down because it remembers too much.
Services that keep sessions and data in memory or on local disk need big instances and can't be removed when traffic falls, so they run at peak size all day.
The Green Software Foundation suggests keeping services stateless, so they can scale down. GreenCode's energy rules for AI coding agents cover this too.
GreenCode helps tackle this by mapping a running estate, rebuilding it as infrastructure as code and showing which services use the energy, including services running hot and services barely running at all. More on this.
Your service cannot scale down, because it remembers too much. Some services keep sessions and data in memory, or on their own disk. So they need big machines. And no copy can be removed when traffic falls. They run at peak size all day, even at night. The Green Software Foundation suggests keeping services stateless, so they can scale down. GreenCode's energy rules for AI coding agents cover this too. Here is the fix you can use today. Move sessions and state into a database or a shared cache. GreenCode's Constitution skill can help AI coding agents spot stateful services. Make every copy the same, so any one can be removed. Then turn on autoscaling, including scaling in, using tools like KEDA. Now your service can shrink when demand does. GreenCode helps tackle this by mapping your running systems and rebuilding them as code. It shows which services use the energy, including ones barely running at all. That was GreenCode Tech Tip number sixty-six. Follow for the next tip, and find more on greencode.ai/tech-tips.
Share this