How does Google App Engine Autoscaling work?

血红的双手。 提交于 2020-01-10 04:01:05

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/40924353/how-does-google-app-engine-autoscaling-work

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!