0% found this document useful (0 votes)
7 views37 pages

05 Database Services

The document provides an overview of database services offered by Huawei Cloud, covering both relational and non-relational databases. It explains key concepts, characteristics, and differences between these database types, as well as the functionalities of the Data Admin Service (DAS). Additionally, it highlights the advantages of cloud-native databases, including high availability, scalability, and optimized performance.

Uploaded by

djdonplata
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views37 pages

05 Database Services

The document provides an overview of database services offered by Huawei Cloud, covering both relational and non-relational databases. It explains key concepts, characteristics, and differences between these database types, as well as the functionalities of the Data Admin Service (DAS). Additionally, it highlights the advantages of cloud-native databases, including high availability, scalability, and optimized performance.

Uploaded by

djdonplata
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 37

Database Services

Foreword
⚫ After learning basic compute, storage, and networking services on
Huawei Cloud, let's move on to database services.

Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page 2


Objectives
⚫ After completing this lesson, you will be able to understand:
 Basic database concepts
 Characteristics of Huawei Cloud relational and non-relational
database services
 Differences between relational and non-relational databases
 How to use database services to set up a service architecture
 How to use Data Admin Service (DAS)

Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page 3


Contents
1. Introduction to Database Services

2. Relational Database Services

3. Non-Relational Database Services

4. Data Admin Service (DAS)

Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page 4


Besides OBS, EVS, and SFS, are there any other
services that can be used to store data?

Object Storage Service Elastic Volume Service Scalable File Service


OBS EVS SFS

Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page 5


Different Data Types
Unstructured data Structured data

Book Name Published Year Author

The Great Gatsby 1925 F. Scott Fitzgerald

Lord of the Rings 1968 J. R. R. Tolkien


Documents Compressed Audio and
packages video files Fully structured Semi-structured
{
Year: 2018,
Author: {
Byliner: J. R. R. Tolkien,
Drafter: Internet pal}
}

RDS DDS
EVS OBS

Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page 6


Relational Database vs Non-Relational Database
Relational Database Non-Relational Database
Traditional applications require databases New Internet applications require
that can process transactions, complex databases that can store massive data
Application model
queries, and joint queries, and maintain and handle a large number of concurrent
data integrity. requests.
10 ms-level
ms-level
Access performance Depending on query complexity and the
Irrelevant to the amount of stored data
amount of stored data
Semi-structured (key-value pairs and
Data types Fully structured
documents)
Vertical scaling
Vertical scaling
Scalability Horizontal scaling: primary instance +
Horizontal scaling: cluster + read replicas
read replicas
Depending on database configurations
Data consistency Strong consistency Strong consistency or eventual
consistency
Depending on the upper limit of DB
Storage space limit Depending on the DB engine
Copyright © Huawei Technologies Co., Ltd. All rights reserved. nodes in different
Page 7 scaling modes
Diversified Huawei Cloud Databases
Relational Non-Relational
For traditional database workloads For fast-growing workloads

RDS GaussDB GeminiDB DDS

RDS for MySQL GaussDB(for MySQL) GeminiDB Mongo API

GeminiDB Cassandra API

GeminiDB Influx API


RDS for PostgreSQL GaussDB
GeminiDB Redis API

Database ecosystem
Building complete database solutions

DRS DAS DBSS

Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page 8


Advantages of Cloud Native
Database optimization Database optimization Database optimization
Database development Database development Database development
Backup and restoration Backup and restoration Backup and restoration
High availability High availability High availability
Database engine Database engine Database engine
management management management
Patch and configuration Patch and configuration Patch and configuration
management management management
Software system Software system Software system
OS OS OS
Physical device maintenance Physical device maintenance Physical device maintenance
Power supply, cooling, and Power supply, cooling, and Power supply, cooling, and
cabinets cabinets cabinets
Buildings, locations Buildings, locations Buildings, locations

Traditional DC Deployed on
deployment Cloud native
cloud servers
Green: Huawei Cloud's Blue: Customer's
Legend:
responsibilities responsibilities
Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page 9
Contents
1. Introduction to Database Services

2. Relational Database Services

3. Non-Relational Database Services

4. Data Admin Service (DAS)

Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page 10


Relational Database Service (RDS)
⚫ A service that manages database engines and
resources
⚫ Compatible with mainstream relational
database engines

MySQL, PostgreSQL, SQL Server


⚫ A cloud-native service that is easy to maintain
RDS ⚫ Built-in automated backup and patching
⚫ HA configuration and automatic
switchover/failover within seconds
⚫ Multiple read replicas supported

Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page 11


Building a Simplified Architecture

⚫ A database service, for example, RDS

App Server functions as a database resource


manager.
ELB RDS ⚫ Applications access the database using
Primary
App Server IP addresses, the same way as before.
⚫ DB engines and versions are selected
while you are creating databases.
⚫ However, this architecture has service
Backups in availability issues.
OBS

Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page 12


High Availability of RDS

AZ AZ1 AZ2

App App 1 App 2

Failover Failover

Primary Standby Primary Standby

Primary/standby deployment within an AZ Primary/standby deployment across AZs

Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page 13


Building an HA Architecture
⚫ Databases are deployed in different AZs to
App Server
RDS ensure high availability.
Standby
⚫ DB engines ensure failover within seconds.

ELB ⚫ Using primary/standby deployment can

App Server avoid service interruptions during


RDS
Primary maintenance.

⚫ If the primary instance fails, workloads can

be smoothly switched over to the standby

Backups in instance.
OBS
Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page 14
Backup Characteristics of RDS
Full data backup + Binlog backup
Current time
Automated Automated Automated Automated
backup backup backup backup
Binlog
(every 5 minutes)
Binlog Binlog Binlog
Backups are
02
1 2 3 4 stored in OBS Automated
and can be Binlog
OBS binlog
restored to backups can
backup and
the customer's be restored to
manual
PITR on-premises a specific
backup are
data center. point in time.
Latest restorable time supported.

Latest automated Latest Binlog


backup 01 03
1 2 3 Log backups

OBS

Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page 15


RDS Read/Write Splitting
Application

Write Read
Basic functions
request request
Read/write splitting ⚫ A unified read/write splitting address is
address (proxy)
provided, transparent to applications.
⚫ Read weights are configurable for each node.
Write ⚫ If a health check detects that a read replica
request
Read Read Read
request request request fails or the I/O latency of a read replica goes
HA
beyond your preset threshold, read requests
are no longer distributed to the read replica.

Primary Standby Replica 1 Replica 2 Replica 3

Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page 16


Scaling Out Using Read Replicas
⚫ Read replicas can be added or

deleted as needed.
RDS
Standby ⚫ The number of read replicas
App Server
Read replica supported per DB instance

ELB varies by DB engine type. A

DB instance supports up to 10
App Server
Read replica
read replicas.

⚫ Data can be replicated across

RDS AZs within a given region.


Primary

Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page 17


RDS for MySQL Architecture
Developers End users

Application

RDS console
DBAs Read-only
Read/write
Instance
management Backups
Instance access
Backup and
Monitor Primary Failover Standby
restoration Read replicas
instance instance
Instance monitoring
Scaling Replication
Log management
Delivery and Parameter
O&M personnel configuration

Storage Storage Storage

Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page 18


Other Huawei Database Services

⚫ Huawei DB engine
⚫ Compatible with MySQL clients
⚫ Decoupled storage and compute
⚫ Cross-AZ HA
GaussDB(for MySQL)
⚫ Three copies stored to ensure reliability
⚫ Scale-out and scale-up

Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page 19


Decoupled Storage and Compute

Read replica Primary node Read replica ⚫ Compute and storage are decoupled,
Compute improving performance to several times
layer
that of open-source MySQL.

⚫ RDMA is used for database transmission,


RDMA
eliminating I/O performance bottlenecks.

⚫ With DFV distributed storage,


Storage
layer GaussDB(for MySQL) supports up to 128

Shared distributed DFV storage TB of storage.

Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page 20


High Reliability: Zero Data Loss and Fast Fault
Recovery
⚫ Cross-AZ deployment and cross-region backup, improving instance DR capabilities
 Compute layer: When the primary node is faulty, a read replica is automatically promoted to
primary, achieving a zero RPO.
 Storage layer: Three data copies are stored for fault tolerance. Services will remain uninterrupted
even if one copy becomes inaccessible. Read-only Read/Write Read-only

Read replica Primary node Read replica


DBMS (read/write)
(read-only) (read-only)

Shared disk pool

Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page 21


Multi-Dimensional Scaling and Mass Storage
⚫ Bidirectional scaling of compute nodes
 As the nodes are virtual resources, their
Read/Write Read-only
specifications can be changed.
 There can be one primary node and up to 15 x 15
read replicas for a DB instance. DBMS
Primary node Read replica Compute node
(read/write) (read-only) scale-out
⚫ Storage pooling
 Up to 128 TB of storage is supported per
instance.
Shared disk pool
 Adding compute nodes does not increase
storage costs. Three copies of a shared disk pool can
support 15 nodes at the upper layer.
 Storage is billed on a pay-per-use basis and
can be easily scaled up with no downtime.

Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page 22


A More Powerful Huawei Database Service

⚫ Independent innovation from Huawei


⚫ A distributed relational database
⚫ Primary/Standby instances supported

GaussDB ⚫ Intra-city cross-AZ deployment


⚫ Up to 1,000+ nodes
⚫ Petabytes of storage

Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page 23


GaussDB Uses a Shared-Nothing (Sharding)
Architecture

Shared-Everything Shared-Disk Shared-Nothing


CPUs, memory, disks are Only disks are shared. CPUs and CPUs, memory, and disks are not
shared. memory are not shared. shared.
Typical example: SQL Server Typical example: Oracle RAC Typical example: Hadoop

DB DB

DB DB DB DB
DB DB DB

Disk Disk Disk Disk


Disk

Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page 24


What will happen if there is a
lot of concurrent data?
Contents
1. Introduction to Database Services

2. Relational Database Services

3. Non-Relational Database Services

4. Data Admin Service (DAS)

Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page 26


GeminiDB Features
⚫ Huawei-developed DB engine
⚫ Distributed multi-model NoSQL database service
⚫ Compatible with mainstream NoSQL APIs of
Cassandra, DynamoDB, MongoDB, InfluxDB,
Redis, and HBase
⚫ Decoupled storage and compute
⚫ Compute resources scaled within minutes and
storage within seconds
GeminiDB

If needed, you can select DDS


Document
instances that use the
Database Service MongoDB engine.
(DDS)

Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page 27


GeminiDB Architecture

⚫ High availability
Application Application Application Application Application
 If a compute node fails, workloads
can be switched over within
seconds.
Cassandra API Mongo API Influx API Redis API HBase API  Three copies of data are stored, so
the system can run fine if a storage
node fails.
⚫ Unlimited scalability
Node 1 Node 2 Node 3 Node 4 . . . Node 5  Compute nodes are stateless and
can be quickly scaled out.
 Shared storage means you can add
nodes in a click or two and without
interrupting services.
Distributed storage pool

Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page 28


Features of Non-Relational Databases

01 03
There are no
logical Users can locate
Each data relationships data using key
record is a between the values rather
structured data records in than through
document. a collection. complex
queries.
02

Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page 29


Precautions for Using Non-Relational
Databases
⚫ Define data keys and indexes so there is no need to scan entire collections,
and data can be located faster.
 Do not use hot keys.
 Keep records simple.
 Data can be located in milliseconds no matter how much data there is.
⚫ If necessary, use optimistic locks for transactions at the application layer.
⚫ If there is a lot of traffic, use clusters.
 Select an appropriate sharding algorithm to locate data.
 Distribute data access across all cluster nodes and avoid hot partitions.

Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page 30


Contents
1. Introduction to Database Services

2. Relational Database Services

3. Non-Relational Database Services

4. Data Admin Service (DAS)

Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page 31


Data Admin Service (DAS)
⚫ Data Admin Service (DAS) is a one-stop database management platform that allows you to manage
Huawei Cloud databases on a web console. DAS offers database development, O&M, and intelligent
diagnosis, making it easier to use and maintain databases on the cloud.

⚫ O&M functions

⚫ No client required ⚫ Host and instance


Developers DBAs
performance data analysis
⚫ Visual operations
⚫ Slow and full SQL statement
⚫ Online access analysis
⚫ Databases and table ⚫ Real-time database
creation, SQL statement performance diagnosis and
execution. analysis
⚫ Historical data analysis

Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page 32


Summary
⚫ Have a good command of basic concepts of databases.
⚫ Have understood the characteristics of Huawei Cloud relational
and non-relational database services.
⚫ Have understood the differences between relational and non-
relational databases.
⚫ Have understood how to use databases to set up a service
architecture.
⚫ Have learned how to use DAS to manage your databases.

Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page 33


Quiz
Which of the following are the advantages of Relational Database
Service (RDS) over on-premises databases?
A. High availability
B. Elastic scaling and fast upgrade
C. Easy O&M
D. Low initial investment

Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page 34


Acronyms and Abbreviations
⚫ AZ: availability zone
⚫ DAS: Data Admin Service
⚫ DRS: Data Replication Service
⚫ ECS: Elastic Cloud Server
⚫ EVS: Elastic Volume Service
⚫ OBS: Object Storage Service
⚫ SFS: Scalable File Service
⚫ EIP: Elastic IP
⚫ VPC: Virtual Private Cloud
⚫ RDS: Relational Database Service

Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page 35


Recommendations
⚫ Huawei Cloud websites
 Huawei Cloud: https://www.huaweicloud.com/intl/en-us/
 Huawei Cloud Developer Institute: https://edu.huaweicloud.com/intl/en-us/

Huawei Cloud
Developer Institute

Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page 36


Thank You.
Copyright © 2024 Huawei Technologies Co., Ltd. All Rights Reserved.
The information in this document may contain predictive statements including,
without limitation, statements regarding the future financial and operating results,
future product portfolio, new technology, etc. There are a number of factors that
could cause actual results and developments to differ materially from those
expressed or implied in the predictive statements. Therefore, such information is
provided for reference purpose only and constitutes neither an offer nor an
acceptance. Huawei may change the information at any time without notice.

You might also like