Relational Database ServiceRelational Database Service

Compute
Elastic Cloud Server
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
Domain Name Service
VPC Endpoint
Cloud Connect
Enterprise Switch
Security & Compliance
Anti-DDoS
Web Application Firewall
Host Security Service
Data Encryption Workshop
Database Security Service
Advanced Anti-DDoS
Data Security Center
Container Guard Service
Situation Awareness
Managed Threat Detection
Compass
Cloud Certificate Manager
Anti-DDoS Service
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GaussDB NoSQL
GaussDB(for MySQL)
Distributed Database Middleware
GaussDB(for openGauss)
Developer Services
ServiceStage
Distributed Cache Service
Simple Message Notification
Application Performance Management
Application Operations Management
Blockchain Service
API Gateway
Cloud Performance Test Service
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
DevCloud
ProjectMan
CodeHub
CloudRelease
CloudPipeline
CloudBuild
CloudDeploy
Cloud Communications
Message & SMS
Cloud Ecosystem
Marketplace
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP License Service
Support Plans
Customer Operation Capabilities
Partner Support Plans
Professional Services
enterprise-collaboration
Meeting
IoT
IoT
Intelligent EdgeFabric
DeveloperTools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Updated at: Apr 02, 2022 GMT+08:00

Enabling Read/Write Splitting

Read/write splitting enables read and write requests to be automatically routed through a read/write splitting address. This section describes how to enable read/write splitting.

Procedure

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and a project.
  3. Click in the upper left corner of the page and choose Database > Relational Database Service. The RDS console is displayed.
  4. On the Instance Management page, click the target DB instance. The Basic Information page is displayed.
  5. In the navigation pane on the left, choose Database Proxy.

    Alternatively, in the Connection Information area on the Basic Information page, click Apply in the Read/Write Splitting Address field.

    Figure 1 Applying for a read/write splitting address

  6. On the displayed page, click Enable now.
  7. In the displayed dialog box, click OK.

    If the proxy instance class is 4vCPUs | 8GB, the proxy instance is an ha-proxy instance, as shown in Figure 2.

    If the proxy instance class and proxy nodes are configurable, the proxy instance is an elb-proxy instance, as shown in Figure 3.

    Figure 2 Enabling database proxy for an ha-proxy instance
    Figure 3 Enabling database proxy for an elb-proxy instance
    • Read/write splitting maintains the database connectivity and splits read and write requests. After read/write splitting is enabled, an additional address called a read/write splitting address is provided. To use read/write splitting, switch your applications to this address.
    • Read/write splitting address: You can connect to databases through the read/write splitting address, with read and write requests automatically distributed.

      The read/write splitting address and the floating IP address of the primary DB instance are in the same VPC and subnet and are independent from each other.

    • Delay threshold: You can set the delay threshold after read/write splitting is enabled. For details, see section Configuring Delay Threshold and Distributing Read Weight.
    • Read weight distribution: You can set read weights distributed to read replicas and primary DB instances after read/write splitting is enabled. For details, see section Configuring Delay Threshold and Distributing Read Weight.
    • The differences between an ha-proxy instance and elb-proxy instance are as follows:

      An ha-proxy instance has only two nodes: primary and standby nodes. Only the primary node works.

      An elb-proxy instance consists of 2 to 32 nodes, all of which work simultaneously. Client requests are forwarded to the proxy nodes through a load balancer.

Did you find this page helpful?

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?







Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel