diff --git a/ops/helm/nomad/templates/api-deployment.yaml b/ops/helm/nomad/templates/api-deployment.yaml index 7b1b04bf28c7502e937cbe2f67d8e8ed44611604..d31457dda4edad2bc3ef4abcd6c5ba9f16a31b47 100644 --- a/ops/helm/nomad/templates/api-deployment.yaml +++ b/ops/helm/nomad/templates/api-deployment.yaml @@ -64,10 +64,10 @@ metadata: data: gunicorn.conf: | secure_scheme_headers = {'X-FORWARDED-PROTOCOL': 'ssl', 'X-FORWARDED-PROTO': 'https', 'X-FORWARDED-SSL': 'on'} - worker_class = 'gevent' - threads = 4 + worker_class = {{ .Values.api.workerClass }} + threads = {{ .Values.api.threads }} worker_connections = 1000 - worker = 48 + worker = {{ .Values.api.worker }} --- apiVersion: apps/v1 kind: Deployment diff --git a/ops/helm/nomad/values.yaml b/ops/helm/nomad/values.yaml index 8df227a273e6369cff17f3e6bb3a3fea9a72ddd6..cc3d8b60c9bcb856413d1d5e5b91415757fa3c66 100644 --- a/ops/helm/nomad/values.yaml +++ b/ops/helm/nomad/values.yaml @@ -28,8 +28,12 @@ images: api: replicas: 1 https: true - ## Number of gunicorn worker. Recommendation is 2xnum_cores+1 + ## Number of gunicorn worker. worker: 10 + ## Number of threads per gunicorn worker (for async workerClass) + threads: 4 + ## Gunircon worker class (http://docs.gunicorn.org/en/stable/settings.html#worker-class) + workerClass: 'gthread' console_loglevel: INFO logstash_loglevel: INFO ## Secret used as cryptographic seed