This is what I put in the app.yaml
file:
runtime: java8
service: 'scheduler'
inbound_services:
- warmup
derived_file_type:
- java_precompiled
threadsafe: True
auto_id_policy: default
api_version: '1.0'
handlers:
- url: (/.*)
static_files: __static__\1
upload: __NOT_USED__
require_matching_file: True
login: optional
secure: optional
- url: /
script: unused
login: optional
secure: optional
- url: /.*/
script: unused
login: optional
secure: optional
- url: /_ah/.*
script: unused
login: optional
secure: optional
- url: /cron/v1/simulations
script: unused
login: optional
secure: optional
resources:
cpu: 1
memory_gb: 1
disk_size_gb: 1
volumes:
- name: ramdisk1
volume_type: tmpfs
size_gb: 0.5
automatic_scaling:
min_num_instances: 1
max_num_instances: 2
cool_down_period_sec: 180
cpu_utilization:
target_utilization: 0.6
And when it's deployed, on GCP its config looks like this:
runtime: java8
api_version: '1.0'
env: standard
threadsafe: true
instance_class: F1
inbound_services:
- warmup
handlers:
- url: '(/.*)'
application_readable: false
static_files: "__static__\\1"
require_matching_file: true
upload: __NOT_USED__
- url: /
script: unused
- url: '/.*/'
script: unused
- url: '/_ah/.*'
script: unused
- url: /cron/v1/simulations
script: unused
automatic_scaling:
min_idle_instances: automatic
max_idle_instances: automatic
min_pending_latency: automatic
max_pending_latency: automatic
And here's a screenshot of the result:
I did try changing min_num_instances: 1
and max_num_instances: 2
to min_idle_instances: 1
max_idle_instances: 2
, with no different result.
It's creating way more instances than I need, and the billing sum has gone up threefold since I noticed these changes. Very confusing.
resources
, for example) in your standard envapp.yaml
. At best they will be just ignored. This might be of help: stackoverflow.com/q/45842772/4495081