Convox Community

Reset scale for all services

Is there a way to reset the scale of all services to what’s specified in Convox.yml?

I discovered that I’m currently waaaay over provisioned for most of my services, and so I scaled each of my services appropriately in convox.yml, then I deployed. But I don’t see the scale of my services changing. What’s the source of truth for a service’s scale? Is there a way to force a reset, so that my services scale according to what I’ve set in the convox.yml?

Your convox.yml specifies the initial scale for the first deployment of your application. Once your application is deployed you can manage your scaling using convox scale

1 Like

I’d love a way to specify that the convox.yml’s scale settings should override the current deployment on a convox deploy

Would you be OK with needing to do a deploy every time you want to change the scale settings?

The thing I like about the current system is it accounts for differences in environments. Hence, I can have the same app deployed on my staging rack at low scale and in prod at high.

That said, if I do some testing on memory limits for a given service, I want to preserve that in my convox.yml with my code so I don’t miss it.

Two ideas from this, perhaps:

  1. A flag to say if a scale setting in convox.yml auto-overrides on deploy (i.e., cpu and memory)
  2. A way to just ‘reset’ all the scale settings on deploy (similar to the new --replace in convox env set)

Perhaps cpu and memory should always be read from config but count should be first-deploy only and adjusted with convox scale thereafter?

1 Like

That’s probably how I’d do it, but I can’t speak for everyone. IDK how autoscaling would fit in.

@ddolar that sounds like a good compromise. It took me a long time, recently to adjust the scale on each one of my services, one by one, and wait for the app to update before I could adjust the next service. Unless there’s a way to specify the scale of multiple services at once on the command line and I just don’t know it?

If you’re talking about multiple services within an app, then you can do convox apps params set WebFormation=... WorkerFormation=...

1 Like

We have CPU and memory scaled down in our pre-production environment because we only have traffic from tests coming through. Open to alternatives but defining CPU and memory in convox.yml wouldn’t work for us.

Defining them in convox.yml would allow for configuring with env vars too, right?

Something like:

    build: .
      cpu: ${WEB_CPU_SCALE}