I am using google app engine with nodejs.
I want to limit the number of instances used by app engine.
I have tried app.yaml before deploying with gcloud cli but I think it doesn't work...
I have set app.yaml file like following
runtime: nodejs
vm: true
automatic_scaling:
min_num_instances: 1
max_num_instances: 3
cool_down_period_sec: 120 # default value
cpu_utilization:
target_utilization: 0.7
But its using 8 instances still at this moment.
How can I decrease the number of instances and control them?
After running gcloud app versions list
,
SERVICE VERSION TRAFFIC_SPLIT LAST_DEPLOYED SERVING_STATUS
default 20160811t015921 0.00 2016-08-11T02:03:24+09:00 SERVING
default 20160811t022251 0.00 2016-08-11T02:26:20+09:00 SERVING
default 20160811t023404 0.00 2016-08-11T02:36:45+09:00 STOPPED
default 20160811t031525 0.00 2016-08-11T03:17:48+09:00 STOPPED
default 20160811t053241 0.00 2016-08-11T05:35:19+09:00 STOPPED
default 20160817t191913 0.00 2016-08-17T19:21:46+09:00 STOPPED
default 20160817t220352 0.00 2016-08-17T22:06:17+09:00 STOPPED
default 20160818t171126 0.00 2016-08-18T17:14:07+09:00 STOPPED
default 20160820t000714 0.00 2016-08-20T00:10:16+09:00 STOPPED
default 20160820t033731 0.00 2016-08-20T03:39:45+09:00 STOPPED
default 20160821t023159 0.00 2016-08-21T02:34:05+09:00 STOPPED
default 20160821t025235 1.00 2016-08-21T02:55:13+09:00 SERVING
And after running gcloud app instances list
,
SERVICE VERSION ID VM_STATUS DEBUG_MODE
default 20160811t015921 0 RUNNING
default 20160811t015921 1 RUNNING
default 20160811t022251 0 RUNNING
default 20160811t022251 1 RUNNING
default 20160811t022251 2 RUNNING
default 20160811t022251 3 RUNNING
default 20160811t022251 4 RUNNING
default 20160821t025235 0 RUNNING YES
comes out.