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

Module 8 - Databases

Uploaded by

Huy Nguyễn
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 views39 pages

Module 8 - Databases

Uploaded by

Huy Nguyễn
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/ 39

Module 8: Databases

Section 1: Amazon Relational Database Service


5

Amazon Relational Database


Service (Amazon RDS)
Unmanaged versus managed services

Unmanaged: Managed:
Scaling, fault tolerance, and Scaling, fault tolerance, and
availability are managed by availability are typically built in
you. to the service.

6
Challenges of relational databases
• Server maintenance and energy footprint
• Software installation and patches
• Database backups and high availability
• Limits on scalability
• Data security
7

• Operating system (OS) installation and patches


Amazon RDS

Managed service that sets up and operates a relational database in the


cloud.
8

AWS Cloud

Users Application
Servers Amazon RDS
From on-premises databases to Amazon RDS
Database in Amazon Elastic Database in Amazon RDS or
On-premises database
Compute Cloud (Amazon EC2) Amazon Aurora

Application optimization Application optimization Application optimization


Scaling High Availability Scaling High Availability Scaling High Availability
Database backups Database backups Database backups
Database software patches Database software patches Database software patches
Database software installs Database software installs Database software installs
Operation system patches Operation system patches Operation system patches
AWS AWS
Operating system install Operating system install Operating system install
provides provides
Server maintenance Rack Server maintenance Rack Server maintenance Rack
and stack servers Power, and stack servers Power, and stack servers Power,
HVAC, network HVAC, network HVAC, network
Managed services responsibilities
You manage:
• Application optimization

AWS manages:
• OS installation and patches
• Database software installation and patches
• Database backups
• High availability
• Scal ing Amazon RDS
• Power and racking and stacking servers
• Server maintenance
Amazon RDS DB instances
Amazon RDS =
MyS QL

Amazon Aurora
DB Instance Class
• CPU
• Mem or y Microsoft SQL Server

M • Network performance

DB Instance Storage
PostgreSQL

Amazon RDS DB
main instance MariaDB
• Magnetic
• General Purpose (solid state drive, or SSD)
• Provisioned IOPS Oracle

DB engines
Amazon RDS in a virtual private cloud (VPC)

AWS Cloud
Availability Zone

VPC
Public subnet

12

Internet
Users gateway Amazon EC2

Private subnet

Amazon RDS
High availability with Multi-AZ deployment
AWS Cloud
Availability Zone 1 Availability Zone 2

VPC
Public subnet

Amazon EC2 Application

Private subnet Private subnet

M Synchronous S
Amazon RDS
RDS Standby
instance
instance
High availability with Multi-AZ deployment 2

AWS Cloud
Availability Zone 1 Availability Zone 2

VPC
Public subnet

Amazon EC2 Application

Private subnet Private subnet

M Synchronous S
Amazon RDS
RDS Standby
instance
instance
Amazon RDS read replicas
AWS Cloud
Features Availability Zone
•Offers asynchronous replication VPC
Public subnet
•Can be promoted to master if needed

Amazon EC2 Application


Functionality
•Use for read-heavy database Private subnet

workloads
M R
•Offload read queries Amazon RDS Read Replica
instance
instance
Use cases

 High throughput
Web and mobile applications  Massive storage scalability
 High availability
16


Low-cost database
Ecommerce applications 
Data security

Fully managed solution
 Rapidly grow capacity
Mobile and online games  Automatic scaling
 Database monitoring
When to Use Amazon RDS
UseAmazon RDS when your application Do not useAmazon RDS when your
requires: application requires:
• Complex transactions or complex • Massive read/write rates (for example,
queries 150,000 write/second)
• A medium to high query or write rate – • Sharding due to high data size or
Up to 30,000 IOPS (15,000 reads + throughput demands
15,000 writes) • Simple GET or PUT requests and
• No more than a single worker node or queries that a NoSQL database can
shard handle
• High durability • Relational database management
system (RDBMS) customization
Amazon RDS: Clock-hour billing and database characteristics
Clock-hour billing –

• Resources incur charges when running

Database characteristics –
• Physical capacity of database:
• Engine
• Size
• Memory class
Amazon RDS: DB purchase type and multiple DB instances

DB purchase type –
• On-Demand Instances
• Compute capacity by the hour
• Reserved Instances
• Low, one-time, upfront payment for database instances that are reserved with
a 1-year or 3-year term 19

Number of DB instances –
• Provision multiple DB instances to handle peak loads
Amazon RDS: Storage
Provisioned storage –
• No charge
• Backup storage of up to 100 percent of database storage for an active
database
• Charge (GB/month)
• Backup storage for terminated DB instances

Additional storage –
• Charge (GB/month)
• Backup storage in addition to provisioned storage
Amazon RDS: Deployment type and data transfer
Requests –

• The number of input and output requests that are made to the database

Deployment type—Storage and I/0 charges vary, depending on whether you deploy to –
• Single Availability Zone 21

• Multiple Availability Zones

Data transfer –
• No charge for inbound data transfer
• Tiered charges for outbound data transfer
Section 2: Amazon DynamoDB
Relational versus non-relational databases
Relational (SQL) Non-Relational
Data Storage Rowsand columns Key-value, document, graph
Schemas Fixed Dynamic Focuses on
collection of
Querying Uses SQL documents
Scalability Vertical Horizontal

ISBN Title Author Format {


ISBN: 3111111223439,
Withering Jackson, Title: “Withering Depths”,
Example 3111111223 439
Depths Mateo
Paperback Author: ”Jackson, Mateo”,
Wang,
Format: “Paperback”
3122222223 439 Wily Willy Xiulan Ebook }
What is Amazon DynamoDB?

Fast and flexible NoSQL database service for any scale

• NoSQL database tables

• Virtually unlimited storage

• Items can have differing


attributes

Amazon DynamoDB • Low-latency queries

• Scalable read/write throughput


What is Amazon DynamoDB?
• NoSQL database tables

• Virtually unlimited storage

• Items can have differing attributes

• Low-latency queries

• Scalable read/write throughput


Amazon DynamoDB core components

• Tables, items, and attributes are the core DynamoDB components

• DynamoDB supports two different kinds of primary keys: Partition key and
partition and sort key
© 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved. 34
Partitioning

35

© 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Items in a table must have a key
Section 3: Amazon Redshift
41

Amazon Redshift
Introduction to Amazon Redshift

© 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved. 42
Parallel processing architecture

SQL Clients/BI tools

Amazon Redshift
Leader node

Dense compute
node Dense compute nodes
• Virtual Core
• RAM
• Local disk
Amazon DynamoDB
Amazon S3

43
Automation and scaling

Manage

Monitor

Scale

44
Compatibility

45
Amazon Redshift use cases
• Enterprise data warehouse (EDW)
• Migrate at a pace that customers are comfortable with
• Experiment without large upfront cost or commitment
46

• Respond faster to business needs


• Big data
• Low price point for small customers
• Managed service for ease of deployment and maintenance
• Focus more on data and less on database management
Amazon Redshift use cases 2
• Software as a service (SaaS)
• Scale the data warehouse capacity as demand grows
• Add analytic functionality to applications
• Reduce hardware and software costs
47
Section 4: Amazon Aurora
Amazon Aurora

• Enterprise-class relational database

• Compatible with MySQL or PostgreSQL 50

• Automate time-consuming tasks (such as

provisioning, patching, backup, recovery,


Amazon Aurora failure detection, and repair).
Amazon Aurora service benefits
High availability

52
Resilient design

53

You might also like