How to prewarm always on cloud run instances when deploying new revisions
We have multiple cloud run services which have rust code running in it to serve small web APIs. There is load at any given point of time but it varies by the time of the day.
Whenever we deploy a new revision by default the traffic is migrated to the service almost immediately. This leads to some issues related to latency and load.
The minimum instance field we have is generally set to 1 in all services so as to avoid forgetting about services with less load consuming more instances.
I want to change the deployment behavior such that I can set some minimum instance(around the same number of instance already being used for revision with traffic at that time) for a revision for initial 10 minutes and migrate the traffic once the instances are available instead of the other way around of increasing traffic and instances scaling by gcp logic.
We are yet to try the gradual ramp up, but I was looking for better solution of at least having specific number of instances beforehand.