Dean Michael Berris | 0319809 | 2020-01-09 06:03:36 | [diff] [blame] | 1 | service: upload-processing |
Dean Michael Berris | 0319809 | 2020-01-09 06:03:36 | [diff] [blame] | 2 | |
Jeff Yoon | b5a7784 | 2024-09-05 19:59:43 | [diff] [blame^] | 3 | runtime: python39 |
Alex Sun | f448d5b | 2024-01-27 21:19:26 | [diff] [blame] | 4 | # The default workers number is 1, increase it to improve throughput. |
| 5 | entrypoint: gunicorn -b:$PORT dashboard.dispatcher:APP --workers 8 --worker-class gthread --threads 10 --timeout 300 |
Funing Wang | b8ad917 | 2023-01-30 18:47:45 | [diff] [blame] | 6 | app_engine_apis: true |
Alex Sun | f448d5b | 2024-01-27 21:19:26 | [diff] [blame] | 7 | # 3072MB Memory, 2.4GHz CPU limit, support auto scaling, support 8 workers. |
Alex Sun | dc879db | 2023-02-24 02:13:35 | [diff] [blame] | 8 | instance_class: F4_1G |
Dean Michael Berris | 0319809 | 2020-01-09 06:03:36 | [diff] [blame] | 9 | |
| 10 | automatic_scaling: |
Dean Michael Berris | ba2b567 | 2020-12-09 11:53:06 | [diff] [blame] | 11 | max_instances: 1800 |
Dean Michael Berris | ba2b567 | 2020-12-09 11:53:06 | [diff] [blame] | 12 | min_instances: 24 |
Alex Sun | f448d5b | 2024-01-27 21:19:26 | [diff] [blame] | 13 | # Define max_idle_instance to reduce the number of billed instance. |
| 14 | max_idle_instances: 30 |
| 15 | # 8 worker * 10 threads = 80 concurrent requests. |
| 16 | max_concurrent_requests: 80 |
| 17 | # Auto scaling will be triggered when reach 90% of the max concurrent. |
| 18 | target_throughput_utilization: 0.90 |
| 19 | target_cpu_utilization: 0.90 |
| 20 | max_pending_latency: automatic |
Dean Michael Berris | 0319809 | 2020-01-09 06:03:36 | [diff] [blame] | 21 | |
Dean Michael Berris | 0319809 | 2020-01-09 06:03:36 | [diff] [blame] | 22 | env_variables: |
| 23 | GAE_USE_SOCKETS_HTTPLIB: 'true' |
| 24 | |
Dean Michael Berris | 0319809 | 2020-01-09 06:03:36 | [diff] [blame] | 25 | handlers: |
Dean Michael Berris | 0319809 | 2020-01-09 06:03:36 | [diff] [blame] | 26 | - url: /.* |
| 27 | script: dashboard.dispatcher.APP |
| 28 | secure: always |