Getting Started with Managed Database Services on AWS

59
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Radhika Ravirala, Solutions Architect, AWS April 19, 2016 Getting Started with Managed Database Services on AWS

Transcript of Getting Started with Managed Database Services on AWS

Page 1: Getting Started with Managed Database Services on AWS

© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Radhika Ravirala, Solutions Architect, AWS

April 19, 2016

Getting Started with Managed

Database Services on AWS

Page 2: Getting Started with Managed Database Services on AWS

What to expect from the session

• Why managed database services?

• Relational vs. NoSQL databases

• AWS managed database options

• Amazon RDS—A relational managed database

• Amazon DynamoDB—A nonrelational managed database

• Amazon ElastiCache—A managed in-memory cache

• Amazon Redshift—A managed data warehouse

• Wrap-up

Page 3: Getting Started with Managed Database Services on AWS

Why managed database services?

Page 4: Getting Started with Managed Database Services on AWS

If you host your databases on-premises

Power, HVAC, net

Rack and stack

Server maintenance

OS patches

DB software patches

Database backups

Scaling

High availability

DB software installs

OS installation

you

App optimization

Page 5: Getting Started with Managed Database Services on AWS

If you host your databases on-premises

Power, HVAC, net

Rack and stack

Server maintenance

OS patches

DB software patches

Database backups

Scaling

High availability

DB software installs

OS installation

you

App optimization

Page 6: Getting Started with Managed Database Services on AWS

If you host your databases in Amazon EC2

Power, HVAC, net

Rack and stack

Server maintenance

OS patches

DB software patches

Database backups

Scaling

High availability

DB software installs

OS installation

you

App optimization

Page 7: Getting Started with Managed Database Services on AWS

If you host your databases in Amazon EC2

OS patches

DB software patches

Database backups

Scaling

High availability

DB software installs

you

App optimization

Power, HVAC, net

Rack and stack

Server maintenance

OS installation

Page 8: Getting Started with Managed Database Services on AWS

If you choose a managed DB service

Power, HVAC, net

Rack and stack

Server maintenance

OS patches

DB software patches

Database backups

App optimization

High availability

DB software installs

OS installation

you

Scaling

Page 9: Getting Started with Managed Database Services on AWS

Quick summary of the options

Self-managed EC2 instances Fully managed

Corporate data

center

DatabaseDB on EC2

instanceRDS

Page 10: Getting Started with Managed Database Services on AWS

What are the AWS managed DB

options?

Page 11: Getting Started with Managed Database Services on AWS

A managed service for each major DB type

Amazon

Redshift

Data

warehouse

Amazon

DynamoDB

Document

and key-

value store

Amazon

RDS

Relationaldatabase

engines

Amazon

ElastiCache

In-memory

key-value

store

Page 12: Getting Started with Managed Database Services on AWS

Decisions

NoSQL vs.

relational

Amazon

Aurora

vs.

MySQLDynamoDB vs.

MongoDB

Page 13: Getting Started with Managed Database Services on AWS

NoSQL vs. relational DB for a new app: How to choose?

• Schemaless, easy reads

and writes, simple data

model

• Scaling is easy

• Focus on performance and

availability at any scale

• Strong schema, complex

relationships,

transactions and joins

• Scaling is difficult

• Focus on consistency

over scale and availability

NoSQL SQL

Page 14: Getting Started with Managed Database Services on AWS

What is Amazon RDS?

Page 15: Getting Started with Managed Database Services on AWS

Relational databases

Fully managed

Fast, predictable performance

Simple and fast to scale

Low cost, pay for what you useAmazon

RDS

Amazon Aurora

Page 16: Getting Started with Managed Database Services on AWS

Authentication and access control

Encryption

SSL

Security groupsAmazon

RDS security

Page 17: Getting Started with Managed Database Services on AWS

Use cases

Applicable wherever you need relational databases

eCommerce Gaming

Websites IT solutions

Apps

Reporting

Page 18: Getting Started with Managed Database Services on AWS

RDS feature matrix

Feature Aurora MySQL PostgreSQL MariaDB Oracle SQL Server

VPC

High availability

Instance scaling

Encryption

Read replicas Oracle

GoldenGateCross-region

Maximum storage 64 TB 6 TB 6 TB 6 TB 6 TB 4 TB

Scale storage Auto

Scaling

Provisioned IOPS NA 30,000 30,000 30,000 30,000 20,000

Largest instance R3.8XL R3.8XL

M4.10XL

R3.8XL

M4.10XL

R3.8XL

M4.10XL

R3.8XL

M4.10XL

R3.8XL

M4.10XL

Page 19: Getting Started with Managed Database Services on AWS

Amazon Aurora: Fast, available, and MySQL-compatible

SQL

Trans-

actions

AZ 1 AZ 2 AZ 3

Caching

Amazon

S3

5x faster than MySQL on

same hardware

SysBench: 100K writes/sec

and 500K reads/sec

Designed for 99.99%

availability

6-way replicated storage

across 3 AZs

Scale to 64 TB and 15 Read

Replicas

Page 20: Getting Started with Managed Database Services on AWS

Amazon RDS is simple and fast to scale

Database instance types

offer a range of CPU and

memory selections

Scale up or down among

instance types on demand

Database storage is

scalable on demand

Page 21: Getting Started with Managed Database Services on AWS

Amazon RDS offers fast, predictable storage

General Purpose

(SSD) for most

workloads

Provisioned IOPS

(SSD) for OLTP

workloads up to

30,000 IOPS

Magnetic for small

workloads with

infrequent access

Page 22: Getting Started with Managed Database Services on AWS

High availability Multi-AZ deployments

Enterprise-grade fault tolerance solution for

production databases

Page 23: Getting Started with Managed Database Services on AWS

Choose Read Replicas for scalability and enhanced

data locality

Relieve pressure on your master node for supporting reads and writes

Even faster recovery in the event of disaster

Bring data close to your customers

Promote to a master for easy migration

Page 24: Getting Started with Managed Database Services on AWS

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

Base for migration to a

different region

Page 25: Getting Started with Managed Database Services on AWS

How do 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

Build a new database instance from a

snapshot when needed

Initiated by you

Persist until you delete them

Stored in Amazon S3

Page 26: Getting Started with Managed Database Services on AWS

Monthly

bill= +

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

You pay for the resources that you use

Storage

consumed

Duration for which DB

instances were used

(Price depends on

type of storage)

(Price depends on

type of DB instance)

Free tier (for first 12 months)

• 750 micro DB instance hours

• 20 GB of DB storage

• 20 GB for backups

• 10 million I/O operations

GBN ×

Page 27: Getting Started with Managed Database Services on AWS

Selected Amazon RDS customers

Page 28: Getting Started with Managed Database Services on AWS

What is Amazon DynamoDB?

Page 29: Getting Started with Managed Database Services on AWS

Amazon DynamoDB

NoSQL database

Fully managed

Single-digit millisecond latency

Massive and seamless scalability

Low costAmazon

DynamoDB

Page 30: Getting Started with Managed Database Services on AWS

Amazon DynamoDB: a managed document and

key-value store

• Simple and fast to deploy, easy to scale

• Data is automatically replicated

• Fast, predictable performance

• Helps provide security and control

• Fine-grained access control

• No cost to get started

• Pay only for what you consume

Page 31: Getting Started with Managed Database Services on AWS

Popular use cases

Ad tech IoT GamingMobile

& web

Ad serving,

retargeting, ID

lookup, user

profile

management,

session-

tracking, RTB

Tracking state,

metadata and

readings from

millions of

devices, real-

time

notifications

Recording

game details,

leaderboards,

session

information,

usage history,

and logs

Storing user

profiles,

session details,

personalization

settings, entity

specific

metadata

Page 32: Getting Started with Managed Database Services on AWS

Writes

Replicated continuously to 3 AZs

Persisted to disk (custom SSD)

Reads

Strongly or eventually consistent

No latency trade-off

Automatic replication for rock-solid durability and

availability

Page 33: Getting Started with Managed Database Services on AWS

Amazon DynamoDB: A schemaless database

Attributes

SchemalessSchema is defined per item

Items

Table

Item key

Page 34: Getting Started with Managed Database Services on AWS

DynamoDB: What are capacity units?

One write capacity unit One read capacity unit

One strongly consistent

read per second up to 4KB

or

Two eventually consistent

reads per second

One write per

second up to 1KB

Page 35: Getting Started with Managed Database Services on AWS

Simple app architecture with Amazon DynamoDB

Elastic Load

Balancing Amazon EC2

app instances

Clients

DynamoDB

Business logic

Page 36: Getting Started with Managed Database Services on AWS

You pay for the resources that you use

Monthly

bill = GB +

Pricing varies by region. Further details at http://aws.amazon.com/dynamodb/pricing/

Storage

consumed

Write

capacity

units

(WCUs)

+

Read

capacity

units

(RCUs)

Free tier:

• Generous free tier of 25 GB, 25 WCUs, and 25 RCUs

• That is, you get over 60M read requests and 60M write request for free in a month

• The free tier is indefinite—you benefit from this every month

Page 38: Getting Started with Managed Database Services on AWS

What is Amazon Redshift?

Page 39: Getting Started with Managed Database Services on AWS

Amazon

Redshift

a lot faster

a lot cheaper

a whole lot simpler

Relational data warehouse

Massively parallel; petabyte scale

Fully managed

HDD and SSD platforms

$1,000/TB/year; starts at $0.25/hour

Page 40: Getting Started with Managed Database Services on AWS

Popular use cases

10x cheaper

Easy to provision

Higher DBA productivity

Traditional

enterprises

10x faster

No programming

Easily leverage BI tools,

Hadoop, machine

learning, streaming

Companies

with big data

Analysis in-line with

process flows

Pay as you go, grow as

you need

Managed availability and

disaster recovery

SaaS

companies

Page 41: Getting Started with Managed Database Services on AWS

Amazon Redshift architectureLeader node

• Simple SQL endpoint

• Stores metadata

• Optimizes query plan

• Coordinates query execution

Compute nodes

• Local columnar storage

• Parallel/distributed execution of all

queries, loads, backups, restores,

resizes

Start at just $0.25/hour, grow to 2 PB

(compressed)

• DC1: SSD; scale 160 GB–326 TB

• DS2: HDD; scale 2 TB–2 PB

10 GigE

(HPC)

IngestionBackupRestore

JDBC/ODBC

Page 42: Getting Started with Managed Database Services on AWS

Amazon Redshift is fast

Dramatically less I/O

Column storage

Data compression

Zone maps

Direct-attached storage

Large data block sizes

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

ID Age State Amount

123 20 CA 500

345 25 WA 250

678 40 FL 125

957 37 WA 375

Page 43: Getting Started with Managed Database Services on AWS

Fully managed, continuous/incremental backups

Multiple copies within cluster

Continuous and incremental backups

to Amazon S3

Continuous and incremental backups

across regions

Streaming restore

Amazon S3

Amazon S3

Region 1

Region 2

Page 44: Getting Started with Managed Database Services on AWS

Amazon Redshift offers rock-solid fault tolerance

Amazon S3

Amazon S3

Region 1

Region 2

Disk failures

Node failures

Network failure

Availability Zone– or region-level

disasters

Page 45: Getting Started with Managed Database Services on AWS

Security is built-in

• Load encrypted from S3

• SSL to secure data in transit

• Amazon VPC for network isolation

• Encryption to secure data at rest

• On-premises HSM and AWS

CloudHSM support

• SOC 1, 2, and 3; PCI-DSS;

FedRAMP; BAA

10 GigE

(HPC)

Ingestion

Backup

Restore

Customer VPC

Internal

VPC

JDBC/ODBC

Page 46: Getting Started with Managed Database Services on AWS

You pay for what you use

Further details at https://aws.amazon.com/redshift/pricing/

Monthly

bill = N ×

Duration for which the

nodes were usedNumber of nodes

(Price depends on type

of node)

2 month free trial

Leader node is free

No upfront costs, pay as you go

Page 47: Getting Started with Managed Database Services on AWS

Amazon Redshift has a large ecosystem

Data Integration Systems IntegratorsBusiness Intelligence

Page 48: Getting Started with Managed Database Services on AWS

Selected Amazon Redshift customers

Page 49: Getting Started with Managed Database Services on AWS

What is Amazon ElastiCache?

Page 50: Getting Started with Managed Database Services on AWS

In-memory key-value store

High-performance

Memcached and Redis

Fully managed; zero adminAmazon

ElastiCache

Page 51: Getting Started with Managed Database Services on AWS

Popular use cases

Caching layer for

performance or cost

optimization

Databases

Ephemeral key-value

data

Storage

Leaderboards

In-memory lists

Session management

Event counters

High-performance

app patterns

Page 52: Getting Started with Managed Database Services on AWS

• Fully managed

• Cache node auto-

discovery

• Multi-AZ node

placement

Key ElastiCache features

• Fully managed

• Multi-AZ with

auto-failover

• Persistence

• Read replicas

Page 53: Getting Started with Managed Database Services on AWS

Amazon ElastiCache: simple app architecture

Elastic Load

Balancing Amazon EC2

app instances

Clients

Amazon RDSAmazon

ElastiCache

Page 54: Getting Started with Managed Database Services on AWS

How ElastiCache billing works

Monthly

bill = N ×

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

Duration for which the

nodes were usedNumber of nodes

(Price depends on type

of node)

Free tier (for first 12 months)—750 micro cache node hours

Page 55: Getting Started with Managed Database Services on AWS

Selected ElastiCache customers

Page 56: Getting Started with Managed Database Services on AWS

To sum up…

Page 57: Getting Started with Managed Database Services on AWS

Benefits of AWS managed database services

Pay only for what

you use

No upfront cost

Fully managed

services

AWS handles

installs, patching,

restarts

Easy to scale

Grow as you need

Designed for use

with other AWS

services

AWS

Data PipelineAmazon

EC2

Amazon

S3

Amazon

CloudWatchAmazon

SNS

Amazon

VPC

Page 58: Getting Started with Managed Database Services on AWS

Remember to complete

your evaluations!

Page 59: Getting Started with Managed Database Services on AWS