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

Using ELB for Public Access to DCS

Updated on 2024-10-28 GMT+08:00

Overview

Currently, 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 section 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.

NOTE:
  • Due to cluster node address translation, you cannot access a Redis Cluster as a whole. You can only access individual nodes in the cluster.
  • Do not use public network access in the production environment. Client access exceptions caused by poor public network performance will not be included in the SLA.

The following figure shows the process for accessing DCS through ELB.

Figure 1 Process for accessing DCS through ELB

Interconnecting ELB with a DCS Instance

  1. Create a VPC or use an existing one.
  2. Buy a DCS Redis instance. Record the IP address and port number of the instance.
  3. Create a dedicated load balancer.

    • A shared load balancer does not support cross-VPC backend servers. Therefore, it cannot be bound to a DCS instance.
    • For Specification, select Network load balancing (TCP/UDP).
    • To access the DCS instance over public networks, enable IP as a Backend when creating a dedicated load balancer.

  4. Add a TCP listener to the dedicated load balancer.

    • On the Add Backend Server tab page, choose IP as Backend Servers > Add IP as Backend Server.
    • Enter the IP address, port, and other parameters of your DCS instance.
    • A Redis Cluster DCS instance contains multiple master/replica pairs. When configuring IP as a Backend, you can add the IP address and port of any master or replica node.
    • If you enable Health Check, you do not need to manually configure the port. By default, the service port of the backend server will be used.

  5. Create a VPC peering connection. For the local VPC, select the VPC where your load balancer is located. For the peer VPC, select the VPC where your DCS instance is located.

    NOTE:

    Even if your load balancer and DCS instance are in the same VPC, you still need to create a VPC peering connection. For the local VPC, select the VPC where your load balancer and DCS instance are located. For the peer VPC, select another VPC.

  6. Click the name of the VPC peering connection to go to its details page. Obtain Local VPC CIDR Block and Peer VPC CIDR Block.

  7. Click Add Route and configure local and peer routes for the VPC peering connection.

    1. Local route: Configure the peer VPC CIDR block in Destination on the Add Route dialog box.
    2. Peer route: Select Add a route for the other VPC and configure the local VPC CIDR block in Destination, and click OK.
      NOTE:

      If the load balancer and the DCS instance are in the same VPC, you do not need to add a peer route.

  8. Perform a health check on the IP address of the DCS instance. If the health check result is Healthy, the added cross-VPC backend IP address can be used.

    1. In the navigation pane of Network Console, choose Elastic Load Balance > Backend Server Groups.
    2. Click the name of the created backend server group to go to its details page.
    3. On the Backend Servers > IP as Backend Servers tab page, view the health check result of the DCS instance IP address.

Accessing a DCS Instance on a Client

  • Accessing a single node of a Redis Cluster instance on a client through ELB
    1. View the basic information of the load balancer created in 3.

    2. Buy an ECS, log in to it, and install the Redis client by referring to redis-cli.
    3. On the Redis client, connect to the DCS instance using the IP address and port number configured in 4. If you use the EIP and port number of the load balancer, an error will be reported.

  • Accessing a single-node, master/standby, read/write splitting, or Proxy Cluster instance on a client through ELB
    1. View the IPv4 EIP and port number of the load balancer created in 3.

    2. Buy an ECS, log in to it, and install the Redis client by referring to redis-cli.
    3. Use redis-cli to access the load balancer using its EIP and port number (which is 80).

    4. Write a key through ELB.

    5. Log in to the DCS console. On the Cache Manager page, choose More > Connect to Redis in the row that contains the DCS instance created in 2. Check whether the key written in 4 exists.

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