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

Instance Usage Suggestions

Updated on 2025-01-02 GMT+08:00

DB Instances

DB Instance Types

  • Primary/Standby
    • A primary/standby pair provides an HA architecture. It is suitable for production databases of large and medium enterprises in the Internet, Internet of Things (IoT), retail e-commerce sales, logistics, gaming, and other sectors.
    • When a primary instance is being created, a standby instance is provisioned along with it to provide data redundancy. The standby instance is invisible to you after being created.
    • If a failover occurs due to a primary instance failure, your database client will be disconnected from the instance briefly and then reconnects to the instance.
  • Single-node
    • A single-node architecture is more cost-effective than primary/standby pairs.
    • It is recommended for development and testing of microsites, and small- and medium-sized enterprises, or for learning about RDS.
    • If a fault occurs on a single instance, the instance cannot recover in a timely manner.
  • Read replica

    Read replicas include single read replicas and HA read replicas.

    • Single read replica

      If you want to use single read replicas, you are advised to buy more than one single read replica and enable database proxy. By doing so, the database proxy can route traffic to other read replicas if a read replica is faulty.

    • HA read replica

      If the physical server where the primary read replica is deployed fails, the standby read replica automatically takes over workloads.

    When you purchase a read replica, select the same value for Table Name as that of the DB instance.

    Recommendations for using read replicas:

    1. Configure HA read replicas if you plan to configure no more than two read replicas for a DB instance.
    2. If your DB instance is associated with more than two read replicas, enable database proxy for cost-effectiveness.
    NOTE:

    If the replication between a read replica (single or HA) and the DB instance is abnormal, it can take a long time to rebuild and restore the read replica (depending on the data volume).

    After a read replica is created, you can change its time zone by adjusting the time_zone parameter. Ensure that the read replica uses the same time zone as the primary instance to avoid data synchronization errors.

Instance Classes

  • Dedicated

    The instance has dedicated CPU and memory resources to ensure stable performance. The performance of a dedicated instance is never affected by other instances on the same physical machine. This instance class is good when performance stability is important.

  • General-purpose

    CPU resources are shared with other general-purpose DB instances on the same physical machine. CPU usage is maximized through resource overcommitment. This instance class is a cost-effective option and suitable for scenarios where performance stability is not critical.

Database Connection

  • Configure RDS for MySQL parameters that match your workloads.
  • Keep an appropriate number of active connections.
  • Periodically release persistent connections because maintaining them may require a large cache and use up memory.

Reliability and Availability

  • Select primary/standby DB instances for production databases.
  • Deploy primary and standby instances in different AZs.
  • Create read replicas and enable read/write splitting for workloads involving frequent read/write operations.
  • Change instance classes during off-peak hours.
  • Select an instance class and storage space appropriate to your workloads.
  • After scaling up your DB instance, scale up its read replicas in a timely manner to prevent service exceptions caused by insufficient storage of read replicas.

Backup and Restoration

  • Backups may fail if the instance has a heavy workload during peak hours. To prevent this, create manual backups during off-peak hours and tailor the time window for automated backups to your workload requirements.
  • Set the backup cycle to All for write-intensive DB instances.
  • Configure a backup retention period suited to your workload. The default value is 7 days.
  • Set the local retention period of binlogs as required. The default value is 0, indicating that local binlogs are deleted once they are successfully backed up to OBS.
  • Before restoring tables to a specified point in time, check whether any large tables without primary keys were deleted before the selected point in time. If yes, it is difficult to estimate when the restoration can be complete.
  • Select the right storage type before creating a DB instance. DB instances using local SSDs cannot be restored to existing instances.
  • If a DB instance is deleted, its automated full backups and binlog backups are also deleted. Create a manual backup of all data before deleting a DB instance.
  • Configure a custom recycling policy to ensure that any instances that are deleted by mistake can be rebuilt.

SQL Audit

  • Enable Audit Logging when periodic audits are required.
  • Enable SQL Explorer when SQL analysis is required.

Routine O&M

  • Periodically check slow query logs and error logs to identify problems in advance.
  • Periodically check the resource usage of DB instances. If the resources are insufficient, scale up the resources in a timely manner.
  • Monitor instance metrics. If any metric is beyond its expected range, address related issues as soon as possible.
  • Before deleting or modifying a record, run SELECT to check that it is the one you desire.

Security

  • Prevent your database from being directly accessed from the Internet. If you want to allow access from the Internet, bind an EIP to your DB instance and configure a whitelist.
  • Use SSL to connect to your DB instance.

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