Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
On this page

Show all

DCS Best Practices

Updated on 2024-12-31 GMT+08:00

This section summarizes best practices of Distributed Cache Service (DCS) in common scenarios. Each practice is given a description and procedure.

Table 1 DCS best practices

Best Practice

Description

Serializing Access to Frequently Accessed Resources

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.

Ranking with DCS

Describes how to rank best-selling offerings using DCS for Redis.

Implementing Bullet-Screen and Social Comments with DCS

Describes how to display a key-value list, such as streaming or social comments, in descending order from different dimensions using DCS for Redis.

Merging Game Servers with DCS

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.

Flashing E-commerce Sales with DCS

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.

Reconstructing Application System Databases with DCS

Describes how to migrate data, taking the example of migrating a table from a MySQL database to DCS for Redis.

Upgrading a Redis 3.0 Instance

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.

Using Nginx for Public Access to DCS

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.

Using SSH Tunneling for Public Access to DCS

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.

Using ELB for Public Access to DCS

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.

Connecting a Client to DCS Through CCE

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).

Configuring Redis Client Retry

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.

DCS Data Security

This best practice provides actionable guidance for enhancing the overall security of using DCS.

Suggestions on 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.

Detecting and Handling Big Keys and Hot Keys

This best practice describes how to find and optimize big keys and hot keys when using DCS for Redis.

Configuring a Redis Pipeline

This best practice describes how to use Redis pipelines. DCS for Redis supports the native pipelining.

Optimizing the Jedis Connection Pool

JedisPool is the connection pool of the Jedis client. This best practice describes how to configure JedisPool for better Redis performance and resource utilization.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback