Deployment
Production Deployment
Requirements
This requirements can support up to
3000 active users daily
. If you have more users, you can scale the resources as needed.
- Kubernetes Cluster
- 6 Worker Nodes: Each one 8 CPU, 32 GB RAM
- Container Registry
- AWS ECR(with AK/SK or IRSA)/ Azure ACR / Aliyun ACR / Tencent TCR / Dockerhub
- Persistence Storage
- S3 / AWS S3 (with AK/SK or IRSA) / Azure Blob / Aliyun OSS / Tencent COS
- 512 GB Storage
- Postgres Database
- Version 14+
- 4 CPU, 8 GB RAM
- 512 GB
SSD
Storage
- Redis Database
- Version 6+
- 2 GB RAM
- Vector DB Virtual Machine - Qdrant Cluster
- 3 Virtual Machines
- 8 CPU, 64 GB RAM
- 100 GB Storage
The limits
of Dify Services Resources
Services | Replicas | CPU | RAM - GB | Total CPU | Total RAM - GB |
---|---|---|---|---|---|
api | 3 | 3 | 10 | 9 | 30 |
worker | 3 | 2 | 10 | 6 | 30 |
web | 3 | 1 | 1 | 3 | 3 |
sandbox | 3 | 1 | 2 | 3 | 6 |
enterprise | 3 | 1 | 2 | 3 | 6 |
enterpriseAudit | 3 | 1 | 2 | 3 | 6 |
enterpriseFrontend | 3 | 1 | 1 | 3 | 3 |
ssrfProxy | 3 | 1 | 1 | 3 | 3 |
unstructured | 3 | 1 | 2 | 3 | 6 |
plugin_daemon | 3 | 1 | 3 | 3 | 9 |
plugin_controller | 3 | 1 | 2 | 3 | 6 |
plugin_connector | 3 | 1 | 2 | 3 | 6 |
gateway | 3 | 1 | 2 | 3 | 6 |
minio | 1 | 1 | 2 | 1 | 2 |
Total | 49 | 122 |
Deployment
1. Get Helm Repository Info
For more information, please refer to the Dify Helm Chart.
2. Save Helm Chart Values
- Save Helm chart values to a file named
values.yaml
. - Update the
values.yaml
file with your configuration.
- Please replace the
#REPLACE_ME#
placeholders with your actual values. - Please replace “dify123456” with your own value.
3. Configure Container Registry
- 3.1 Container Registry for Plugins
- For more information, please refer to the Container Registry for Plugins.
- 3.2 Container Registry for Services
- For more information, please refer to the Container Registry.
4. Configure Persistence Storage
- For more information, please refer to the Persistence Storage.
5. Configure External postgres
- For more information, please refer to the External Postgres.
6. Configure External Redis
- For more information, please refer to the External Redis.
7. Configure External Qdrant
- For more information, please refer to the External Qdrant Cluster.
8. Configure Ingress Controller
- For more information, please refer to the Ingress Controller.
9. Install Dify Helm Chart
10. Verify Installation
- For more information, please refer to the Verify Services Status.
Advanced Configuration
1. Domain and SSL Certificate
- For more information, please refer to the Domain and SSL Certificate.
2. Email Provider
- For more information, please refer to the Email Provider.
3. Performance Tuning
- For more information, please refer to the Performance Tuning.