You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I confirm that I am using English to submit report (我已阅读并同意 Language Policy).
[FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
Please do not modify this template :) and fill in all the required fields.
Provide a description of requested docs changes
I notice The documentation only provides guidance on vertical scaling by configuring SERVER_WORKER_AMOUNT for Gunicorn and CELERY_WORKER_AMOUNT for Celery. However, it is unclear whether Dify supports horizontal scaling for its components (API, Worker, Sandbox).
Could you clarify if these components support running multiple instances to achieve horizontal scaling? If so, are there any specific configurations or considerations we need to account for?
The text was updated successfully, but these errors were encountered:
I found a similar discussion titled "How to scale up the dify deployment," which is currently unsolved [1].
Regarding your question about horizontal scaling for Dify components (API, Worker, Sandbox), the Dify codebase does include configurations and tools that support horizontal scaling:
Configuration Files: The pm2.json file specifies a clustered mode with two instances, indicating support for horizontal scaling [2].
Environment Variables: There are specific environment variables for optimizing horizontal scaling:
SERVER_WORKER_AMOUNT and CELERY_WORKER_AMOUNT for setting the number of workers.
CELERY_AUTO_SCALE for enabling autoscaling of Celery workers [3].
Load Balancing: The documentation mentions a "Round-robin" load balancing strategy by default [4].
Container Orchestration: Dify supports deployment on Kubernetes using Helm Charts or YAML files, which facilitates horizontal scaling [5].
Distributed Systems: The use of PostgreSQL and Redis for distributed data storage and caching supports horizontal scaling [6].
These elements indicate that Dify does support horizontal scaling across its components, and you can leverage these configurations and tools to achieve it.
Self Checks
Provide a description of requested docs changes
I notice The documentation only provides guidance on vertical scaling by configuring SERVER_WORKER_AMOUNT for Gunicorn and CELERY_WORKER_AMOUNT for Celery. However, it is unclear whether Dify supports horizontal scaling for its components (API, Worker, Sandbox).
Could you clarify if these components support running multiple instances to achieve horizontal scaling? If so, are there any specific configurations or considerations we need to account for?
The text was updated successfully, but these errors were encountered: