(SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014

63
November 12, 2014 | Las Vegas, NV

description

In addition to running databases in Amazon EC2, AWS customers can choose among a variety of managed database services. These services save effort, save time, and unlock new capabilities and economies. In this session, we make it easy to understand how they differ, what they have in common, and how to choose one or more. We explain the fundamentals of Amazon DynamoDB, a fully managed NoSQL database service; Amazon RDS, a relational database service in the cloud; Amazon ElastiCache, a fast, in-memory caching service in the cloud; and Amazon Redshift, a fully managed, petabyte-scale data-warehouse solution that can be surprisingly economical. We'll cover how each service might help support your application, how much each service costs, and how to get started.

Transcript of (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014

Page 1: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014

November 12, 2014 | Las Vegas, NV

Page 2: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014
Page 3: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014
Page 4: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014

Power, HVAC, net

Rack & stack

Server maintenance

OS patches

DB s/w patches

Database backups

Scaling

High availability

DB s/w installs

OS installation

you

App optimization

Page 5: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014

Power, HVAC, net

Rack & stack

Server maintenance

OS patches

DB s/w patches

Database backups

Scaling

High availability

DB s/w installs

OS installation

you

App optimization

Page 6: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014

Power, HVAC, net

Rack & stack

Server maintenance

OS patches

DB s/w patches

Database backups

Scaling

High availability

DB s/w installs

OS installation

you

App optimization

Page 7: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014

OS patches

DB s/w patches

Database backups

Scaling

High availability

DB s/w installs

you

App optimization

Power, HVAC, net

Rack & stack

Server maintenance

OS installation

Page 8: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014

Power, HVAC, net

Rack & stack

Server maintenance

OS patches

DB s/w patches

Database backups

App optimization

High availability

DB s/w installs

OS installation

you

Scaling

Page 9: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014

Self-managed database AWS-managed database

You have full responsibility for

upgrades and backup

AWS provides upgrades, backup, and

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,

OS, and database

Database is a managed appliance, so

you can easily automate

Replication is expensive, complex,

and requires a lot of engineering

AWS provides failover as a packaged

service

Page 10: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014

Amazon DynamoDB

Document and key-

value store

Amazon RDS

SQL database engines

Amazon ElastiCache

In-memory cache

Amazon Redshift

Data warehouse

Page 11: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014
Page 12: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014

Amazon DynamoDB

Amazon DynamoDB

Page 13: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014

“By using DynamoDB, we

reduced delivery time for

video events to less than 50

milliseconds.”— Greg Nelson, VP of

Software Engineering

Page 14: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014

table items

Attributes

(name/value

pairs)

Page 15: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014

Hash key

(DynamoDB maintains an

unordered index)

Page 16: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014

Hash key

Range key

(DynamoDB maintains a

sorted index)

Page 17: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014

Hash key

Range key

LSI key

Page 18: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014

Choose which

attributes

to project (if any)

Page 19: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014

Read

capacity units

Write

capacity units

Page 20: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014

1 1

1 1

Pay to bearer

on demand

1 write per sec

of up to 1KB

1 1

1 1

Pay to bearer

on demand

1 read per sec

of up to 4KB

Eventually consistent reads at 50% off!

One write capacity unit

One read capacity unit

Page 21: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014

CreateTable

UpdateTable

DeleteTable

DescribeTable

ListTables

PutItem

GetItem

UpdateItem

DeleteItem

BatchGetItem

BatchWriteItem

Query

Scan

Manage tables

Query specific

items OR

scan full table

“Select”, “insert”,

“update” items

Bulk select or

update (max 1MB)

Page 22: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014

Elastic Load

Balancing Amazon EC2

App Instances

Clients

DynamoDB

Business logic

Page 23: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014

How DynamoDB billing works

Monthly

bill = GB +

Assumes DB instance accessed only from AWS region

Further details at http://aws.amazon.com/dynamodb/pricing/

≈ 5 GB * $0.25 +

21 * 720 hrs * $0.0065/10 +

35 * 720 hrs * $0.0065/50

≈ $14.36

Storage consumed(plus 100 bytes per item)

Charge for

write capacity units

per hour

+Charge for

read capacity units

per hour

Page 24: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014

How DynamoDB billing works

Monthly

bill = GB +

Assumes DB instance accessed only from AWS region

Further details at http://aws.amazon.com/dynamodb/pricing/

≈ 5 GB * $0.25 +

21 * 720 hrs * $0.0065/10 +

35 * 720 hrs * $0.0065/50

≈ $14.36

Storage consumed(plus 100 bytes per item)

Charge for

write capacity units

per hour

+Charge for

read capacity units

per hour

Before

AWS Free

Usage Tier

Page 25: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014
Page 26: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014

Amazon RDS

Amazon RDS

Page 27: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014

"We were able to go from

concept to delivered product

in about six months with just

a handful of engineers." — Greg Scallan, Chief Architect

Page 28: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014

How Amazon RDS delivers high performance

Page 29: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014

How Amazon RDS backups work

Page 30: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014

Choose Multi-AZ

Page 31: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014

Choose Read Replicas for greater scalability

Native

MySQL

RDS

Page 32: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014

Choose cross-region snapshot copy for even greater durability,

ease of migration

Page 33: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014

Choose cross-region read replicas for enhanced data locality, even

more ease of migration

Page 34: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014
Page 35: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014

http://aws.amazon.com/rds/aurora/preview/

Page 36: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014

Amazon DynamoDB Amazon RDS

Page 37: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014

How Amazon RDS billing works

Monthly

bill = GB+

Assumes DB instance accessed only from Amazon EC2

Further details at http://aws.amazon.com/rds/pricing/

= 720 hrs * $0.37 + 100 GB * $0.115

= $279.05

db.m3.xlarge; MySQL;

Oregon; Single-AZ;

On-Demand

100 GB

General Purpose

(SSD)

4 vCPUs;

15 GiB

RAM

Page 38: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014
Page 39: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014

ElastiCache

Page 40: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014

2U, Inc.“ElastiCache helps us

specifically a lot around

our social and

collaborative tools…It just

works. We don’t even

know its there.”— James Kenigsberg

Chief Technology Officer

Page 41: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014
Page 42: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014

Elastic Load

Balancing

Amazon EC2

App Instances

Clients

Amazon RDSAmazon

ElastiCache

Page 43: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014

How ElastiCache billing works

Monthly

bill = N ×

Further details at http://aws.amazon.com/elasticache/pricing/

= 4 nodes * 720 hrs * $0.182

= $524.16

Standard large; Oregon;

On-Demand

2 vCPUs;

7.1 GB

RAM

Page 44: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014
Page 45: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014

Amazon Redshift

Amazon Redshift

Page 46: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014

“By migrating to

Amazon Redshift,

we can run our queries

98% faster and 80% cheaper

than we could before.

— John O’ Donovan, CTO

Page 47: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014

Traditional Enterprise DW Companies with Big Data SaaS Companies

Page 48: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014

Leader

node

Compute nodes

Existing business

intelligence tools

PostgreSQL

JDBC/ODBC

Amazon S3

Amazon DynamoDB

AWS Data Pipeline

Amazon EMR

Page 49: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014

• With row storage you do

unnecessary I/O

• To get total amount, you have

to read everything

ID Age State Amount

123 20 CA 500

345 25 WA 250

678 40 FL 125

957 37 WA 375

Page 50: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014

• With column storage, you

only read the data you need

ID Age State Amount

123 20 CA 500

345 25 WA 250

678 40 FL 125

957 37 WA 375

Page 51: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014

analyze compression listing;

Table | Column | Encoding

---------+----------------+----------

listing | listid | delta

listing | sellerid | delta32k

listing | eventid | delta32k

listing | dateid | bytedict

listing | numtickets | bytedict

listing | priceperticket | delta32k

listing | totalprice | mostly32

listing | listtime | raw

• COPY compresses

automatically

• You can analyze and override

• More performance, less cost

Page 52: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014

• Column storage

• Data compression

• Zone maps

• Direct-attached storage

10 | 13 | 14 | 26 |…

… | 100 | 245 | 324

375 | 393 | 417…

… 512 | 549 | 623

637 | 712 | 809 …

… | 834 | 921 | 959

10

324

375

623

637

959

• Track the minimum and

maximum value for each block

• Skip over blocks that don’t

contain relevant data

Page 53: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014

• Column storage

• Data compression

• Zone maps

• Direct-attached storage

DW.HS1.8XL:

• > 2 GB/s scan rate

• Optimized for data processing

• High disk density

DW.HS1.XL:

Page 54: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014

Dense Storage Node (dw1.xlarge)

2 TB, 16 GB RAM, 2 cores

Dense Compute Node (dw2.large)

0.16 TB, 16 GB RAM, 2 cores

Single Node (2 TB)

Cluster 2-32 Nodes (up to 64 TB)

8XL Dense Storage Node (dw1.8xlarge)

16 TB, 128 GB RAM, 16 cores, 10 GigE

8XL Dense Compute Node (dw2.8xlarge)

2.56 TB, 128 GB RAM, 16 cores, 10 GigE

Cluster 2-100 Nodes (up to 1.6 PB)

Note: Nodes not to scale

Page 55: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014

How Amazon Redshift billing works

Monthly

bill = N ×

Further details at http://aws.amazon.com/rds/pricing/

= 4 nodes * 720 hrs * $0.25

= $720

dw2.large; Oregon;

On-Demand

2 vCPUs;

15 GiB RAM;

0.16 TB SSD

Page 56: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014

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

http://aws.amazon.com/redshift/partners/

Page 57: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014
Page 58: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014

Amazon DynamoDB

Document and key-

value store

Amazon RDS

SQL database engines

Amazon ElastiCache

In-memory cache

Amazon Redshift

Data warehouse

Page 59: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014

Pay only for what you use

No up-front cost

Fully managed services

AWS handles installs,

patching, restarts

Easy to scale

Grow as you need

Designed for use with

other AWS services

Amazon

EC2

Amazon

S3

Amazon

CloudWatchAmazon

SNS

Amazon

VPC

AWS

Data Pipeline

Page 60: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014

http://aws.amazon.com/marketplace

Page 61: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014

Service Free every month Term

Amazon

DynamoDB

25 GB of storage

25 units of write capacity

25 units of read capacity

Indefinite

Amazon

ElastiCache

750 Micro Cache Node

instance hours

First 12 months of

AWS account

Amazon RDS 750 Micro DB instance hours

20 GB of DB Storage

20 GB for Backups

10 million I/O operations

First 12 months of

AWS account

Page 62: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014
Page 63: (SOV202) Choosing Among AWS Managed Database Services | AWS re:Invent 2014

Please give us your feedback on this session.

Complete session evaluations and earn re:Invent swag.

http://bit.ly/awsevals