DCS Best Practices
This section summarizes best practices of Distributed Cache Service (DCS) in common scenarios. Each practice is given a description and procedure.
Best Practice |
Description |
---|---|
Describes how to implement locks on distributed applications with Redis. Serializing access to hot resources with locks avoids oversold inventory or disordered access in flash sales. |
|
Describes how to rank best-selling offerings using DCS for Redis. |
|
Describes how to display a key-value list, such as streaming or social comments, in descending order from different dimensions using DCS for Redis. |
|
Describes how to synchronize servers using Redis. During game server provisioning and merging, game developers must consider how to synchronize data among different servers. With the pub/sub message queuing mechanism of DCS for Redis, data changes on one game server can be published to Redis channels. Other game servers can subscribe to the channels to receive messages of changes. |
|
Describes how to satisfy high concurrency in e-commerce flash sales using DCS for Redis as the database cache. Clients can access Redis to query inventories and place orders. |
|
Describes how to migrate data, taking the example of migrating a table from a MySQL database to DCS for Redis. |
|
Describes how to upgrade a DCS Redis 3.0 instance through data migration and IP switchover. You are advised to upgrade your DCS Redis 3.0 instances as soon as possible. DCS for Redis 4.0 and later are compatible with Redis 3.0. |
|
Huawei Cloud DCS Redis 4.0 and later cannot be bound with elastic IP addresses (EIPs) and cannot be accessed over public networks directly. This best practice describes how to access a single-node, master/standby, read/write splitting, or Proxy Cluster DCS Redis 4.0, 5.0, or 6.0 instance by using a jump server. This solution is unavailable for public access to Redis Cluster instances. |
|
Huawei Cloud DCS Redis 4.0 and later cannot be bound with EIPs and cannot be accessed over public networks directly. This best practice describes how to create an SSH tunnel as a proxy to connect your DCS instance and local computer to achieve proxy forwarding. In this way, single-node, master/standby, read/write splitting, and Proxy Cluster DCS Redis instances in a VPC can be accessed. This solution is unavailable for public access to Redis Cluster instances. |
|
Huawei Cloud DCS Redis 4.0 and later cannot be bound with EIPs and cannot be accessed over public networks directly. This best practice describes how to access a single-node, master/standby, read/write splitting, or Proxy Cluster instance or a node in a Redis Cluster instance through public networks by enabling cross-VPC backend on a load balancer. |
|
More and more applications are deployed in containers. This practice describes how to deploy Redis clients in cluster containers to access DCS through Cloud Container Engine (CCE). |
|
This best practice describes the retry configuration of the Jedis client. A complete automatic retry mechanism can greatly reduce the impact of infrastructure or running environment faults. |
|
This best practice provides actionable guidance for enhancing the overall security of using DCS. |
|
This best practice describes suggestions on using DCS for Redis in terms of the service, data design, commands, SDKs, and O&M management. |
|
This best practice describes how to find and optimize big keys and hot keys when using DCS for Redis. |
|
This best practice describes how to use Redis pipelines. DCS for Redis supports the native pipelining. |
|
JedisPool is the connection pool of the Jedis client. This best practice describes how to configure JedisPool for better Redis performance and resource utilization. |
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