You are on page 1of 131

Cloud Database Solution Design

Module 2 Cloud Architecture Design of Conventional Application

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

2. Cloud Relational Database Solution Design

3. Cloud NoSQL Database Solution Design

4. HUAWEI CLOUD Database ecosystem

5. HUAWEI CLOUD Database Solution

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

Database backup and restoration Database backup and restoration

Database patch upgrade Database patch upgrade


Database scaling
Database software installation Database software installation Database high availability
Database backup and restoration
System patch upgrade System patch upgrade
Database patch upgrade

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

3. Cloud NoSQL Database Solution Design


4. HUAWEI CLOUD Database ecosystem
5. HUAWEI CLOUD Database Solution

Page 7 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
RDS for MySQL

These companies are using 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

Application Data migration

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

Elastic scaling Parameter configuration


Log
management
Parameter
configuration Storage Storage Storage

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

CC EAL3+ certificate ISCCC information China Classified


protection of
security qualification
cybersecurity

Cloud Assessment China cybersecurity Security test certificate


Gold O&M issued by China Information
Certificate inspection
Technology Security
Evaluation Center

Management Security management 1


console The management console does not touch users' business data.
1 Network security 2
Manage • VPCs, subnets, security groups, VPNs, and SSL
• Industry-leading database protection policies, such as DBSS
2 DB instance
App 3 Data security 3
Public/Private DB
network  Static data encryption
 Transparent data encryption

Page 12 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Data Reliability - Distributed Cloud Storage

On the RDS console, COMAC Fujian Huabo Geely Auto JOMOO


App click Scale Storage
Space.

RDS 1. The command of 1. Pay-per-use purchase: A minimum increment is 10 GB.


scaling up storage
2. Online scaling: Storage space can be scaled up any time
space is delivered.
without interrupting service running.
EVS 2. RDS is notified of
3. No optimization required: The performance linearly increases
scaling up storage
Distributed space. after the scaling up.
cloud storage 4. Static encryption: Storage encryption prevents data leakage.

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)

CMGE Zhanyou Snail Games


Hoolai Game
App Game

Backup
(full/incremental)
• Backup cycle: 7 to 732 days

RDS OBS • Pay-per-use: Free EVS storage of the same size as the

Restore (PITR) purchased storage, and no expansion upper limit


• Data reliability: eleven nines

Page 14 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Ultra-High Performance DB Instances

Local disk Huawei EVS disk


MCS instances combine Huawei Container with the local
and cloud disk hybrid storage technology. Data pages
Log online are stored on cloud disks, ensuring high data reliability
switching
and scalability. Redo logs and binlogs are stored on
local disks, greatly improving I/O performance.

Application scenarios: suitable for customers who have


Online Data pages
high requirements on performance and I/O latency,
enabling
or such as online games and real-time transaction systems.
disabling

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:

IOPS = min{3500 + (Instance storage space – 40) x 50, 33000}

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

3. Cloud NoSQL Database Solution Design


4. HUAWEI CLOUD Database ecosystem
5. HUAWEI CLOUD Database Solution

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

GaussDB(for MySQL): Huawei Cloud Native Financial-Level Distributed Database

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

GaussDB(for MySQL) supports real-time failover, which is completed within seconds.


 Mass data storage

GaussDB(for MySQL) supports up to 128 TB of data storage.

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


 Scaling out read-only nodes

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.

 Online specifications upgrade

Node specifications can be scaled up online to meet expansion requirements.

 Mass data storage

Up to 128 TB of storage is available for pay per use.

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

Redo log Pages • Database storage as a service


Storage
Nodes
Shared, reliable, scale-out storage

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

Storage pool Distributed storage pool


Wasted storage: One standby node requires three data copies. High storage space utilization: Only three data copies are required
High network resource overhead: Logs and pages need to be written to each node. regardless of the number of standby nodes.
Long fault recovery time: Data synchronization takes several minutes. Low network resource overhead: 86% less than traditional networks
Compute resource expansion: A restoration takes several hours. Short fault recovery time: within 10s
Storage resource expansion: Manual expansion is required. Up to 10 TB of storage Computing expansion: about 6 minutes, irrelevant to the data volume
(not recommended) is supported. Storage expansion: up to 128 TB; support for automatic expansion

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

• Small amount of data transmission between primary and


standby nodes
Shared Storage
• Quick SQL Node rebuilding
Coherence traffic Page writes • Cross-AZ failover or switchover

Redo log writes Page reads • Ecosystem compatibility

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

Transaction Buffer Pool SQL Parse SQL Node SQL Node

Storage Node Storage Node Storage Node

Slice Service Slice Service Slice Service

Log Write Log Replay Page


Manager ... ...

Crash Log Log Log


Log Read Replication
Recovery Replication Replication

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

3. Cloud NoSQL Database Solution Design


4. HUAWEI CLOUD Database ecosystem
5. HUAWEI CLOUD Database Solution

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

• Hybrid Various plugins


• Spatiotemporal,
OLTP + geography,
heterogeneous, image,
OLAP text retrieval, time series,
stream computing,
Hybrid Multiple multi-dimension, and
computing data models column-based storage PG is excellent in
common scenarios and
especially recommended
Enterprise- Oracle Low-cost migration
class replacement Solution 1: in the four scenarios.
• Reliability PostgreSQL Enhanced
• Stability Edition
Solution 2:
• Data PostgreSQL
consistency Community Edition +
Oracle plugins

Page 33 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
PostgreSQL Uses Cases
PostgreSQL applications in industries

Biochemistry
Telecom Finance Internet Manufacturing & Agriculture

• Nippon Telegraph • Deutsche Börse Group • Instagram • Japanese auto • BASF's


and Telephone • La Caixa • Tencent production line Agrochemicals
Corporation • ABN AMRO Group • Alibaba • German auto Division
• KT Corporation • Trust-Commerce • AMAP production line • American Affymetrix
(formerly Korea • Ping An Technology • CD Baby • Fujitsu Biochip
Telecom) • China Merchants Bank • FlightAware • Philips • Genentech
• Taiwan Mobile • Sky-mobi • Deutsche Borse • American Chemical
• Skype • Qunar Society
• Baidu

Page 34 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
PostgreSQL Features
Reliability, stability, data consistency, and integrity

Always the most important features for database products


1
Powerful concurrency control Diversified data types
Support for four transaction isolation 7 2 Support for not only traditional data types, but
levels defined in ANSI SQL-92 also binary large objects, arrays, spatial data
types, network data types, JSON, and XML, all of
which can be customized
Excellent performance
and abundant indexes Various third-party plugins
Query optimizers, parallel computing, complex 6 3 Geographic information, space,
query optimization, hash aggregation, hash heterogeneous database access, machine
JOIN, subquery, analysis query, function learning, text retrieval, image, time series,
processing, and other analysis functions multi-dimension, word segmentation,
Indexes: B-tree, GiST, GIN, SP-GiST, Hash, Brin, blockchain, column storage, and similarity
rum, bloom, and bitmap algorithms, all of which can be customized
High security
Field encryption
5 4 Open architecture
Permission control based on databases, Support for functions, operators, indexes, and
schemas, tables, and columns languages, extending functions and maintaining
Identity authentication and certificate kernel stability

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

The balance between databases and applications varies in different industries


Follow Internet companies and development stages of companies. It depends on the reliability on databases
or applications.

Use too many heterogeneous databases, such as


In most cases, multi-model databases can be used to reduce development and
relations, documents, buffers, time series,
maintenance costs.
retrieval, and graphs

The maturity of database code, platform compatibility, open source license,


Just solve the current problems technical reserve, community ecosystem, learning cost, and maintenance cost
need to be considered.

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.

Database usage High Medium Low

PG OLAP Hybrid OLTP MySQL


Service characteristics

Stored procedure usage High Medium Low

External data source Heterogeneous Homogeneous

Data type User-defined JSON, space, etc. Common


Multi-model usage Space, geography,
Relational
and time series

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

Advantage 1 Advantage 2 Advantage 3

• Impact of the US • Mature technologies • Active participation of


Entity List • Growing database all parties
• "Independent and talent • Strong customer
controllable" required requirements
by the regulatory
department

 Question: Why is PG compatible with Oracle?


In addition to the preceding features, the key point is that PG is extremely similar to 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

Accelerated parallel query and Stronger


LLVM-based JIT compilation performance
Enhanced PITR, high-intelligent HA,
reliability data migration, and data verification

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 Service Yonyou Wisedu Kingdee Saiyun


evaluation reconstruction

 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

Word Spatiotemporal Column


Image _int hll

recognition segmentation storage Time auto_explain timescaledb

Heterogeneous database sequence btree_gin zhparser


Geographic
information communication Machine btree_gist pg_jieba
learning citext pg_pathman
Blockchain Partitioned Stream
JSON cube postgis
table computing
dblink postgis_topology
Monitoring International product UUID
dict_int postgis_tiger_geocoder
numbering standard dict_xsyn address_standardizer

Virtual Audit Similar image earthdistance address_standardizer_data_us


column search fuzzystrmatch oracle_fdw

Similarity Text Tree type hstore ora_migrator


algorithm retrieval If the pre-installed
intagg obs_fdw
Slow SQL plugins cannot
Map route hint_plan intarray pg_cron
meet customer
isn pg_hint_plan requirements,
Diverse plugins facilitate service development. Plugins such as Ltree, pgcrypto, pg_stat_statements, uuid-ossp, customers can
pg_trgm, plpgsql, tablefunc, unaccent
submit service
PostgGIS, timescaleDB, and zhparser are widely used and favored
tickets for manual
in many sectors. PG has been pre-installed with 30+ plugins. installation.

Page 44 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Oracle to PostgreSQL Enhanced Edition
Migration networking diagram

On-premises HUAWEI CLOUD


equipment room

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

For operation details, see https://support.huaweicloud.com/en-us/drs/index.html

Page 45 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Customer Case (1)
Internet

Business pain points


ELB NAT Overall service structure
Load balancing gateway The company's ERP system uses Oracle and SQL Server commercial
databases to provide enterprise management services for customers.
Traditional IBM WebSphere Traditional ERP business migrates from a traditional on-premises
application server network software application model to a Software as a Service (SaaS) model.
IBM web server IBM web server deployment structure The licensing constraints on commercial databases block the way of
Web layer
migration to the cloud.
Enterprise Customer
Application resource relationship Solution
management management
server cluster HR Accounting 1. After an in-depth evaluation of the business model and a survey
management
management
team of the deployment architecture and database features, select
WebSphere
WebSphere
WebSphere Supply chain Marketing HUAWEI CLOUD RDS for PostgreSQL as an alternative to Oracle.
management management
Deployment Application
Application server 2. Based on automatic function test cases of each module at the
Manager server Application layer
service layer, identify the incompatible features between HUAWEI
RDS for Data layer
Enterprise DDS MongoDB CLOUD RDS for PostgreSQL and Oracle and then adjust service
PostgreSQL DDS
management code. Based on the performance test cases for key business
information system mongos scenarios, identify the performance deterioration of HUAWEI
CLOUD RDS for PostgreSQL compared to Oracle and then
Primary
Read-only optimize the features accordingly.
Read-only
Standby Shard 1 Shard 2 Shard N

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

Storage Storage Storage

Page 49 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
RDS for SQL Editions and Instance Types

Enterprise Edition High performance and reliability

Advantages High reliability

Standard Edition Ultra-high


performance
Edition
Features Cheap and versatile
Wide selection

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

• Complete the configuration of more than 200 Windows instances. 1000000

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

TPCC test result is as follows:


HA Test Based on the 2014 Enterprise
Note: TPM indicates the number of transactions processed per minute. Edition
3000000
Test scenarios: 2000000
• The TPCC international standard model is used for the
1000000
performance test. The model is not optimized.
• The test tool is downloaded from HarmmerDB official website. 0
• The test procedure has been uploaded to the Huawei official 4U16G 8U32G 16U128G 32U256G 60U512G
website. You can perform the test by following the reference. HW 2014 友商 2014
Competitor 2018

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

2. Cloud Relational Database Solution Design

3. Cloud NoSQL Database Solution Design


 Document Database Service

▫ GeminiDB

4. HUAWEI CLOUD Database ecosystem

5. HUAWEI CLOUD Database Solution

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

Cluster, replica HA architecture Automated/Manual - Multiple layers of - Visualized monitoring of


100%
set, single node and cross-AZ backup and data security protection CPU, memory, I/O, and
Compatibility
deployment restoration - VPC network network
Cloud migration Cluster: TB-level - Three-copy - Automatically isolation - One-click scaling and
without service storage and online architecture generate backups - SSL connection specification change
reconstruction expansion (cluster/replica set) every day and retain - Security groups to - Management of error
Support for Replica set: 2 TB - Three-AZ them for up to 732 control outgoing logs and slow query
MongoDB storage and 3 deployment days. and incoming logs
Community Edition copies (cluster/replica set) - Manual backups can traffic - Parameter setting
3.2, 3.4, and 4.0. Single node: Highly be kept permanently. - EVS disk encryption - Automatic upgrade and
cost-effective - Backup and restoration patch installation for
- Audit logs small versions

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

• None-core data storage


• Learning practice
• Services in the test environment
• Enterprise internal systems

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

• Demand for high availability and data storage less than 2 TB

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

• Demand for high availability, massive data processing, and scale-out


capabilities

Page 61 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
DDS Enhanced Edition Competitiveness
 Architecture Evolution  Architecture Advantages

DDS Community Edition DDS Enhanced Edition Advantageous


HUAWEI CLOUD Other Cloud Platforms
Features

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

Shard 1 Shard 2 … Shard N Shard 1 Shard 2 … Shard N 96 TB 64 TB


Cost-
Single cluster Single cluster
Primary Primary Primary Primary Primary Primary effective
Secondary Secondary Secondary
Backup and 20 min 100 min
Secondary Secondary Secondary Distributed Storage Pool
restoration restoration restoration
(100 GB data)

Page 62 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
DDS Functions and Features
Instance Management Billing Mode Backup and Restoration Monitoring

 Creating a DB instance  Backup policy (the  CPU usage


 Yearly/Monthly
 Restarting a DB instance maximum retention
 Pay-per-use  Memory usage
 Deleting a DB instance period is 732 days).
 Resetting a password  Auto-renewal  Manual backup  IOPS
 Public network access  Change to  Point-in-time restore  Total connections
 Manual switchover (replica set)
Yearly/Monthly  Current active
 Changing instance class  Table-level PITR (replica
 Scaling up the storage set) connections
space  Backup file downloading  Disk utilization
 Changing a private IP Log Management  Storage space usage
address
Parameter Group
 Changing a port  Error logs (log details and Management
 Changing a security download)  Parameter modification
group
 Slow logs (log details and  Parameter comparison
 Changing a DB instance
download)  Parameter groups
name
  Parameter group binding
Exporting resources  Audit logs

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.

The fault can be rectified in the following scenarios:

 After a pay-per-use DB instance is deleted, it can be restored from the


recycle bin within a specified period.

 After a yearly/monthly DB instance is unsubscribed and deleted, it can be


restored from the recycle bin within a specified period.

 After a yearly/monthly DB instance is frozen and deleted, it can be


restored from the recycle bin within a specified period.

 After a yearly/monthly DB instance is deleted maliciously, it can be


restored from the recycle bin within a specified period.

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.

The database provides the following default permission settings


to differentiate resource usage scenarios:

RDS Viewer, RDS DBA, and RDS Admin


RDS Viewer has only the read-only permission on the resources.
That is, with RDS Viewer, you can only view the resources but
cannot perform specific operations.
RDS DBA has all permissions except deleting DB instances. It is
suitable for database administrators.
RDS Admin has full permissions.

Page 68 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Contents
1. HUAWEI CLOUD Database Service Overview

2. Cloud Relational Database Solution Design

3. Cloud NoSQL Database Solution Design



Document Database Service
 GeminiDB

4. HUAWEI CLOUD Database ecosystem

5. HUAWEI CLOUD Database Solution

Page 69 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
GeminiDB - Cloud Native

 Compute and storage separated architecture, 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

Multi-model API Compute and storage


Active-Active
Cassandra-compatible APIs separation
• Distributed
01 MongoDB-compatible APIs 02 • Minute-level node 03 architecture
Redis-compatible APIs scaling
• Fault tolerance of
InfluxDB-compatible APIs • Second-level storage
N-1 nodes
capacity expansion

High performance Massive data High reliability


04 Multiple times higher 05 Storing up to 100 TB data 06 • Minute-level backup
than that of the on a single instance restoration
Community Edition • Strong data consistency

Page 71 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
GeminiDB Architecture Features
Agent layer

Proxy Proxy Proxy ... Proxy Advantages:


Node Node Node Node
• Decoupling of compute and storage resources
and independent elastic scaling
Compute layer

DBNode DBNode DBNode DBNode


• Compute node for full load sharing
......
Data Data Data Data • Strong consistency across multiple copies
Model Model Model Model
• Data migration is not required during scaling
Distributed shared storage engine
with distributed shared storage.
Storage layer

• Remote Direct Memory Access (RDMA)


Storage Pool
makes ultra-low latency communications
between compute and storage nodes possible.

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

DDS Community Edition GeminiDB for MongoDB Advantageous


HUAWEI CLOUD Other Cloud Platforms
Features

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

Open-source Cassandra GeminiDB for Cassandra Open-source self-


Advantages HUAWEI CLOUD
built

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

Backup and 20 min 5x


restoration Backup restoration About 100 minutes
100 GB data

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

slave Shard 1 Shard 2 ... Shard N In minutes In hours


Scalability
Resource expansion Data migration
Primary Primary Primary

N-1 nodes 1/N node


master master Distributed Storage Pool Availability
Fault tolerance Fault tolerance
slave slave

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

GeminiDB for InfluxDB Advantageous Open Source


Open Source InfluxDB HUAWEI CLOUD
Features InfluxDB

In minutes
Application Application Scalability Not supported
Compute resource
Driver Driver
N-1 nodes No HA
Router Router … Router Reliability
Fault tolerance

Shard 1 Shard 2 ... Shard N


InfluxDB 100 TB 2 TB
Storage
InfluxDB InfluxDB InfluxDB Single cluster Single node
InfluxDB

Local Disk Distributed Storage Pool


Performance 20% Native

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

Open-source InfluxDB  High compatibility: 100% compatible with InfluxDB APIs


 No cluster mode is available, and horizontal expansion is not supported.  High availability: Full load sharing of clusters and cross-AZ high
 HA is not supported. availability
 Storage capacity < 2 TB  Large capacity: up to 100 TB
 Reliability: depends on storage reliability (cloud disks or local disks).  High reliability: multi-copy strong consistency, zero data loss
 Elastic scaling is not supported.  High scalability: Cluster deployment and second-level scaling are
supported.
Alibaba InfluxDB  High performance: 30% increase, 3x to 8x performance of
 No cluster mode is available, and horizontal expansion is not supported. OpenTSD
 Storage capacity < 2 TB  High compression ratio: 17x compression, 5x higher than that of
 Performance: write and query performance OpenTSDB
 Elastic scaling is not supported.

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

2. Cloud Relational Database Solution Design

3. Cloud NoSQL Database Solution Design

4. HUAWEI CLOUD Database ecosystem


 Distributed Database Middleware

Data Replication Service

Data Admin Service

5. HUAWEI CLOUD Database Solution

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.

This is because these systems use


a single-node database.
What exactly is the cause?

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

Difficult to Scale Storage Capacity system


 Restricted by the SSD or cloud disk size, the storage capacity generally ranges from
1 TB to 2 TB, with the maximum of 4 TB.
 Similarly, the disk IOPS also has an upper limit.
Difficult to Scale Compute Capacity Database
 The database runs on one node, whose CPUs, memory, and network capability are
limited by the node configurations.
 Frequent operations on large tables cause the database performance to deteriorate
sharply, affecting services.

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

Database Database Database Database


Database

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

Core Advantages Service system

 SQL computing and transaction Still like a single-node database


processing
 Scaling out of databases DDM
 Flexible scaling of storage and
computing resources RDS RDS
 Single-node MySQL experience

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

Service system Service system

Still like a single-node database

Database
DDM
Member data

Member
Order shard
Order data shard

 Rapid growth of core service data


 Subsystem-based sharding
 No impacts on the service system during sharding

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

Member data Member


Order shard0 Order shard2
shard0

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

Service system Service system


Write/Read (strong consistency)
Read (weak consistency)

DDM DDM

RDS_0 RDS_1 RDS_0 RDS_0 RDS_1 RDS_1

 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

Service system Service system

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

 Meeting rapid service growth after horizontal sharding


 Helping customers trim costs at the early stage of services

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)

Service system Service system

DDM DDM

GaussDB(f GaussDB(f
RDS RDS
or MySQL) or MySQL)

Replace RDS with GaussDB(for MySQL) in high-end scenarios.

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

2. Cloud Relational Database Solution Design

3. Cloud NoSQL Database Solution Design

4. HUAWEI CLOUD Database ecosystem



Distributed Database Middleware
 Data Replication Service

Data Admin Service

5. HUAWEI CLOUD Database Solution

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.

What is What is What


database real-time data scenarios
online synchronization? is DRS used?
migration?

• 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 synchronization is used to continuously synchronize data between databases


within the millisecond latency to guarantee service data sharing.

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.

Cloud backup is used to periodically store external backups on the cloud.


It is asynchronous and cost-effective.

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

3 Information collection 7 12 15 19 Test verification


(data volume, service Drill result and
Migration network evaluation Initial plan review (function and performance
pressure, and migration process
database specifications) tests)

8 Migration plan 16 20 Cutover and migration result


4
(user permission information, Final plan review and verification
Migration network parameter group migration/ confirmation (data integrity and correctness
confirmation)
online migration/offline migration)
Data Migration Service DRS (Database Product Dept) 21
9
Professional Service Project Team (SRE Team) for application Post-migration observation
Migration period/project plan migration, China Enterprise Professional Service Dept and assurance

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.

The Best Practices provide detailed illustrations of the entire process.


 Architecture
 Migration Suggestions
 Note on Migration
 Migration Preparations
 Migration Procedure
 Cutover Process

Visit the following link for more information:

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

2. Cloud Relational Database Solution Design

3. Cloud NoSQL Database Solution Design

4. HUAWEI CLOUD Database ecosystem



Distributed Database Middleware

Data Replication Service
 Data Admin Service

5. HUAWEI CLOUD Database Solution

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

Metric Data Dimension AI


aggregation computing association Training SQL explorer

Message Time series Large amount of Real-time analysis


Data
subscription data text data
Fault diagnosis
Host Instance SQL
performance performance explorer Metadata
Daily inspection

Management and Emergency channel


RDS Database kernel
control platform
Intelligent parameter
recommendation

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.

Daily inspection, identifying issues in advance

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.

Quickly locating and rectifying faults

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.

Fault review, finding out the fault root cause

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

Metadata SQL Tuning


Database, table list, table size SQL statement optimization and rewriting
Index size, stored procedure, Index optimization suggestions
function Display of execution plans

SQL Query Window Synchronization


Intelligent SQL input prompts DAS Import of up to 10 GB SQL file
Export of entire databases, specified tables, and
Query results online editing
Quick reuse of history query records queried SQL statements
Comparison and synchronization of table structure
consistency between databases across instances
Data Operation
Quick and automatic fill-in of the Structure Operation
table test data Visualized table structure editing
Binlog-based parsing for retrieving
data deleted by mistake

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.

3 Automatic SQL input prompts help you input SQL statements.

4 Interactive graphics show you lock wait sessions in real time, helping
you to be a DBA professional.

5 Automatically generated table data facilitates your


development and debugging.

6 Rollback tasks allow you to retrieve data if the data is modified or


DAS makes your database development deleted by mistake.
easier and simpler, just like taking SLR
photos with a smartphone. 7 The timeout mechanism prevents database damages
caused by slow SQL queries.

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

2. Cloud Relational Database Solution Design

3. Cloud NoSQL Database Solution Design

4. HUAWEI CLOUD Database ecosystem

5. HUAWEI CLOUD Database Solution

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

Transaction Platform Operations the database specifications based on the game


Account data data
data data
operation policy.
Game login Player payment Emails, friends, activities, Daily active users,
Player registration Mall transaction communities, subtasks recharge rate, retention • The login and transaction services have fixed modes
statistics, and activity
release
and high requirements on data consistency. RDS
MySQL is recommended.
Game region 1 Game region 2 Game region N • Log data records all changes of game information.
The data volume is large and the data write speed
Gaming server Gaming server Gaming server
is high. Therefore, the DDS cluster is recommended.
Combat data Combat data ... Combat data
• The DDS replica set is recommended because the
Log data Log data Log data
Role attribute, Role attribute, Role attribute, combat data is ever-changing and the write speed is
equipment, battle record, equipment, battle record, equipment, battle
and behavior log and behavior log record, and behavior log
high.

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

2. Which of the following products are derived from PostgreSQL?


A. Amazon Redshift
B. Greenplum
C. TimeScalDB
D. PipelineDB
E. EnterpriseDB

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.

You might also like