For a flex environment service, would it be possible to create a script that calls the Admin API patch call to update the minimum number of instances at certain times of day (via a cron job or something)?
The use case for this is that I know when my traffic will roughly spike by a lot at a given time of day and if I wait for the autoscaler to scale up instances, the latency of my requests will be too high since flex instances take minutes to scale up and I need to finish processing any given request within a minute (internal requirement). I would be setting the minimum instances to handle the average expected load at any given hour. It would slightly inefficient if the load is less than expected, but I would be able to fulfill processing requirements for the majority of incoming requests without having to set a high minimum number of instances all day.
Is this possible to dynamically update the autoscaling settings? or is there a better way of going about this?