Professional Documents
Culture Documents
Page 1 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Foreword
This chapter describes the HUAWEI CLOUD database ecosystem and cloud database
design.
Page 2 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Objectives
On completion of this course, you will be able to:
Understand the HUAWEI CLOUD database service framework.
Complete the cloud database solution design.
Understand the HUAWEI CLOUD database solution.
Page 3 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Contents
1. HUAWEI CLOUD Database Service Overview
Page 4 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
HUAWEI CLOUD Database Service Overview
RDS for MySQL
NoSQL databases
RDS for PostgreSQL For large-scale service expansion
RDS for SQL Server
Cassandra Redis
DDS API GeminiDB
GaussDB(openGauss)
GaussDB(for MySQL) (Community DDS Enhanced
Time
Edition
GaussDB(for PostgreSQL) Edition) (API for MongoDB) series
Database ecosystem
Building a complete database solution
Distributed Database Middleware Data Replication Service Data Admin Service (visual data tool)
DDM DRS DAS
Page 5 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
HUAWEI CLOUD DB Service VS Self-Built DB
Traditional Databases Self-built Databases on ECSs Cloud Databases
Application optimization and data Application optimization and data
model design model design
Database scaling Database scaling
DBA management
Application optimization and
Database high availability Database high availability data model design
management
Cloud service
Operating system installation Database software installation
provider
Operating system installation
System patch upgrade
Server deployment and maintenance Server deployment and maintenance Operating system installation
Server deployment and maintenance
Rack stacking and network Rack stacking and network
Rack stacking and network
Data center wind, fire, water, and Data center wind, fire, water, and Data center wind, fire, water, and
electricity electricity electricity
Page 6 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Contents
1. HUAWEI CLOUD Database Service Overview
2. Cloud Relational Database Solution Design
MySQL
▫ GaussDB(for MySQL)
▫ PostgreSQL
▫ Microsoft SQL Server
Page 7 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
RDS for MySQL
Page 8 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Instance Types Supported by MySQL
Single MySQL5.6/5.7/8.0 Single
A single database node is cost-effective. This DB instance type
is suitable for developing and testing of small-sized enterprise
websites, non-core enterprise databases, or for learning about
RDS.
Primary/Standby MySQL5.6/5.7/8.0 Primary/Standby
This DB instance type uses the classic HA architecture with two
data copies. Asynchronous and semi-synchronous replication
modes are supported. Failovers are automatically performed
Primary Standby within seconds. It is suitable for enterprises' production
environments, Internet, and traditional databases migration to
Primary/Standby (1/2) MySQL5.7
the cloud.
Primary/Standby (1/2)
The three-node architecture uses the MySQL Group
Strong data consistency,
Node 1 RPO = 0 Node 2 Replication technology and the Paxos protocol to ensure data
consistency. It is suitable for various financial scenarios, such
as securities, banking, and insurance industries, as well as for
large enterprises' core databases that have high requirements
on data consistency.
Page 9 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
RDS for MySQL Product Features
Key Features
Database Delivery O&M Developer End user
administrator personnel SLA
Manage Deploy Develop Access
Security
High availability
RDS console Read/write
RDS OPENAPI Read/Write
splitting address Read-only Monitoring
Instance
Backup
management Elastic scaling:
Instance access Launch
Failover Backup & Restoration
Backup and
Primary Standby
restoration Monitor instance instance Read replica
Instance Primary/standby Log management
monitoring Scale replication
Page 10 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
High Availability
App AZ 1 AZ 2
AZ
App 1 App 2
Failover
Failover
Primary Standby
Primary Standby
Failover priority on availability or reliability No traffic on the standby instance, ensuring low RTO
Intra- or cross-AZ HA and automatic failover Huawei-developed HA Monitor module
Manual switchover, simulating a fault VIP switching, transparent to applications
Read replicas automatically mounted to the new primary instance Multiple primary/standby failover or switchover
Failover or switchover completed within seconds Automatic fault detection
Page 11 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Security Capabilities
Multiple security compliance certifications
against cyber attacks
TRUCS
Page 12 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Data Reliability - Distributed Cloud Storage
Page 13 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Data Reliability - Backup and Restoration
OBS replacing tape libraries
Point-in-time restore (PITR)
Backup
(full/incremental)
• Backup cycle: 7 to 732 days
RDS OBS • Pay-per-use: Free EVS storage of the same size as the
Page 14 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Ultra-High Performance DB Instances
Page 15 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Three-Node Primary/Standby
Features
App 1 App 2 App N 1. Using HA architecture with one primary and two standby
nodes; support for cross-AZ deployment
2. Resolving data inconsistency issues in distributed databases
Leader 3. Built-in split-brain protection mechanism
4. Using Paxos to ensure zero data loss
Application Scenarios
AZ 1
Primary
Insurance Finance
Paxos
AZ 2 AZ 3 Securities Banking
Standby 1 Standby 2
Follower Follower
Page 16 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
RDS for MySQL Precautions
Version
Currently, RDS for MySQL supports MySQL 5.6, 5.7, and 8.0. When migrating data to the cloud, it is recommended
that users select a MySQL version the same as or later than the source version to avoid compatibility issues.
Deployment Architecture
If customers have high requirements on service HA, primary/standby DB instances are recommended. If there are a
large number of read requests, read replicas can be created to offload read traffic.
Specifications
When selecting instance specifications, pay attention to the QPS/TPS, which determines the instance performance. In
addition, IOPS is an important indicator of the database read and write capabilities. It is related to the storage space
purchased by users. The larger the storage space, the higher the IOPS. IOPS is calculated as follows:
Page 17 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Contents
1. HUAWEI CLOUD Database Service Overview
2. Cloud Relational Database Solution Design
▫ MySQL
GaussDB(for MySQL)
▫ PostgreSQL
▫ Microsoft SQL Server
Page 18 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Background (1)
1. Technical trends of cloud databases
In the cloud environment, compute and storage resources are separated from each other. They communicate with each other through networks to support
multi-tenant DB instances and better horizontal expansion. The traditional database architecture that has been developed and matured in the past 30
years is no longer suitable for the current cloud environment.
For example, traditional databases use read-only nodes and replicate binlogs or redo logs to improve availability and reliability. However, in the cloud
environment, the storage layer provides a similar copy/replication technology to ensure high availability and reliability of data. Therefore, traditional
databases theoretically waste lots of resources. Storage resources can be shared in the cloud.
To solve these problems, cloud-native databases with a separated compute and storage architecture emerged based on the multi-tenant shared storage
technology on the cloud. These databases have the following features: separation of compute and storage, multi-tenant shared storage, and vertical
integration of software and hardware.
In addition to performance enhancements, cloud-native databases also support elastic scaling of compute resources and automatic expansion of storage
resources.
Gartner report: By 2019, 90% of cloud databases use a separated compute and storage architecture, and the remaining 10% will be
phased out by the market.
Why?
Page 19 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Background (2)
2. Providing better databases for customers
In 2017, Huawei released its first database service. By now, Huawei has provided multiple database services that support the following DB engines: MySQL,
PostgreSQL, MongoDB, and Microsoft SQL Server. RDS for MySQL is the most popular service among them. More than 95% of cloud DB instances use the
MySQL InnoDB engine.
Huawei has optimized MySQL databases and provided a better database solution for customers – GaussDB(for MySQL).
Robust performance
Lower primary/standby replication latency
Further improved storage utilization
Shorter backup duration
More storage capacity
Stronger scalability
Fully compatible with MySQL
Page 20 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Application Scenario - Financial Industry
High Security Requirements of the Financial Industry
The financial industry has strict requirements on data security and reliability. Commercial databases can achieve zero RPO and near-
zero RTO. GaussDB(for MySQL) combines the stability and reliability of commercial databases with the simplicity and cost-effectiveness
of open source databases.
GaussDB(for MySQL) Advantages
100% compatible with MySQL
GaussDB(for MySQL) is fully compatible with MySQL. Applications can be smoothly migrated to the cloud without reconstruction.
RPO=0
GaussDB(for MySQL) uses a next-generation separated compute and storage architecture and distributed shared storage to ensure data consistency and
prevent data loss.
RTO≈0
Page 21 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Application Scenario - Gaming Industry
Gaming Industry
The gaming industry explosively develops, and the number of online users is unpredictable. Elastic scaling capability is
critical. GaussDB(for MySQL) is elastically scalable, makings it particularly suitable for the gaming industry.
GaussDB(for MySQL) consists of one primary instance and up to 15 replicas. GaussDB(for MySQL) read replicas can be added within
minutes for horizontal performance expansion.
Page 22 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Key Features
Computing capability
GaussDB(for MySQL) uses the new-generation V6 CPU and Huawei Kunpeng processor to provide powerful computing capabilities.
Security protection
With shared distributed storage and second-level fault recovery, GaussDB(for MySQL) ensures zero data loss. It also uses VPCs, security groups,
SSL, and data encryption to strictly control access to databases.
Mass data storage
Based on Huawei-developed DFV distributed storage, GaussDB(for MySQL) provides storage capacity up to 128 TB. Serverless automatically
scales compute and storage capacity as needed. Storage resources are automatically sharded, freeing users from database/table sharding.
Efficient backup
GaussDB(for MySQL) uses the Log Stream technology to achieve TB-level backup and restoration within minutes. Backup can be retained for up
to 732 days and can be restored to any point in time within the backup retention period.
Elastic scaling
The CPU and memory specifications are changed online, with no interruption on services. Read-only nodes (GaussDB(for MySQL) read replicas)
are added within minutes to horizontally expand capacity.
Fully compatible with MySQL
GaussDB(for MySQL) is 100% compatible with native MySQL and enables smooth migration of on-premises databases to the cloud.
Page 23 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
System Architecture - Design Principles
GaussDB(for MySQL) is a distributed database with a typical separated compute and storage architecture. Its design
principles are as follows:
The cloud storage service (DFV) provides fast, reliable, and shared database storage.
One database cluster has only one data copy.
Logs are data, with no other page storage modes.
The compute layer writes only database logs to the storage layer through the network.
Databases are partitioned across DFV storage nodes based on sharding rules to support massive storage.
Page 24 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
System Architecture - Overview
Replica SQL Coherence Primary Coherence Replica SQL
SQL node traffic SQL node traffic node
Nodes (read-only) (read-only) (read-only)
• Primary node
SAL client SAL client SAL client
• Processes all writes
Storage Network
• Writes WAL logs (redo logs)
Storage
Abstraction RDMA
Layer (SAL)
• Read replicas (<=15)
• Process read-only requests
• Quickly promoted to the primary node
Slice
Slice
Slice Slice Slice
Slice
Slice Slice • Quickly created or deleted
Server
Server Slice Slice Server
Server Slice Slice
• Data shards
Page 25 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Traditional Databases VS GaussDB(for MySQL)
Traditional database architecture GaussDB(for MySQL)
Application
architecture Application
Up to 15
Data sync Up to 5 standby nodes standby nodes
Primary Unreadable Read-only Primary Read-only Read-only
node standby node node node standby node standby node
(read-write) (standby) (read) (read-write) (read) (read)
Page
Page
Page
Page
Page
Page
Page
Page
Log
Log
Log
Page
Log
4 TB x 3 4 TB x 3 4 TB x 3 4 TB x 3
Page 26 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
DB System Architecture
• Client connection management on the SQL layer, SQL
request parse, plan execution and execution, and
Read only Read/Write Read only
isolation levels of execution and management
transactions
Replica Primary Replica • One primary instance and multiple read replicas
(read- (read- (read-
only) write) only)
• Failover or switchover within 10s
Page 27 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
System Architecture (1)
GaussDB(for MySQL) architecture Similar product architecture
SQL Node SQL Node
SQL P1.V5
Buffer
Node P3.V8 P5.V1 Buffer P1.V5
P1.V5 P3.V8 P5.V1
P1.V5 Pool
SQL layer Pool
Write
Page
Log
Log
SAL layer amplification
bottleneck
Log Directory
Distribute P3.V6 P3.V7 P3.V8
P1: shard 1
Log Log Storage Full Full Full ...
P2: shard 1 Page
P3: shard 2 Writer Reader Cleaner Similar products in the industry:
P4: shard 3 Reconstructed based on the distributed storage system. Data is still written to
P5: shard 4 pages, resulting in write amplification. Data volume on the network is over
P6: shard 5 twice of that of GaussDB(for MySQL).
Cross-AZ deployment is not supported. Cross-AZ page writes are the
bottlenecks, severely deteriorating performance.
Storage layer GaussDB(for MySQL):
The SQL layer writes logs only and does not write pages.
Log P3.V6 P3.V7 P3.V8 ... Databases are integrated with storage (SAL layer). Pages are managed by SAL
Full Incremental Incremental (sharded) and stored at the storage layer.
Cross-AZ deployment is supported, with higher reliability and less impact on
performance.
Page 28 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
System Architecture (1)
SQL Node
Replication
Page 29 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Precautions
GaussDB(for MySQL) supports only the InnoDB engine. Other engines are converted
to the InnoDB engine by default.
Page 30 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Contents
1. HUAWEI CLOUD Database Service Overview
2. Cloud Relational Database Solution Design
▫ MySQL
▫ GaussDB(for MySQL)
PostgreSQL
▫ Microsoft SQL Server
Page 31 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
PostgreSQL Introduction
PostgreSQL is developed from the POSTGRES software package published by the University of California, Berkeley. After more than 30 years of
development, PostgreSQL has become the most powerful open-source database in the world. It has won high reputation in reliability, stability,
and data consistency, and has become the preferred open-source relational database of many enterprises. It is called PG for short in the industry.
Page 32 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Scenarios Where PG Is Recommended
Page 33 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
PostgreSQL Uses Cases
PostgreSQL applications in industries
Biochemistry
Telecom Finance Internet Manufacturing & Agriculture
Page 34 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
PostgreSQL Features
Reliability, stability, data consistency, and integrity
Page 35 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Database Selection (1)
Selection method
Avoid Recommend
No database can solve all problems. Databases are designed for specific
Use what developers are familiar with scenarios. Focus on whether the database meets service requirements and
properly consider the requirements of the development personnel
Page 36 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Database Selection (2)
Selection case: PG vs MySQL
MySQL is an excellent, popular open-source relational database. PG and MySQL have their own characteristics.
Page 37 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
RDS for PostgreSQL Key Features
Key Feature Description
...
Database Developer User User PostgreSQL 9.4/9.5/9.6/10.0/11/12 and PostgreSQL Enhanced
Database Edition (compatible with Oracle) are supported.
administrator
Multiple security policies for protecting databases and users'
Manage Deploy Develop
privacy are used, such as VPCs, subnets, security groups, and
Security
SSL.
Application Online and offline migration on, off, and across clouds
RDS Console Data migration are supported.
Data of the primary DB instance is replicated to the standby
Overview Read/Write HA DB instance. If the primary DB instance fails, services are
Create and Database quickly switched to the standby DB instance.
Instance
launch cluster Key performance metrics of DB instances and engines are
management Failover monitored, including CPU/memory/storage usage, I/O
Monitor and Read Monitoring activities, database connections, QPS/TPS, buffer pool, and
Basic Info Primary Standby Read
Read
manage instance instance Replica
replica read/write activities.
Data migration Replica
Read/Write Horizontal scaling: adding or deleting read replicas (up to 5
Elastic Read/Write for each DB instance)
Performance Elastic scaling
monitoring
scaling Backup Data replication Read-only Vertical scaling: changing CPU/memory or scaling up storage
space with no downtime
Backup and Backup and Backup: automated and manual backups
restoration restoration Restoration: point-in-time restore (PITR)
Backup Data Data Data Database error logs and slow SQL logs are provided for
Log management Log management
database tuning.
Parameter Database administrators customize database engine
Parameter
configuration configuration parameters based on monitoring and log information to
optimize the database.
Page 38 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
High Availability and Reliability
HA Failover priority on availability or reliability
Intra- or cross-AZ HA and automatic failover
Manual switchover, simulating a fault
AZ 2 Read replicas automatically mounted to the new primary instance
AZ 1
Failover or switchover completed within seconds
App 1 App 2
No traffic on the standby instance, ensuring low RTO
Huawei-developed HA Monitor module
VIP switching, transparent to applications
Failover Multiple primary/standby failover or switchover
Primary Standby Automatic fault detection
High reliability - PITR
App
• Backup cycle: 7 to 732 days
• Pay-per-use: Free EVS storage of the same size as
Backup the purchased storage, and no expansion upper
(full/incremental) limit
RDS • Data reliability: eleven nines
OBS
OBS replacing tape libraries; point-in-time restore
(PITR)
Restore (PITR)
Page 39 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Background of Replacing Oracle
Page 40 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
PG Enhanced version - 90% Oracle syntax
Higher
Compatible with system views, data compatibility
types, built-in functions, stored with
procedures, anonymous blocks, and Oracle syntax Support for partitioned tables,
advanced packages Optimized stored procedure transaction
functions management, and tablespaces
Enhanced encryption algorithms,
Higher
optimized plugin permissions,
security
and optimized user group
permission management rules
Improved Data subscription and
usability dynamic port change
Page 41 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Oracle Replacement Process
Oracle replacement is a project, rather than simply replacing the Oracle database. The key to project success is:
• Active participation of R&D and test personnel
• Products with good compatibility: PostgreSQL Enhanced Edition (recommended)
• Accurate project evaluation
Project evaluation
Service reconstruction
Service
Migration drill
verification Migration drill
Service verification
Migration implementation
Migration Service
implementation switchover
Service switchover
Page 42 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Ideal Alternative to Oracle
Function optimization and enhancement Security and quality hardening
The merge into function is supported.
Sensitive information such as passwords cannot be printed
The interval type is supported for computing. in logs.
WAL and data disk partitioning are supported. User group permission management is optimized: Only
Scheduled task management is supported. group members can authorize the user group permissions.
Logs are optimized to facilitate fault locating. The permission control for viewing pg_stat_statements
Adaptation has been made to the ARM statistics is optimized.
environment. The SHA256 encryption is used for password
authentication between the client and server.
O&M optimization Hardening is performed for 700,000 automation test cases
at the code level.
A port modification does not require a database
restart.
The obs_fdw plugin is added to simplify cold data Availability and reliability enhancement
management. The replication mode is automatically switched to
The path management in the CREATE TABLESPACE asynchronous when the standby database fault timed out,
cloud application scenario is optimized, making and is automatically restored to synchronous when the
users being unaware of the actual path. standby database is restored.
Minor versions can be upgraded. Core files are automatically backed up.
Backup speed is improved.
Page 43 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Diverse Third-Party Plugins
Community Third Party
Page 44 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Oracle to PostgreSQL Enhanced Edition
Migration networking diagram
Source Oracle®
SSL encryption
HUAWEI CLOUD PostgreSQL
database Private IP Enhanced Edition primary
Public IP DRS (EIP) address database
address
Migration scheduling
Data adaptation
Inbound Inbound and
HUAWEI CLOUD PostgreSQL
whitelist outbound rules Enhanced Edition standby
database
Page 45 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Customer Case (1)
Internet
Page 46 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Customer Case (2)
Business pain points
The company's system is deployed in Hong Kong and has strict
requirements on software copyrights. Deploying Oracle offline is
expensive and difficult to maintain, which is not cost effective. After an in-
depth evaluation of the Oracle replacement capability of HUAWEI CLOUD
PostgreSQL Enhanced Edition, the company decides to migrate its solution
platform (MVNE) to HUAWEI CLOUD.
Solution
1. Use Huawei's Oracle replacement evaluation tool to evaluate the
Oracle production database, analyze migration objects, and provide
reconstruction suggestions.
2. Use DRS to migrate Oracle data to HUAWEI CLOUD PostgreSQL
Enhanced Edition.
3. Deploy applications on PostgreSQL Enhanced Edition and perform a
large number of system tests. Detect and solve problems during the
tests to ensure that all services are running properly.
4. Formally migrate services on the cloud, replacing Oracle.
Page 47 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Contents
1. HUAWEI CLOUD Database Service Overview
2. Cloud Relational Database Solution Design
▫ MySQL
▫ GaussDB(for MySQL)
▫ PostgreSQL
Microsoft SQL Server
3. Cloud NoSQL Database Solution Design
4. HUAWEI CLOUD Database ecosystem
5. HUAWEI CLOUD Database Solution
Page 48 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
RDS for SQL Server Features
RDS for SQL Server Unique Highlights
Database Delivery O&M Developers End users Provides the most complete Microsoft commercial editions: Enterprise Edition,
administrator personnel
Standard Edition, and Web Edition of SQL Server 2008 R2, 2012, 2014, 2016,
Management Deployment Development Access
and 2017
Application
Provides the most commercial features: AD domain controller adding, TDE
transparent encryption, MSDTC distributed transactions, DB Link, replication
RDS console
Read-only
Instance subscription (used only as the subscription end), port modification, Audit, email
management Backup Read/Write
Instance access Enabled service configuration, read-only instance adding (only for the 2017 enterprise
Backup and
Failover edition), Agent Job, Agent Alerts, and Agent Operators
restoration Primary Standby
Instance Read replica
instance instance Provides efficient and flexible backup and restoration capabilities: database-
monitoring Monitoring Primary/Secondary
Auto scaling Scaling replication level manual backup, database restoration to any point in time on the current
Log
management instance, existing instance, or new instance within 5 minutes
Parameter
configuration
Page 49 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
RDS for SQL Editions and Instance Types
Controllable costs
Web Edition
Cost-effective
Page 50 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Versions and Specifications for SQL Server
Precautions
Commercial Specification Upper
Database Version Single Primary/Standby Read Replica Remarks
Edition Limit
SQL Server 2008 R2 Not supported Supported Not supported
SQL Server 2012 Supported Supported Not supported Currently, only the 2017 Enterprise Edition supports 5
read replicas. Other editions support only
Enterprise
SQL Server 2014 Supported Supported Not supported 60 vCPUs | 512 GB primary/standby DB instances because only the 2017
Edition
Enterprise Edition uses the Always On HA cluster
SQL Server 2016 Supported Supported Not supported architecture.
SQL Server 2017 Not supported Supported Supported
SQL Server 2012 Supported Supported Not supported The highest specifications of the 2012 and 2014 Standard
16 vCPUs | 128 GB Edition are 16 vCPUs and 128 GB due to Microsoft
SQL Server 2014 Supported Supported Not supported product constraints.
Standard Edition SQL Server 2016 Supported Supported Not supported Microsoft released the maximum specifications of the
2016 Standard Edition, which is 24 vCPUs and 128 GB
24 vCPUs | 192 GB
SQL Server 2017 Supported Supported Not supported memory. To maximize performance, the specification can
reach 24 vCPUs and 192 GB memory.
SQL Server 2008 R2 Supported Not supported Not supported
Due to Microsoft product constraints, the web edition
SQL Server 2012 Supported Not supported Not supported supports only the maximum specifications of 16 vCPUs
and 64 GB memory and does not support HA
Web Edition SQL Server 2014 Supported Not supported Not supported 16 vCPUs | 64 GB
deployment. Only the basic edition is supported.
SQL Server 2016 Supported Not supported Not supported However, we provide the single-node failover function
based on cloud service features.
SQL Server 2017 Supported Not supported Not supported
Page 52 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
RDS for SQL Server HA
SQL Server 2017 Other Editions
Primary/Standby 1 primary node, 1 standby node, 1 primary node and 1 standby node
Stronger and 5 read replicas
switchover From SQL Server 2008 to 2016, the
expansion SQL Server 2017 supports a maximum image architecture supports only 1
of 5 read replicas, greatly increasing primary and 1 standby deployment
Primary node Standby node
the read and write performance on mode.
the primary node. Minute-level switchover
Faster DR Second-level primary/standby From SQL Server 2008 to 2016, the
switchover primary/standby failover is
SQL Server 2017 uses the Always On performed based on the database
high availability architecture, achieving granularity. The switchover is slow,
zero RTO and offering the highest and the RTO increases from 30
level of online application capabilities seconds to 180 seconds.
in the industry. No support for complex
More flexible architectures scenarios
More Multiple scenarios such as one primary The SQL Server instances that are
scenarios node plus two standby nodes, cross- based on the image architecture
region DR, and local DR with read cannot be effectively configured or
Read Read Read Read Read replicas will be supported in a flexible
replica 1 replica 2 replica 3 replica 4 replica 5 expanded.
way in the future.
Page 53 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
RDS for SQL Server vs Self-Built SQL Server
RDS for SQL Server fully complies with Microsoft's best practices,
effectively improving the comprehensive performance of HA Test Based on the 2008 R2 Enterprise
databases on the cloud and providing you with excellent online Edition
experience. 1500000
500000
• Complete the configuration of more than 40 SQL Server servers.
0
• Complete the optimal parameter configuration for 74 instances of 9 2U4G 4U16G 8U32G 16U128G
SQL Server versions.
HW 2008 友商 2008 2018
Competitor
Page 54 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Microsoft Ecosystem Customers : SQL Server
ISVs: Deploy application databases on the cloud. Automotive enterprises: Deploy services in physical stores on the cloud.
Online 4S store The independent services of each
Software vendors such as Yonyou, Grasp, Local 4S store
SaaS offline 4S store are migrated to the
Kingdee, and IrobotBox have deployed their cloud, making O&M more convenient,
ECS
service databases on HUAWEI CLOUD RDS information synchronization more
for SQL Server. After services are migrated RDS efficient, and effectively reducing
PaaS to the cloud, service availability and data software and hardware costs.
SQL reliability are greatly improved, effectively
DDM DBSS DRS In addition, it helps enterprises avoid
Server SSL DBlink DBSS
improving comprehensive competitiveness. commercial risks caused by offline use
Ventilation, of commercial databases.
Equip Network Business
IaaS
fire-extinguish,
water, and planning server
OS Yonyou Kingdee Grasp
ment RDS GAC
electricity VOLVO Geely
room System Honda
OBS
Hotel: Deploy core services on the cloud. Others: finance, insurance, healthcare, education, government, retail, logistics...
Large hotel service providers in China, such
as Zhongruan and Jinjiang, have deployed New Summary: Migrating traditional
JOMOO DHL DaZhen
their core services on RDS for SQL Server. g on-premises database services to
Huawei provides a complete online service the cloud is an inevitable trend.
migration solution to ensure that your core Tianjin
Public Chengdu Xin Chao RDS automatic instance hosting
services can be securely migrated to the Jy365.net
Security Woncore Media has brought many advantages,
cloud without interruption. Bureau
such as convenient deployment,
Hong
Kong
Open
Yihai high availability, high reliability,
Jin Huazhu University ...
Zhong Zhong Kerry and high security.
ruan Hotels An
of China
jiang Group
Page 55 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Contents
1. HUAWEI CLOUD Database Service Overview
▫ GeminiDB
Page 57 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
DDS Capabilities and Features
DDS is a MongoDB-compatible database service that is secure, highly available, reliable, scalable, and easy to use. It provides a variety of
functions, including DB instance creation, scaling, redundancy, backup, restoration, monitoring, and alarm reporting. Currently, DDS provides
three DB instance types: cluster, replica set, and single node.
Management and
MongoDB Three Architectures High Availability High Reliability High Security Monitoring
Page 58 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
DDS Deployment Mode : Single Node
Feature
s
1. Ultra-low costs, renting only one node
2. Supports 10 to 1,000 GB data storage
3. High availability is not supported. If a node becomes faulty,
services will become unavailable.
Application Scenarios
Page 59 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
DDS Deployment Mode : Replica Set
Feature
s
1. If a primary node goes down or becomes faulty, the secondary
node takes over services. If the secondary node is unavailable, a
hidden node takes over, ensuring high availability.
2. Supports 10 to 2,000 GB data storage
Application Scenarios
Page 60 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
DDS Deployment Mode : Cluster
Feature
s
1. A sharded cluster consists of mongos, config, and shard.
2. Each shard is a replica set that stores service data. You can create 2 to
12 shards storing 10 to 1000 GB each. Total cluster storage space
ranges from 20 to 12,000 GB.
3. Scale-out capability: Online specification change and horizontal scaling
are provided.
Application Scenarios
Page 61 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
DDS Enhanced Edition Competitiveness
Architecture Evolution Architecture Advantages
In minutes In hours
Application Separation Application Scalability
of storage Compute resource Compute resource
Driver and Driver
compute N-1 node 2 node
Router Router Reliability
Fault tolerance Fault tolerance
Page 62 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
DDS Functions and Features
Instance Management Billing Mode Backup and Restoration Monitoring
Page 63 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Database Audit Logs
Service process Console
The Audit Logs tab is added to display audit logs. RDS and DDS allow users to enable audit log with
The list of archived logs is available for download.
one click and set the audit log retention period
Set audit and audit policy. These capabilities are developed
The audit log content is
policies and
displayed on the GUI. and integrated based on the open-source
audit log Download and display
archiving the archived logs. community edition.
policies. Agent
VM
Execute the audit log settings OBS
delivered by the console.
Audit logs can be used to trace data change
Store archived
Read audit logs on a VM. records. After the audit log function is enabled,
Upload archived audit logs to Upload data audit logs.
OBS. to OBS. user information, command execution time, and
Setting
Kernel executed SQL statements are recorded, which
• Set the audit policy (adding, deleting,
modifying, and querying databases effectively improves database security.
and tables) based on the input
parameters of the Agent.
• Dynamic validation Audit logs can be retained for up to 732 days.
• Output log files in a standard way.
• Do not display built-in accounts such
as ddsAdmin.
Page 65 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
DB Instance Recycle Bin
Recycle bin
The recycle bin is used to restore instance data in the following scenarios to
improve data reliability: Customers forget to renew the service due to arrears.
The service is deleted by mistake. The service is deleted maliciously.
Note: During the instance restoration, the root password of the restored
instance needs to be reset by the tenant.
Page 66 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Freezing and Unfreezing DB Instances
Page 67 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Fine-Grained Permission Control
Fine-grained policies are used to control permissions of multiple tenants in an enterprise. Some operations on
instances (resources) in a project can be performed only by one or a group of users. That is, user permissions are
minimized and permissions are assigned based on resource instances.
Page 68 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Contents
1. HUAWEI CLOUD Database Service Overview
Page 69 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
GeminiDB - Cloud Native
Document Wide-column design, benchmarking with peer products of AWS and Azure
model model in the industry
MongoDB API Cassandra API Competitors in China only enhance the open-source version
and do not have similar products.
Gemini DB Based on Huawei's unique storage pool technology Data
Multi-Model
NoSQL Service Function Virtualization (DFV)
Massive data storage, real-time strong consistency (cross-
Redis API InfluxDB API AZ), high performance, and high reliability
K-V model Time series Widely used in various scenarios such as governments,
model enterprises, e-commerce, games, advertisements, and social
networking
Page 70 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
GeminiDB Advantages
Page 71 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
GeminiDB Architecture Features
Agent layer
Page 72 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Separated Compute and Storage Doc. DB
GeminiDB Architecture Evolution and Advantages
Architecture Evolution Architecture Advantages
In minutes In hours
Application Application Scalability
Compute resource Compute resource
Driver Driver
N-1 nodes 2 nodes
Router Router Reliability
Fault tolerance Fault tolerance
Shard 1 Shard 2 ... Shard N Shard 1 Shard 2 ... Shard N Triple Community Edition
Performance
Primary Primary Primary
Write performance performance
Primary Primary Primary
Secondary Secondary Secondary
Backup and 20 min 100 min
Secondary Secondary Secondary Distributed Storage Pool
restoration restoration restoration
(100 GB data)
Page 73 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
GeminiDB for MongoDB Scenarios
Technical Highlights Application Scenarios
Flexible data models: MongoDB provides flexible data models based on E-commerce: Sub-documents for different purposes are embedded in
JSON documents to meet the requirements of diversified and changeable user or product documents for easy query.
data models. You do not need to use DDL statements to modify the table
Game: User information, equipment, and bonus points are stored in
structure.
embedded documents to meet the requirements of quick development
OLAP-friendly: Compared with other key-value databases, MongoDB creates
and rollout and the requirements change greatly (The data model
indexes for attributes in documents and supports full-text search, which is
more efficient. becomes large.).
Logistics: MongoDB stores order information. The order status is
continuously updated during delivery, and stored in JSON embedded
arrays. All order changes can be read in one query.
Social media: MongoDB stores user information and WeChat moment
posted by users, and supports functions such as "discover people nearby"
through geographical location indexing.
IoT: MongoDB stores device status and logs and supports multi-
dimensional analysis. Flexible models support differentiated data and
logs of different devices.
Page 74 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
GeminiDB for MongoDB VS MongoDB
Open Source MongoDB GeminiDB for DDS
The oplog window overflow issue occurs during Higher performance: Replication in replica set mode is
primary/secondary synchronization under the write load. offloaded to storage, improving the performance of the
The default writeconcern configuration may cause data primary node by 50%. Full load sharing in cluster mode,
inconsistency. improving write performance by three times
EVS disks have multiple copies, which cause two-layer Better data reliability: The storage layer provides strong data
storage redundancy with the primary and secondary nodes consistency across AZs with three copies.
at the mongo layer. More efficient scalability: Minute-level scaling based on shared
Data balancing takes a long time during capacity storage requires no data migration.
expansion. More stable latency: No balancing process or latency jitter
Database access performance jitter occurs during occurs during capacity expansion.
balancing.
The primary/secondary switchover may cause data rollback
on the primary node.
Page 75 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
GeminiDB for Cassandra
Architecture Evolution Architecture Advantages
Scalability
Minute-level Hour-level
Application Application
Compute resource Depends on data
expansion migration.
Driver Driver
Data Three copies ensure Eventual consistency
consistency strong consistency. Depends on the application
and system clock.
... 50%+ better than the
DataNode DataNode DataNode DataNode DataNode DataNode community edition P99 > 25 ms
Performance
delay P99 < 10 ms GC severely affects
Local Disk Local Disk Local Disk the latency.
Distributed Storage Pool No GC problems
Page 76 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
GeminiDB for Cassandra Scenarios
Technical Highlights Application Scenarios
Wide-column model: A large number of attribute columns (1000+) are • Pan-Internet: It is widely used in user attributes, social media
supported, and fields can be quickly added or deleted.
analysis, recommendations, e-commerce product data and
High throughput: 1 million+ TPS
shopping cart, and collaboration/instant message push.
Large-scale distributed deployment: ultra-large capacity (100+ nodes and
100 TB+ capacity) Cassandra provides high-performance write, strong query,
Linear expansion: Seamlessly expands to hundreds of nodes, improving large-scale horizontal expansion, and massive storage
performance linearly. capabilities.
Usability: CQL, which is a SQL-like access language • Industrial IoT: The flexible wide-column data model and
high-performance intensive write capabilities make Cassandra
suitable for sensor data. In IoT scenarios, sensor data of
various industries, such as manufacturing, logistics,
healthcare, energy, and agriculture, can be managed.
Page 77 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
GeminiDB for Cassandra VS Cassandra
Open-source Cassandra or Alibaba Cloud
GeminiDB for Cassandra
Cassandra service
Full GC causes severe performance deterioration and Higher performance: The write performance is doubled,
jitter. and the read performance is improved by 10 times.
The final consistency mechanism depends on the system Better data reliability: GeminiDB provides strong data
clock. The consistency problem is severe. consistency across AZs with three copies.
EVS disks have multiple copies, which cause two-layer More efficient scalability: Minute-level scaling based on
storage redundancy with the primary and secondary shared storage requires no data migration.
nodes at the Cassandra layer. More stable latency: No balancing process or Full GC
Data migration takes a long time during capacity problems occur during capacity expansion. P99 latency
expansion. <10 ms
Data migration deteriorates the performance greatly.
The read-write performance is poor.
...
Page 78 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
GeminiDB for KV
Architecture Evolution Architecture Advantages
Redis Community Edition Advantageous
GeminiDB for KV HUAWEI CLOUD Redis
Features
GB level
Storage TB level
Application Application Unable to process
Single cluster
TB-level data
Driver Driver
Real-time persistence Disk fault and data loss
Router Reliability Scheduled disk flushing and
of three copies
master asynchronous hot backup
Page 79 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
GeminiDB for KV Scenarios
Technical Highlights Application Scenarios
Key-Value database: supports data persistence. string: ID mapping or user information of the account system
Various data structures: string/list/hash/set/zet/stream/hyperloglog and hash: role information/equipment prop experience
other common data structures
list: message queue/email notification/comment list
Large capacity: unlimited memory capacity and massive storage
set: qualification/whitelist/blacklist
High reliability: real-time data persistence and quick failover
sorted set: ranking-related scenarios, relationship chains, and delay queues
ttl: activity gift package and access frequency restriction
geo: ranking of game performance in a region
Page 80 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
GeminiDB for KV vs Redis
Open-source Redis or Redis cloud services of GeminiDB for KV
competitors
High compatibility: 100% compatible with Redis APIs, without
Full memory data storage, which is costly
the need to modify application code
Limited storage capacity and rapid service growth lead to
Large capacity: TB-level data capacity, solving the capacity
frequent capacity expansion and high O&M costs.
insufficient problem of native Redis
The primary/secondary relationship is not strong. When
High reliability: Strong consistency of multiple copies, solving
the network is disconnected, the primary node is under
the problem of data loss in native Redis
great load, and it is difficult to rebuild the secondary
node. As a result, services are exposed to high availability High availability: Second-level failover and cross-AZ
risks. deployment
Data needs to be migrated during capacity expansion, High scalability: Elastic capacity expansion, fast and flexible
which is time-consuming, complex, and service-affecting. Ultra-fast backup: Ultra-fast backup of massive data, no extra
Slow service recovery after process restart load on the system
PITR: point-in-time restore, restoring data to any point in time
Page 81 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
GeminiDB for InfluxDB
Architecture Evolution Architecture Advantages
In minutes
Application Application Scalability Not supported
Compute resource
Driver Driver
N-1 nodes No HA
Router Router … Router Reliability
Fault tolerance
Page 82 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
GeminiDB for InfluxDB Scenarios
Time-series data services have the following characteristics: O&M monitoring: Monitors VMs, containers, services, and applications in
The data volume is large. Hundreds of millions of data records are the Internet and IT systems.
generated per second. IoT/IoV: Collects information from sensors of devices, machines,
Time-based numeric data is generated continuously. connected devices, environments, and vehicles.
Data is mainly written and read, but not updated. Financial transaction system: Involves securities, stock, and currency
transaction data.
A large number of statistical queries are required, including the count,
maximum value, minimum value, and average value within a certain Event application: Traces interaction data between users and customers.
period of time. Business intelligence tool: Tracks key indicators and overall service
health status.
Autonomous vehicles continuously collect changing data in the
environment.
The automatic transaction algorithm continuously collects market data.
Page 83 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
GeminiDB for InfluxDB vs InfluxDB
Open-source or competitor's InfluxDB products GeminiDB for InfluxDB
Page 84 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
GeminiDB APIs , Versions , and Key Features
MongoDB Compatible with MongoDB 3.4/4.0, with up to 32 vCPUs, 128 GB memory, 2 to 12 shards, and 100 TB storage
space. Compute nodes can be flexibly added. Storage space can be scaled up in seconds. Audit logs and fast
backup and restoration are supported.
Cassandra Compatible with Cassandra 3.11.3, with up to 32 vCPUs and 128 GB memory, and 200-node ultra-large
cluster. Compute nodes can be flexibly added. Storage space can be scaled up in seconds. Fast backup and
restoration is supported.
GeminiDB
K-V Compatible with Redis 5.0, with up to 32 vCPUs, 128 GB memory, and 2 to 12 nodes. Compute nodes can be
flexibly added. Storage space can be scaled up in seconds. Data persistence and fast backup and restoration
are supported.
InfluxDB
Compatible with InfluxDB 1.7, with up to 32 vCPUs and 128 GB memory, and 2 to 12 nodes. Cold data is
separated from hot data, doubling compression performance and achieving a tenfold increase in compression
rate. Concurrent multi-thread query, massive timelines, and multi-dimensional inverted indexing are supported.
Page 85 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Contents
1. HUAWEI CLOUD Database Service Overview
Page 86 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Foreword
This part includes:
Current Challenges
Database Architecture Evolution
DDM Introduction
DDM Features
Summary
Page 87 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Current Challenges
A well-known ticket-booking system crashed on the first day it
went online.
Service
The system crashed when selling tickets of a famous singer's system
concert.
The system of a primary school crashed during course booking.
Database
The donation system on a public welfare website always freezes.
Page 88 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Single-Node Database Architecture
What is a single-node database architecture?
It is an architecture that uses a single-node database, simple and easy to operate.
Service
Low Reliability
The single-node database architecture only
With a single-node architecture, services are 100% impacted if a database fault occurs. supports small- and medium-sized service
RDS primary/standby DB instances only resolve partial issues. systems.
Page 89 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Scaling Up
Service Service
Service system system
system
Database Database
Database
4C 8G 64C 512G
Buying high-end hardware is a way out for customers who Midrange server with redundant hardware
does not care about prices.
However, this way does not work as the business scale
Hindering service innovation
increases.
Page 90 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Scaling Out
Service system
Service
system
One single-node database can be divided into multiple separate databases as required.
These databases form a cluster to prevent single points of failure (SPOFs) and can be managed separately,
without the need of using advanced hardware.
This is a mature practice for distributed databases and has been proven in the database industry.
Page 91 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
DDM Introduction
Distributed Database Middleware (DDM) works with Relational Database Service (RDS) to
provide mature scaling out capabilities,
bringing a single-node database experience to common users.
Page 92 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
DDM Features
Vertical sharding
Horizontal sharding
Read/Write splitting
Seamless scaling out
Distributed transactions
Working with RDS
Page 93 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Vertical Sharding
Customer benefits: support for sustainable growth of services
Database
DDM
Member data
Member
Order shard
Order data shard
Page 94 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Horizontal Sharding
Customer benefits: support for explosive growth of services
Service
system Service system
Database DDM
Order data
Order data Member
Order shard3 shard1
shard1
Horizontal sharding first and then vertical sharding
Determining the sharding method based on data volume
Decreasing database fault impacts to 1/N
Page 95 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Horizontal Sharding Method
Example Order table_0
Sharding by the last
digit of user IDs
Order table_1
Order shard0
Order data
Order table_2
Order shard1
Order table_3
...
DDM provides 14 sharding functions
Order table_8
for users to choose from.
Order shard4
Maintaining data aggregation is Order table_9
recommended.
Log table_202001 Log shard0
Sharding by time range Log table_202002
System log
data Log table_202003 Log shard1
Log table_202004
...
Page 96 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Read/Write Splitting
Customer benefits: suitable for read-intensive services
DDM DDM
Users can create several read replicas for a primary RDS DB instance to offload its read pressure.
Users can enable read/write splitting if a DDM instance still has heavy query load after horizontal sharding.
Reconstructing the service system is not required.
This feature is suitable only for time-insensitive query scenarios because the latest data may not be obtained.
Page 97 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Seamless Scaling Out
DDM DDM
RDS_0 RDS_1
RDS_0 RDS_1 RDS_2 RDS_3
Table_0 Table_2
Table_0 Table_1 Table_2 Table_3
Table_1 Table_3
Page 98 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Distributed Transactions
Service Service system
system
Still like a single-node database
DDM
Database
Database0 Database1
Balance transfer: Transferring steps either
User A transfers $1000 USD to user B
completely succeed or completely fail,
Single-node database experience
$1000 USD is deducted $1000 USD is added
Passed TPC-C from user A's account to user B's account
Page 99 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Working with GaussDB(for MySQL)
DDM DDM
GaussDB(f GaussDB(f
RDS RDS
or MySQL) or MySQL)
Page 100 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Section Summary
Introspection on single-node database architecture
Two methods in the industry are introduced: vertical and horizontal sharding. The
horizontal sharding is the most widely used method in the Internet industry.
DDM provides the most mature Internet industry practices to users.
Core features of DDM
Vertical sharding, horizontal sharding, read/write splitting, seamless scaling out,
distributed transactions, and working with other services
Keywords: transparency, elasticity
Page 101 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Contents
1. HUAWEI CLOUD Database Service Overview
Page 102 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Introduction to DRS
Data Replication Service (DRS) is a stable, efficient, and easy-to-use cloud service for
database online migration and synchronization.
It makes data flow between databases simple and greatly reduces data transfer costs.
You can use DRS to quickly transfer data between databases in various scenarios.
DRS provides multiple capabilities, including online migration, backup migration, data
synchronization, data subscription, and multi-active DR.
Page 103 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
DRS Overview (1)
Typical data migration to the cloud involves the evaluation and migrations of hosts, databases, and storage.
Database migration has high technical requirements. Generally, customers completely rely on the capabilities of
cloud vendors.
Product (Tool) Huawei Description
An integrated migration console. All migration services are
Migration Hub N/A
integrated into one monitoring platform.
An evaluation service that scans the local equipment room or
Migration evaluation Resource Discover Advisor (RDA) resources on other clouds, and provides an overall evaluation and
recommendation for cloud migration.
Application migration Server Migration Service (SMS) A host migration service that migrates applications.
Database migration Data Replication Service (DRS) An online database migration service.
A service that integrates data to the data warehouse and big data
Big data integration Cloud Data Migration (CDM)
(Hive and HBase).
Object Storage Migration Service Files and storage are migrated to OBS. Different migration services
Object storage migration (OMS) are used based on the data volume, but OMS online migration is
Data Express Service (DES) mainly used.
Page 104 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
DRS Overview (2)
HUAWEI CLOUD DRS Product Positioning - Data Transmission Channel, Promoting Online
Database Migration
Data Replication Service (DRS) is a stable, efficient, and easy-to-use service that can
help you migrate databases online and synchronize data in real time. It makes data
flow between databases simple and greatly reduces data transfer costs.
AWS Database Migration Service Alibaba Cloud Data Transmission Service (DTS)
Migrate your database to AWS with DTS migrates data between data sources, like relational
the shortest downtime. databases, NoSQL, and big data (OLAP). It integrates online
migration, data subscription, and data synchronization.
Page 105 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
DRS Overview (3)
Most enterprises require database migration without interrupting services or can tolerate only
short service downtime. This is important for project development and expansion.
• Data synchronization
synchronizes data in real time • Services require short service
• Online migration
between different databases interruption.
migrates databases in
based on the database log
minutes or even
processing technology. • The data volume of the
seconds without
Normally, the latency is in database is huge.
interrupting services or
seconds. It differs from batch
with only short service
synchronization in that batch • A simple and easy-to-use
downtime.
synchronization is asynchronous migration service is required.
in most of the time.
The core technology is data replication. Therefore, this service is named Data Replication Service.
Page 106 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
DRS Overview (4)
Navigated migration, easy to operate Support for mainstream database sources
HUAWEI CLOUD Supports database from various Supports multiple types
Direct sources of databases
• Competitors' clouds (AWS, Azure, • MySQL
Connect/VPN/Internet+SSL
DB Alibaba Cloud, and Tencent Cloud)• SQL Server
RDS/DDS • On-premises IDC • PostgreSQL
AWS/Alibaba databases • Self-built databases on HUAWEI • MongoDB
Cloud/Tencent • Oracle
CLOUD ECSs
Cloud • HUAWEI CLOUD RDS databases Supports various cloud types
Direct Connect/VPN/Internet+SSL
databases • Public cloud
Supports various network
• Public dedicated cloud
DB modes
• Public network • Public full-stack cloud
VPC
On-premises DB • VPN Allows free data
data center • Direct Connect transmission
databases Self-built databases on DRS
• HUAWEI CLOUD VPC • To the cloud
HUAWEI CLOUD
• Out of cloud
DRS is tailored for online migration scenarios to guarantee smooth service migration to the cloud.
No sense of service interruption Zero data loss Safe to use
• Online migration technology • Resumable data transfer and fault retry • Identify problems in advance through pre checks.
• Real-time data synchronization • Migration of data, indexes, and others • Estimate the migration duration.
• No service interruption during migration • Object and data comparisons after migration • Display information properly and in detail.
• Migrate key database parameters.
Page 107 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
DRS Overview (5)
In addition to online migration, DRS offers various data transmission scenarios: data
synchronization, remote disaster recovery, data subscription, and cloud backup (planning).
Each scenario addresses different needs. The main differences are as follows:
Online migration is used to completely migrate the source databases to the current
cloud without interrupting services.
Data subscription is used to notify users of the changed data and allows data access
from downstream services through a certain method.
Remote disaster recovery is used to restore data and services in case of a disaster
by making a complete copy of the data at the remote site.
Page 108 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
DRS Database Migration Best Practices (1)
Technical Migration
Survey Plan-Making Migration Drill
Verification Implementation
1 5 10 Technical verification 13 17
(data migration speed, impact on Migration preparations
Migration scenario Project kick-off meeting services, Drill environment setup (Environment check and tool
migration tool capabilities and deployment)
constraints)
2 6 11 14 18
Service correlation
Plan/tool discussion Risk assessment/emergency plan Drill plan exercise Migration implementation
analysis
Page 109 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
DRS Database Migration Best Practices (2)
Recommendations in the consulting phase
1. The customer knows nothing about DRS and wants to know the service brief, principles, and one-stop
migration operation.
Recommend the customer to visit the DRS portal, which provides clear and vivid introductions with pictures
and texts.
Introduction video
2. The customer has not carried out the migration and wants to know the current DRS capabilities, detailed
requirements, and constraints.
Recommend the customer to visit the current DRS capability matrix at: https://support.huaweicloud.com/en-
us/productdesc-drs/drs_01_0301.html
For the migration environment requirements, visit the following link and see Table 1:
https://support.huaweicloud.com/en-us/productdesc-drs/drs_01_0301.html
Page 110 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
DRS Database Migration Best Practices (3)
Workarounds in the implementation phase
Migration is a special period, during which service and personnel cooperation are the most
important and some operations must be avoided.
For example:
Do not forcibly clear the source database logs.
Do not change or delete the user and its password for connecting to the source database.
Do not lock tables for a long period of time in case that the tables cannot be queried.
To ensure smooth migrations, visit the following link and see Table 2 for the
complete workaround guide:
https://support.huaweicloud.com/en-us/usermanual-drs/drs_15_0007.html
Page 111 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
DRS Database Migration Best Practices (4)
Follow the best practices in the deployment phase.
https://support.huaweicloud.com/en-us/bestpractice-drs/drs_01_0002.html
Page 112 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
DRS usage process
DRS migrates databases based on tasks and the migration process. Once a migration task is
started, DRS automatically migrates data until it is complete.
Learn more about the console and operation details by watching videos and referring to the
user guide and best practices on the official website.
Select a
Log in to Create an Configure Check and Check the
migration
the DRS online source and confirm the task
type and
console. migration destination migration status.
migration
task. databases. task.
objects.
Page 113 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
DRS Application Scenarios (1)
Unique design 1: migration speed limitation,
setting the migration speed upper limit based
on specific time periods
Application scenarios:
For some traffic apps, like game vendors, the
public network and VPN of the source
database cannot be fully occupied during
migration.
If they are fully used, external services or VPN
bandwidth sharing will be affected.
Some services are heavily loaded or customers
do not accept extra workload brought by the
migration during service hours.
Page 114 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
DRS Application Scenarios (2)
Unique design 2: user migration (permissions,
passwords, and definers), completely migrating
the source permission system
Application scenarios:
All migration products in the market do not
support user migration. That is, if the customer
does not understand or pay attention to user
migration, errors will be reported after the
migration. DRS provides a complete set of user
permission inheritance design. User permissions,
passwords, and definers can all be migrated to
the destination database to ensure permission
security and service stability after the migration.
Customers not familiar with database
migration can still carry out fine-grained,
high-quality data migrations.
Page 115 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
DRS Application Scenarios (3)
Unique design 3: parameter comparison,
ensuring service stability after migration
Application scenarios:
All migration products in the market do not
support parameter migration. Different
database parameters will result in service
errors (for example, the number of sessions
decreases after the migration). DRS migrates
key parameter settings closely related to
services and performance, which prevents
service errors or performance deterioration
caused by the failure to inherit the source
environment settings. In this way, customers
not familiar with database migration can
still carry out fine-grained, high-quality
data migrations.
Page 116 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
DRS Application Scenarios (4)
Unique design 4: data verification platform, a good cutover
helper 1 Object-level comparison
Checking whether
Application scenarios: objects are missing
All migration products in the market do not support data Database Table
comparison, and customers have to do the verification
View Stored
themselves. In contrast, DRS provides comparison functions: procedure
Object-level comparison Trigger
Data-level comparison
Comparisons can be scheduled or canceled. 2 Data-level comparison
Comparing data in detail
With scheduled comparison tasks, customers can compare data
Row Content
during off-peak hours, for example at midnight, and view the comparison comparison
comparison result on the next day to understand the migration
condition.
Canceling comparison
In this way, customers not familiar with database migration 3 at any time
can still carry out fine-grained, high-quality data migrations.
Page 117 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
DRS Application Scenarios (5)
Unique design 5: trigger and event migration
Application scenarios:
All migration products in the market do not support the migration of triggers and
events. Proficient customers pay attention to these details. This is because key
service logics exist in triggers and events. If they cannot be migrated, service
errors will be reported and even irreparable losses may occur.
In this way, customers not familiar with database migration can still carry out
fine-grained, high-quality data migrations.
Page 118 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Contents
1. HUAWEI CLOUD Database Service Overview
Page 119 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Data Admin Service
Data Admin Service (DAS) manages databases on the web-based console. It provides database development, O&M,
intelligent diagnosis, and enterprise-level DevOps to facilitate your cloud database usage and maintenance.
DAS
Standard Enterprise
Console Edition
edition
For DBA and O&M For Developers Enterprise DevOps Platform
DAS offers a wide range of functions, The Standard Edition provides a best- The Enterprise Edition provides a
covering instance performance data, in-class experience. You no longer need database DevOps platform that
slow SQL analysis, SQL explorer, real- to install clients locally for a visualized supports data protection, change
time performance analysis and operation experience. Diverse database review, operation audit, and R&D self-
diagnosis, as well as analysis of historical development functions are available, service. It helps enterprises implement
operations, helping you quickly locate including data and table structure standardized, efficient, and secure
any issue occurring during database synchronization, online editing, and management with large-scale
operations and prevent potential risks. intelligent prompts for SQL input. databases.
Page 120 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
DAS vs DB Management Software
Anytime, Anywhere RDS Kernel Source Code Secure Operations
The web-based console frees you up Optimization Built-in security measures guarantee the
from local client installation and Focusing on O&M pain points, the stable running of databases and make
supports access anytime, anywhere. kernel is optimized and enhanced to user operations more secure. For
support functions such as emergent example, when a user executes a slow
database O&M and SQL explorer. SQL statement, DAS automatically uses a
Robust Features timeout mechanism to prevent database
A wide range of features are performance jitter caused by the long
available for you to choose from, Professional Database execution time.
such as binlog-based data tracking O&M Platform
and rollback, SQL statement DAS offers a professional database
diagnosis, scheduled SQL task O&M platform that supports SQL
DevOps Platform for Large
execution, 10 GB data import and explorer, slow query logs, daily Enterprises
export, and cross-instance database inspection, exception diagnosis, real- The Enterprise Edition helps enterprises
table structure synchronization. time analysis, performance trend, and implement standardized, efficient, and
Multiple types of databases, emergency channel. secure management of large-scale
including MySQL, SQL Server, databases, satisfying diverse DevOps data
PostgreSQL, DDS, and GaussDB are management needs.
all supported.
Page 121 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
DAS Console
Real-time sessions &
Data-based + intelligent architecture performance
Performance trend
Data Intelligent Overall AI
Compute
graphics diagnosis analysis prediction
Slow query logs
Page 122 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
A Good Helper Focusing on DBA
Automatic data collection, analysis, and diagnosis, helping DBAs easily handle data O&M.
1
Daily inspection: checks the instance status every day to eliminate potential risks.
Daily health report: automatically carries out diagnosis for instances in the past 24 hours, provides all-round analysis and exception
detection, points out risks, and offers optimization suggestions.
2 Real-time analysis: helps quickly locate the exceptions of the current instance.
Performance graphs: shows the performance trends of the current instance.
Emergency channel: allows users to kill unnecessary connections to shorten the fault time. Thus, instance suspension is no longer a threat.
3 Historical performance data: provides data mirroring for the instance running status when a fault occurs.
SQL analysis: full SQL and slow SQL analysis help find out the root causes of most instance faults.
Automatic exception detection: automatically analyzes exceptions within a specified period and provides possible fault causes and
optimization suggestions.
Page 123 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
DAS Standard Edition
Page 124 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Develop Databases Using DAS
1 Create tables simply like filling forms.
View, edit, insert, and delete table data in the same way as
2
editing an Excel file.
4 Interactive graphics show you lock wait sessions in real time, helping
you to be a DBA professional.
Page 125 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
DAS Enterprise Edition
Data is the core asset of enterprises. How to control the access permission to sensitive data, implement database
change security, trace and audit operations, and lower the DBA labor cost are crucial requirements for an
enterprise when the number of database instances reaches a certain scale.
Employees do not obtain the database usernames and passwords. To query a database, one needs to
Data access security
apply for the permissions first. The total query count, number of queried rows, and maximum number
of rows that can be returned in each query all can be controlled by permissions.
Sensitive data Sensitive fields are automatically identified and marked. Sensitive data is anonymized when employees
protection query and export data.
Support for SQL change risk identification, service review control, automatic detection of database high
Change security watermark during change, and clear of data in big data tables.
All operations on a database are recorded in audit logs, and database operations can be traced.
Operation audit
Efficiency Support for security risk and approval process customization, permission granting of service owners and
improvement and cost DBA roles in databases, and rights of performing low-risk database changes delivered to service directors
reduction to lower labor costs.
Page 126 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Contents
1. HUAWEI CLOUD Database Service Overview
Page 127 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
IoV Database Solution
HUAWEI CLOUD Database Solution
Endpoints Administrator Monitoring APN network
Data archiving
There are various types of data in the IoV scenario, and each
ELB AAD type has different characteristics. HUAWEI CLOUD database
Authenti Protocol services provide multiple DB engines to meet various data
Back-end Terminal cation parsing Message queue OBS requirements of customers.
management management
servers server Vehicle and user data modes are fixed, requiring high
Config Location consistency. The data volume is large. Therefore, the
data data
DCS combination of DDM and RDS is recommended.
Vehicle's trace data
The data configuration mode is fixed, requiring high data
Fault data
Battery data
Alarm data consistency. The data volume is relatively small. Therefore,
Monitoring data
RDS DDS RDS is recommended.
DBSS DDM+RDS The location, fault, and alarm data modes change frequently,
Vehicle condition analysis which has high requirements on the database write capability.
1 Fuel consumption analysis
Battery analysis 3 2 Therefore, DDS is recommended.
Shard 1 Shard 2 Shard 3 Vehicle data
User data Driving behavior analysis Vehicle's traces, battery, and monitoring data can only be
inserted. The data volume to be written is large and have time
RDS RDS RDS Time series database DDS attributes. Therefore, a time series database is recommended.
Page 128 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Internet Game Database Solution
HUAWEI CLOUD Database Solution
Login and registration Player payment Integrated platform Operations platform
• Select a database that suits the game type. Select
Page 129 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Internet Live Streaming Database Solution
Distributed Cache Service
Structured data
Redis/Memcached
Data management and application HUAWEI CLOUD Database Solution
User Content
information sharing
User
Media data mgmt service service • Medium-sized Internet customers: Enable the
information Relational Database
User
Service relationship
Media data proxy mechanism to separate database read
service
MySQL mgmt service
User Real-time and write, dynamically add read replicas to
Comment synchronization User Hotspot
relationship relationship
data
data Data Replication mgmt service
content
analysis service
meet the elastic scaling requirements.
Service
• Large-size Internet customers: Use
User Data subscription and
Recommendati
behavior on message
conversion import Distributed Database Middleware (DDM) to
Big data platform
data data Big data application
Content recommendation achieve database/table sharding and
and cloud search services
Content search Content
service recommendation read/write splitting, enabling high concurrent
Unstructured data Document Database
access to mass data.
Service Image storage Image browsing
MongoDB service service
• The combination of DCS, RDS, and DDS can
Video data Image data
Object Storage Video storage Video browsing be used to cope with service peaks.
service service
Service (OBS)
Page 130 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
HUAWEI CLOUD – Oracle Replacement
Oracle replacement process HUAWEI CLOUD Database
Solution
Project Service Migration Service Migration Service Common solution (MySQL or PostgreSQL)
evaluation reconstruction drills verification implementation cutover • PostgreSQL and MySQL of the Community Edition
have the capabilities to replace Oracle. DRS can help
Networking diagram of Oracle replacement migrate Oracle data. In addition, the features that
services (applications) strongly depend on Oracle are
reconstructed by ISVs and customers.
HUAWEI CLOUD
Local equipment room • PostgreSQL Enhanced Edition is developed by the
Huawei database service team. It adapts to Oracle
syntax, data types, and functions and supports more
SSL encryption than 90% of Oracle syntax, reducing reconstruction
Source Oracle® HUAWEI CLOUD difficulties, shortening the reconstruction period, and
Database primary reducing investment. The product has passed the
Public IP software copyright certification and is supported by
DRS (EIP) database
addresses Huawei professional database kernel team.
Migration scheduling Distributed solution (GaussDB(for MySQL))
Data adaption • Distributed database is a trend. Huawei GaussDB(for
Incoming whitelist MySQL) is based on the storage DFV. The one-write
Inbound and
and multi-read architecture is a cloud-native
outbound rules HUAWEI CLOUD
distributed architecture. DRS supports migrations
standby
from Oracle to GaussDB(for MySQL).
database
Page 131 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Summary
HUAWEI CLOUD Database Service Overview
Cloud Relational Database Solution Design
Cloud NoSQL Database Solution Design
HUAWEI CLOUD Database ecosystem
HUAWEI CLOUD Database Solution
Page 132 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Quiz
1. In the Internet live streaming scenario, the service traffic in peak hours is several times higher than that in off peak
hours, for example, breaking celebrity news and popular headlines. Structured and unstructured data needs to be
stored. Which of the following database services are required?
A. DCS+RDS+DDS
B. DCS
C. RDS+DRS
D. DRS+DDS
Page 133 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Thank You
www.huawei.com
Page 134 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.