Files
notifications-api/manifest-delivery-base.yml
Alexey Bezhan 2dfbd93c7e Switch service callback workers to use eventlet pool implementation
Service callbacks are I/O bound and can take a long time if the
callback URL takes a long time to respond. This is a perfect use
case for an eventlet worker pool since it allows spawning multiple
green threads (1000 in the proposed configuration) to execute HTTP
requests concurrently without a significant increase in CPU load
or memory usage needed for adding additional worker processes.
2018-02-13 16:44:30 +00:00

101 lines
3.3 KiB
YAML

---
buildpack: python_buildpack
health-check-type: none
no-route: true
services:
- notify-db
instances: 1
memory: 1G
env:
# Credentials variables
ADMIN_BASE_URL: null
ADMIN_CLIENT_SECRET: null
API_HOST_NAME: null
DANGEROUS_SALT: null
SECRET_KEY: null
ROUTE_SECRET_KEY_1: null
ROUTE_SECRET_KEY_2: null
PERFORMANCE_PLATFORM_ENDPOINTS: null
NOTIFICATION_QUEUE_PREFIX: null
AWS_ACCESS_KEY_ID: null
AWS_SECRET_ACCESS_KEY: null
STATSD_PREFIX: null
DESKPRO_API_KEY: null
DESKPRO_API_HOST: null
MMG_URL: null
MMG_API_KEY: null
MMG_INBOUND_SMS_AUTH: null
MMG_INBOUND_SMS_USERNAME: null
FIRETEXT_API_KEY: null
LOADTESTING_API_KEY: null
FIRETEXT_INBOUND_SMS_AUTH: null
REDIS_ENABLED: null
REDIS_URL: null
TEMPLATE_PREVIEW_API_HOST: null
TEMPLATE_PREVIEW_API_KEY: null
applications:
- name: notify-delivery-celery-beat
command: scripts/run_app_paas.sh celery -A run_celery.notify_celery beat --loglevel=INFO
instances: 1
memory: 128M
env:
NOTIFY_APP_NAME: delivery-celery-beat
- name: notify-delivery-worker-database
command: scripts/run_app_paas.sh celery -A run_celery.notify_celery worker --loglevel=INFO --concurrency=11 -Q database-tasks
env:
NOTIFY_APP_NAME: delivery-worker-database
- name: notify-delivery-worker-research
command: scripts/run_app_paas.sh celery -A run_celery.notify_celery worker --loglevel=INFO --concurrency=5 -Q research-mode-tasks
env:
NOTIFY_APP_NAME: delivery-worker-research
- name: notify-delivery-worker-sender
command: scripts/run_app_paas.sh celery -A run_celery.notify_celery worker --loglevel=INFO --concurrency=11 -Q send-sms-tasks,send-email-tasks
env:
NOTIFY_APP_NAME: delivery-worker-sender
- name: notify-delivery-worker-periodic
command: scripts/run_app_paas.sh celery -A run_celery.notify_celery worker --loglevel=INFO --concurrency=2 -Q periodic-tasks,statistics-tasks
instances: 1
env:
NOTIFY_APP_NAME: delivery-worker-periodic
- name: notify-delivery-worker-priority
command: scripts/run_app_paas.sh celery -A run_celery.notify_celery worker --loglevel=INFO --concurrency=5 -Q priority-tasks
env:
NOTIFY_APP_NAME: delivery-worker-priority
- name: notify-delivery-worker
command: scripts/run_app_paas.sh celery -A run_celery.notify_celery worker --loglevel=INFO --concurrency=11 -Q job-tasks,retry-tasks,create-letters-pdf-tasks,letter-tasks
env:
NOTIFY_APP_NAME: delivery-worker
# Only consume the notify-internal-tasks queue on this app so that Notify messages are processed as a priority
- name: notify-delivery-worker-internal
command: scripts/run_app_paas.sh celery -A run_celery.notify_celery worker --loglevel=INFO --concurrency=11 -Q notify-internal-tasks
env:
NOTIFY_APP_NAME: delivery-worker-internal
- name: notify-delivery-worker-receipts
command: scripts/run_app_paas.sh celery -A run_celery.notify_celery worker --loglevel=INFO --concurrency=11 -Q ses-callbacks
env:
NOTIFY_APP_NAME: delivery-worker-receipts
- name: notify-delivery-worker-service-callbacks
command: scripts/run_app_paas.sh celery -A run_celery.notify_celery worker --loglevel=INFO -P eventlet -c 1000 -Q service-callbacks
env:
NOTIFY_APP_NAME: delivery-worker-service-callbacks