Solution Overview
Scenarios
This solution helps you rapidly deploy both standalone and high-availability versions of Dify, while also supporting the mounting of document knowledge bases created on the Dify platform to Huawei Cloud Object Storage Service (OBS) buckets. Dify is an open-source large language model (LLM) application development platform. It integrates the concepts of backend as a service (BaaS) and LLMOps, enabling you to quickly build production-level generative AI applications.
Solution Architecture
This solution helps you quickly deploy the Dify platform.


This solution will:
Single-cloud server deployment:
- Create one Huawei Cloud Flexus X Instance (FlexusX) to set up the Dify platform.
- Create one EIP and associate it with the FlexusX to enable Internet access and accessibility from the Internet.
- Create one security group with specified rules to protect cloud servers.
HA deployment in CCE container:
- Create three EIPs to enable access to and from the Internet.
- Create one ELB and associate an EIP with it to automatically distribute access traffic to various backend services. This enhances the external service capabilities of the application system and achieves robust application fault tolerance.
- Create one NAT gateway and bind an EIP to it. Add SNAT rules to let all instances in a private subnet connect outbound to the Internet while remaining fully private.
- Create three FlexusX instances for deploying five core Dify plug-ins.
- Create one CCE Turbo cluster, create a node pool, and manage the three FlexusX instances as nodes in the cluster.
- Create one FlexusX to deploy the Embedding (bge-m3) and Reranker (bge-reranker-v2-m3) models.
- Use OBS to mount the Dify knowledge base to the OBS bucket.
- Create one Distributed Cache Service (DCS) for Redis®* instance that is compatible with Redis, providing users with high-performance, cost-effective NoSQL databases while ensuring data consistency during data circulation.
- Create one RDS for PostgreSQL instance with primary/standby deployment across AZs to ensure disaster recovery capabilities.
- Create one CSS OpenSearch cluster to provide functions such as online distributed search and semantic search.
- Create four security groups with specified rules to protect cloud services.
Solution Advantages
- Cost optimization
Offers cost-efficient ECSs, enables selecting resource specifications as needed with auto-scaling support, minimizes idle resources, optimizes cost investment, and further lowers customer operating expenses.
Notes and Constraints
- Before deploying this solution, make sure you have created a HUAWEI ID capable of accessing the target region and enabled Huawei Cloud services.
- If you choose the yearly/monthly billing mode, ensure that your account balance is sufficient for automatic payment during one-click resource deployment. If you do not have sufficient balance, you can enter the Billing Center to manually pay for the order.
- If you choose to use IAM agencies to deploy resources, ensure that your Huawei Cloud account has sufficient IAM permissions. For details, refer to Creating the rf_admin_trust Agency. If you use a HUAWEI ID or an IAM user under the admin user group, you do not need to select an agency; the permissions of the currently logged-in user will be used for deployment.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot