0% found this document useful (0 votes)
62 views

Introduction To Database Services: Brian Rice Product Marketing Manager, Amazon RDS

The document provides an overview of Amazon Web Services database services including Amazon DynamoDB, Amazon RDS, Amazon ElastiCache, and Amazon Redshift. It discusses why customers choose managed database services over self-managed options and provides examples of how specific customers use each AWS database service.

Uploaded by

Miguel López
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views

Introduction To Database Services: Brian Rice Product Marketing Manager, Amazon RDS

The document provides an overview of Amazon Web Services database services including Amazon DynamoDB, Amazon RDS, Amazon ElastiCache, and Amazon Redshift. It discusses why customers choose managed database services over self-managed options and provides examples of how specific customers use each AWS database service.

Uploaded by

Miguel López
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 65

Introduction to Database Services

Brian Rice
Product Marketing Manager, Amazon RDS

©2015, Amazon Web Services, Inc. or its affiliates. All rights reserved
Today’s agenda

• Why managed database services?


• A non-relational managed database
• A relational managed database
• A managed in-memory cache
• A managed data warehouse
• What to do next
Why managed database services?
If you host your databases on-premises
App optimization
Scaling
High availability
Database backups
DB software patches
DB software installs
OS patches
OS installation
Server maintenance
Rack and stack
Power, HVAC, net

you
If you host your databases on-premises
App optimization
Scaling
High availability
Database backups
DB software patches
DB software installs
OS patches
OS installation
Server maintenance
Rack and stack
Power, HVAC, net

you
If you host your databases in
Amazon EC2

App optimization
Scaling
High availability
Database backups OS installation
DB software patches Server maintenance
DB software installs Rack and stack
OS patches Power, HVAC, net

you
If you host your databases in
Amazon EC2

App optimization
Scaling
High availability
Database backups OS installation
DB software patches Server maintenance
DB software installs Rack and stack
OS patches Power, HVAC, net

you
If you choose a managed DB service

Scaling
High availability
Database backups
DB software patches
DB software installs
OS patches
OS installation
Server maintenance
Rack and stack
App optimization Power, HVAC, net

you
The self-managed vs. AWS-managed decision

Self-managed database AWS-managed database


You have full responsibility for AWS provides upgrades, backup, and
upgrades and backup failover as a service
You have full responsibility for security AWS provides high infrastructure
security, certifications; gives you tools
to ensure DB security
Full control over parameters of server, Database is a managed appliance, so
OS, and database you can easily automate
Replication is expensive and complex AWS provides failover as a packaged
and requires a lot of engineering service
A managed service for each major DB type

Amazon Amazon Amazon Amazon


DynamoDB RDS ElastiCache Redshift

Document SQL In-memory Data


and key- database cache warehouse
value store engines
What is Amazon DynamoDB?
Amazon DynamoDB: a managed document and
key-value store
• Simple and fast to deploy
• Simple and fast to scale
• To millions of IOPS
Amazon DynamoDB
• Data is automatically replicated
• Fast, predictable performance
– Backed by SSD storage

• Secondary indexes offer fast lookups


• No cost to get started; pay only for what you consume
Dropcam relies on Amazon DynamoDB

“By using DynamoDB, we


reduced delivery time for • Dropcam provides video
video events to less than 50 monitoring hardware and
milliseconds.”
software so customers can
—Greg Nelson, VP of
view high-definition video
Software Engineering
from iOS and Android
devices or the Internet
• Dropcam’s developers report
consistent and low latency
with DynamoDB
Amazon DynamoDB is a schemaless database

table items

Attributes (name-
value pairs)
Each item must include a key

Hash key
(DynamoDB maintains an
unordered index)
Each item must include a key

Hash key

Range key
(DynamoDB maintains a
sorted index)
Local secondary indexes = alternate range keys

Hash key

Range key

LSI key
Global secondary indexes = “pivot charts”
for your table

Choose which
attributes
to project (if any)
Amazon DynamoDB: provision throughput

Write Read
capacity units capacity units
DynamoDB: What are capacity units?

1 Pay to bearer
1
on demand
1 write per sec
of up to 1KB
1 1
1 Pay to bearer 1
One write capacity unit
on demand
1 read per sec
of up to 4KB
1 Eventually consistent reads at 50% off! 1
One read capacity unit
DynamoDB is optimized for developer productivity

CreateTable PutItem

UpdateTable GetItem
“Select”, “insert”,
Manage tables DeleteTable “update” items
UpdateItem
DescribeTable
DeleteItem
ListTables

Query BatchGetItem
Query specific
items OR Bulk select or
scan full table Scan BatchWriteItem update (max 1 MB)
Simple app architecture with Amazon DynamoDB

Business logic

Elastic Load
Balancing Amazon EC2 DynamoDB
app instances

Clients
How DynamoDB billing works

Monthly
bill = GB + +
Charge for Charge for
Storage consumed read capacity units
write capacity units
(plus 100 bytes per item)
per hour per hour

≈ 5 GB * $0.25 +
21 * 720 hrs * $0.0065/10 +
35 * 720 hrs * $0.0065/50
≈ $14.36
Assumes DB instance accessed only from AWS region
Further details at http://aws.amazon.com/dynamodb/pricing/
How DynamoDB billing works (with free tier)

Monthly
bill = GB + +
Charge for Charge for
Storage consumed read capacity units
write capacity units
(plus 100 bytes per item)
per hour per hour

≈ 5–25 GB * $0.25 +
21–25 * 720 hrs * $0.0065/10 +
35–25 * 720 hrs * $0.0065/50

Assumes DB instance accessed only from AWS region


Further details at http://aws.amazon.com/dynamodb/pricing/
How DynamoDB billing works (with free tier)

Monthly
bill = GB + +
Charge for Charge for
Storage consumed read capacity units
write capacity units
(plus 100 bytes per item)
per hour per hour

≈ 0+
0+
10 * 720 hrs * $0.0065/50
≈ $0.94
Assumes DB instance accessed only from AWS region
Further details at http://aws.amazon.com/dynamodb/pricing/
What is Amazon RDS?
Amazon RDS: a managed SQL service
• Simple and fast to deploy
• Simple and fast to scale
• AWS handles patching, backups, replication
Amazon RDS
• Compatible with your applications
– Choose among Amazon Aurora, MySQL,
PostgreSQL, Oracle, SQL Server
• Fast, predictable performance
• No cost to get started; pay only for what you consume
Flipboard relies on Amazon RDS

"We were able to go from


concept to delivered product • Flipboard is an online
in about six months with just magazine with millions of
a handful of engineers." users and billions of “flips”
—Greg Scallan, Chief Architect per month
• Uses Amazon RDS and its
Multi-AZ capabilities to store
mission critical user data
How Amazon RDS delivers high performance

• Choose General Purpose (SSD) storage for most


workloads
– 3 IOPS per GB provisioned, with burst capability up to 3,000 IOPS
• Choose Provisioned IOPS (SSD) storage for high,
predictable performance
– Provision up to 3 TB storage and 30 K IOPS per instance
– Scale IOPS up or down online
• Choose a database instance type with the right
amount of CPU and memory
How Amazon RDS backups work

• Automated backups
– Restore your database to a point in time
– Enabled by default
– Choose a retention period, up to 35 days
• Manual snapshots
– Initiated by you
– Persist until you delete them
– Stored in Amazon S3
– Build a new database instance from a snapshot when needed
Choose Multi-AZ for greater availability, durability

• An Availability Zone is a physically distinct,


independent infrastructure
• With Multi-AZ operation, your database is
synchronously replicated to another zone in the
same AWS region
• Failover occurs automatically in response to the
most important failure scenarios
• Planned maintenance is applied first to backup
Choose Read Replicas for greater scalability
• Offload read traffic to an automatically maintained Read Replica
• Create multiple Read Replicas, load-share traffic
• Easy to set up

• Available in Amazon RDS for MySQL and PostgreSQL


Native
MySQL

RDS
Choose cross-region snapshot copy for even greater
durability, ease of migration
• Copy a database
snapshot to a
different AWS
region
• Warm standby for
disaster recovery
• Or use it as a base
for migration to a
different region
Choose cross-region Read Replicas for enhanced data
locality, even more ease of migration

• Even faster recovery


in the event of
disaster
• Bring data close to
your customers
• Promote to a master
for easy migration
How to scale with Amazon RDS

• Scale up or down with resizable instance types


• Scale your storage up with a few clicks while online
• Offload read traffic to read replicas
• Put a cache in front of Amazon RDS
– Amazon ElastiCache for Memcached or Redis
– Or your favorite cache, self-managed in Amazon EC2
• Amazon RDS takes some of the pain out of sharding
Now in preview: Amazon RDS for Aurora

• Amazon Aurora: the relational database reinvented for the cloud


Up to five times better performance than MySQL
At a price point 1/10 of a commercial database
Designed for drop-in compatibility with MySQL 5.6
• Pay only for the storage you use

• Runs in Amazon VPC; offers encryption at rest and in transit

• Amazon RDS handles administrative tasks for Aurora


Amazon Aurora: high availability by default

• Your data is replicated 6 AZ 1 AZ 2 AZ 3


ways across 3 AZs

• Storage grows up to
64 TB seamlessly Virtualized, cross-AZ storage layer

• Up to 15 Aurora Replicas
with instant crash recovery
NoSQL vs. SQL for a new app: How to choose?

• Want simplest possible • Need joins, transactions,


DB management? frequent table scans?
• Want app to manage DB • Want DB engine to
integrity? manage DB integrity?
• Team has SQL skills?

Amazon DynamoDB Amazon RDS


How Amazon RDS billing works

Monthly
bill = + GB

db.m3.xlarge; MySQL; US 100 GB


West (Oregon); Single- General Purpose
AZ; (SSD)
4 vCPUs; On-Demand
15 GiB = 720 hrs * $0.37 + 100 GB * $0.115
RAM
= $279.05
Assumes DB instance accessed only from Amazon EC2
Further details at http://aws.amazon.com/rds/pricing/
What is Amazon ElastiCache?
Amazon ElastiCache: resizable in-memory cache

• High performance, resizable in-


memory caching
• Speed your application by
bypassing database access and
disk storage
• Compatible with your existing
applications ElastiCache
– Choose between the popular memcached
and Redis engines
2U relies on Amazon ElastiCache

• 2U, Inc. , is a “School as a Service”


“ElastiCache helps us provider that helps universities take
specifically a lot around their degrees online.
our social and • To support collaboration and
learning, the company’s technology
collaborative tools.…It just platform uses ElastiCache to cache
works. We don’t even data that grows exponentially as
know its there.” students communicate with
—James Kenigsberg instructors and with each other.
Chief Technology Officer • ElastiCache is used to cache news
feeds and data from RDS MySQL.
Use cases for Amazon ElastiCache

• Performance or cost optimization of an


underlying database
• Storage of ephemeral key-value data
• High-performance application patterns
Amazon ElastiCache: simple app architecture

Elastic Load
Balancing Amazon EC2 Amazon Amazon RDS
app instances ElastiCache

Clients
Amazon ElastiCache: resilient app architecture

AZ a

AZ b
Elastic Load
Balancing

Clients
How Amazon ElastiCache billing works

Monthly
bill = N ×
m3.large;
US West (Oregon);
on demand 2 vCPUs;
= 4 nodes * 720 hrs * $0.182 7.1 GB
RAM
= $524.16
Further details at http://aws.amazon.com/elasticache/pricing/
What is Amazon Redshift?
Amazon Redshift: a managed data warehouse

• Petabyte-scale columnar
database
• Fast response time
– ~10x that of typical relational stores
Amazon Redshift
• Pricing as low as $1,000 per
TB per year
Foursquare relies on Amazon Redshift

“Amazon Redshift offers the


performance we needed
while freeing us from the • More than 40 million people worldwide
licensing costs of our use Foursquare to meet up with
friends, exchange travel tips, and find
previous solution.” money-saving deals
—Jon Hoffman • Foursquare uses AWS to perform
analytics across millions of daily
Software Engineer check-ins, saving licensing fees and
redeploying its dev/ops staff on more
strategic work
Who uses Amazon Redshift?

Traditional enterprise DW Companies with big data SaaS companies

• Reduce costs by extending • Improve performance by an • Add analytic functionality to


DW rather than adding HW order of magnitude applications

• Migrate completely from • Make more data available • Scale DW capacity as


existing DW systems for analysis demand grows

• Respond faster to business; • Access business data via • Reduce HW and SW costs
provision in minutes standard reporting tools by an order of magnitude
Amazon Redshift architecture

Amazon S3

Amazon DynamoDB
PostgreSQL
Existing business JDBC/ODBC
intelligence tools
Leader
Amazon EMR
node

Compute nodes AWS Data Pipeline


Amazon Redshift dramatically reduces I/O

• Column storage ID Age State Amount

123 20 CA 500

• Data compression 345 25 WA 250

678 40 FL 125

• Zone maps 957 37 WA 375

• Direct-attached storage • With row storage, you do


unnecessary I/O

• To get total amount, you have


to read everything
Amazon Redshift dramatically reduces I/O

• Column storage ID Age State Amount

123 20 CA 500

• Data compression 345 25 WA 250

678 40 FL 125

• Zone maps 957 37 WA 375

• Direct-attached storage • With column storage, you


only read the data you need
Amazon Redshift dramatically reduces I/O

• Column storage analyze compression listing;

Table | Column | Encoding


---------+----------------+----------
listing | listid | delta
• Data compression listing | sellerid | delta32k
listing | eventid | delta32k
listing | dateid | bytedict
listing | numtickets | bytedict
• Zone maps listing | priceperticket | delta32k
listing | totalprice | mostly32
listing | listtime | raw

• Direct-attached storage
• COPY compresses
automatically

• You can analyze and override

• More performance, less cost


Amazon Redshift dramatically reduces I/O

• Column storage 10 10 | 13 | 14 | 26 |…

324 … | 100 | 245 | 324

375 375 | 393 | 417…


• Data compression
623 … 512 | 549 | 623
637 637 | 712 | 809 …
• Zone maps 959 … | 834 | 921 | 959

• Direct-attached storage • Track the minimum and


maximum value for each block

• Skip over blocks that don’t


contain relevant data
Amazon Redshift dramatically reduces I/O

DW.HS1.XL:
• Column storage

• Data compression DW.HS1.8XL:

• Zone maps

• Direct-attached storage • > 2 GB/s scan rate

• Optimized for data processing

• High disk density


Amazon Redshift: start small and grow big

Dense Storage Node (dw1.xlarge) 8XL Dense Storage Node (dw1.8xlarge)


2 TB, 16 GB RAM, 2 cores 16 TB, 128 GB RAM, 16 cores, 10 GigE
Dense Compute Node (dw2.large) 8XL Dense Compute Node (dw2.8xlarge)
0.16 TB, 16 GB RAM, 2 cores 2.56 TB, 128 GB RAM, 16 cores, 10 GigE

Single Node (2 TB) Cluster 2-100 Nodes (up to 1.6 PB)

Cluster 2-32 Nodes (up to 64 TB)

Note: Nodes not to scale


How Amazon Redshift billing works

Monthly
bill = N ×
dw2.large; US West (Oregon);
on demand
2 vCPUs;
15 GiB RAM;
= 4 nodes * 720 hrs * $0.25 0.16 TB SSD

= $720
Further details at http://aws.amazon.com/rds/pricing/
Try Amazon Redshift with BI and ETL for free!

• http://aws.amazon.com/redshift/free-trial

• 2 months, 750 hours/month to try our dw2.large SSD


instance with 160 GB of compressed storage per node

• Also try BI and ETL for free from partners at


http://aws.amazon.com/redshift/partners/
To sum up…
Review: AWS managed database services

Amazon Amazon Amazon Amazon


DynamoDB RDS ElastiCache Redshift

Document SQL In-memory Data


and key- database cache warehouse
value store engines
Benefits of AWS database services

Amazon Amazon AWS


S3 EC2 Data Pipeline

Amazon Amazon Amazon


VPC SNS CloudWatch

Managed services Easy to scale Pay only for what Designed for use
AWS handles installs, Grow as you need you use with other AWS
patching, restarts No up-front cost services
AWS Marketplace

• Find software to use with


Amazon RDS, Amazon Redshift,
Amazon DynamoDB, and
Amazon ElastiCache

• One-click deployments

• Flexible pricing options

http://aws.amazon.com/marketplace
Try AWS database services for free

Service Free every month Term


Amazon 25 GB of storage Perpetual
DynamoDB 25 units of write capacity
25 units of read capacity
Amazon 750 micro cache node First 12 months of
ElastiCache instance hours AWS account
Amazon RDS 750 micro DB instance hours First 12 months of
20 GB of DB storage AWS account
20 GB for backups
10 million I/O operations
SAN FRANCISCO

You might also like