Problem: Now, there is a single cpu-target and mem-target level defined both for scaling up and scaling down. This makes it so that on steady load, number of servers can oscillate.
Example:
Let's say the pool has one server, cpu target is set to 80% and the real cpu load grows to 82%. Then a new server is started if not stopped by max-instances. The load will then be separated between the two servers and each of them will have around 41% load. That is below the cpu target, so the pool will scale down from two to one instance. Then that server has to do all the work and the cpu usage goes to 82% and a new server will start. This will result in a oscillating number of servers.
Possible solution:
Make it possible to configure separate targets for scaling up and down.