Issue with Standard environment(Node.js) automatic scaling

109 views
Skip to first unread message

Nikitha Kamath

unread,
Nov 5, 2018, 8:38:54 AM11/5/18
to Google App Engine

Hi,

A Node.js application is deployed in App engine standard environment. In the app.yaml, automatic scaling is chosen with values given below. However, when using 'gcloud app deploy', it gives this error : Unexpected attribute 'target_throughput_utilization' for object of type AutomaticScaling.What is the solution for this? Are we missing some values in app.yaml? Also when there are no incoming requests, the number of instances is always 2 instead of 0. Why is that?

Thank you.

runtime: nodejs8
instance_class: F2
automatic_scaling:
max_concurrent_requests: 10
target_throughput_utilization: 0.8
handlers:
- url: /.*
secure: always
redirect_http_response_code: 301
script: auto

Katayoon (Cloud Platform Support)

unread,
Nov 5, 2018, 11:04:45 PM11/5/18
to Google App Engine
Hi Nikitha,

I tried to reproduce the issue by following this quickstart and using your App.yaml file, but it works fine for me. If the issue still persists, I recommend to report it to the Issue Tracker and provide us with the steps you are taking to reproduce it. We also need the REDACTED output of the "gcloud app deploy --verbosity debug" command and "gcloud info --anonymize" command to dig into the issue.

I should add that an instance of an auto-scaled service is always running. You may take a look at Scaling dynamic instances to get a good grasp of how App Engine scales up dynamic instances. You may tune the parameters for scaling if you would like to put a limit on autoscaling.


Nikitha Kamath

unread,
Nov 10, 2018, 7:25:12 PM11/10/18
to Google App Engine
Thank you. This issue have been reported in Issue tracker.

With the below scaling parameters, when will a new instance get spawned? I mean will it depend on concurrent requests or CPU utilization or pending latency or any other metrics?

instance_class: F2
automatic_scaling:
max_concurrent_requests: 10
  max_idle_instances: 1
max_pending_latency: 300ms
min_idle_instances: 0
min_pending_latency: 30ms

Dan S (Cloud Platform Support)

unread,
Nov 14, 2018, 12:51:28 PM11/14/18
to Google App Engine

Hello,


Your instance will be scaled depending on the parameter limits first reached.

If you have 5 concurrent requests, but reached the Max_pending_latency parameter, for example, then the instance will be scaled. Also, there are some standard values that can spawn your instances[1].


[1] https://cloud.google.com/appengine/docs/standard/nodejs/config/appref


Henry Pan

unread,
Nov 14, 2018, 1:45:57 PM11/14/18
to Google App Engine
Saluting Dan from Sunnyvale,

Would you please also advice whether the instance will scale better in GKE ?

Thanks in advance

Henry Pan

Nikitha Kamath

unread,
Nov 14, 2018, 11:29:50 PM11/14/18
to Google App Engine
Thank you Dan.

Any suggestion on the parameter values that should be set for automatic scaling?


On Monday, November 5, 2018 at 7:08:54 PM UTC+5:30, Nikitha Kamath wrote:

Jorge A (Google Cloud Support)

unread,
Nov 16, 2018, 5:00:01 PM11/16/18
to Google App Engine
The parameter values depend on your app as there's no catch-all answer for this. You have to get a feel for it and see; if it's creating too many instances, you might want to upgrade the type of instances or keep more idle instances. If you see that the instances can't catch up with a traffic spike, you might want to have a lower threshold of max requests per instance to start another instance before the existing ones are at capacity. Ultimately, you're the one that can monitor and adapt scaling to the needs of your app and traffic.

Nikitha Kamath

unread,
Nov 17, 2018, 6:25:56 AM11/17/18
to Google App Engine
Thank you Jorge.


On Monday, November 5, 2018 at 7:08:54 PM UTC+5:30, Nikitha Kamath wrote:
Reply all
Reply to author
Forward
0 new messages