This question is about Google App Engine quotas and instances.
I deployed a GAE app without specifying any specific scaling algo. From their docs, it seems like the default is auto-scaling.
So when do they scale the app to another instance, i.e. when exactly does a new instance spawn? What request/s causes the second instance to get started and traffic to be split?
Actually it is fairly well explained.
From Scaling dynamic instances:
The App Engine scheduler decides whether to serve each new request with an existing instance (either one that is idle or accepts concurrent requests), put the request in a pending request queue, or start a new instance for that request. The decision takes into account the number of available instances, how quickly your application has been serving requests (its latency), and how long it takes to spin up a new instance.
Each instance has its own queue for incoming requests. App Engine monitors the number of requests waiting in each instance's queue. If App Engine detects that queues for an application are getting too long due to increased load, it automatically creates a new instance of the application to handle that load.
It is possible to tune the parameters for autoscaling, see Change auto scaling performance settings and Scaling elements
If you really want to put a hard limit on the number of instances you'll probably have to use basic scaling with a max_instances
config or manual scaling.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With