Technology
Multiple Corridor Workers
Ask AI
How to run multiple named Corridor workers on the same server without their configurations colliding.
Corridor provides an option to run multiple workers on the same server, without the workers interfering with
each other. The user needs to provide a name for each worker and worker specific configurations in
api_config.py, where each configuration is tied to the worker’s name. This is one way to add capacity when scaling Simulation and other jobs.
Custom worker run command with worker name
Section titled “Custom worker run command with worker name”The worker name can be provided with the option --worker-name or -n
INSTALL_DIR/venv-api/bin/corridor-worker run --worker-name CUSTOM_
Custom worker configurations
Section titled “Custom worker configurations”Any worker specific configuration is required to be added to the file:
INSTALL_DIR/instances/INSTANCE_NAME/config/api_config.py
to avoid synchronization issues with other workers running on the same server. The worker configurations have
to be prefixed with the worker name provided in the worker run command above.
Configurations
Section titled “Configurations”Taking above worker run command as an example, where the worker name is CUSTOM_,
the configurations would be:
CUSTOM_WORKER_QUEUESCUSTOM_WORKER_PIDFILECUSTOM_WORKER_LOGFILECUSTOM_WORKER_PROCESSESCUSTOM_CELERY_WORKER_STATE_DBCUSTOM_CELERY_WORKER_HIJACK_ROOT_LOGGERCUSTOM_CELERY_WORKER_REDIRECT_STDOUTS
Was this page helpful?
Thanks for the feedback.