Scalable Database Options on AWS

46

description

Learn more about the scalable database options available on Amazon Web Services, including Amazon DynamoDB, RDS and the new Redshift datawarehouse.

Transcript of Scalable Database Options on AWS

Page 1: Scalable Database Options on AWS
Page 2: Scalable Database Options on AWS

AWS Database Options and Decision Factors

Best Practice Tips and Techniques

• Optimizing for Manageability and Scale Edmodo

• Optimizing for App Velocity and Scale Obama for America

• Leveraging YesSQL and NoSQL BrandVerity

Q & A

Page 3: Scalable Database Options on AWS

Easily and rapidly analyze

petabytes of data

1/10 the cost of traditional

data warehouses

Automated deployment &

administration

Compatible with popular

BI tools – MicroStrategy,

Jaspersoft

Page 4: Scalable Database Options on AWS

1. Zero to App in ____ Minutes

2. Zero to Millions of users in ____ Days

3. Zero to “Hero” in ____ Months

Page 5: Scalable Database Options on AWS

Focus on your App

Page 6: Scalable Database Options on AWS

Application tier

Load balancer

Database tier

Page 7: Scalable Database Options on AWS

Application tier

Load balancer

Database tier

Security, Innovation, Scale, Transactions, Performance, Durability, Availability, Skills..

Security, Innovation, Scale, Performance, Availability…

Security, Scale, Availability…

Page 8: Scalable Database Options on AWS

Not available

on AWS

SQL NoSQL

Low Cost High Cost

Do-it Yourself Fully

Managed

Page 9: Scalable Database Options on AWS

SQL NoSQL

Do-it Yourself Fully

Managed

Page 10: Scalable Database Options on AWS

MySQL

Oracle

SQL Server

SQL NoSQL

Do-it Yourself Fully

Managed

MySQL

Oracle

SQL Server

MariaDB

Postgres

Page 11: Scalable Database Options on AWS

SQL NoSQL

Do-it Yourself Fully

Managed

MongoDB

Cassandra

Redis

Memcache

DynamoDB

ElastiCache

SimpleDB

Page 12: Scalable Database Options on AWS

Should I use SQL

or NoSQL?

Should I use

MySQL on EC2 or

RDS?

Should I use

MongoDB,

Cassandra, or

DynamoDB?

Should I use Redis,

Memcache, or

ElastiCache?

?

Page 13: Scalable Database Options on AWS

What are my scale

and latency needs?

What are my

transactional and

consistency needs?

What are my

read/write, storage

and IOPS needs?

What are my time to

market and server

control needs?

?

Page 14: Scalable Database Options on AWS

Factors SQL NoSQL

Application • App with complex business logic? • Web app with lots of users?

Transactions • Complex txns, joins, updates? • Simple data model, updates, queries?

Scale • Developer managed • Automatic, on-demand scaling

Performance • Developer architected • Consistent, high performance at scale

Availability • Architected for fail-over • Seamless and transparent

Core Skills • SQL + Java/Ruby/Python/PhP • NoSQL + Java/Ruby/Python/PhP

Best of both worlds: Possible to Use SQL and NoSQL models in one App

Page 15: Scalable Database Options on AWS

Amazon RDS is a fully managed SQL database service.

Simple to deploy and scale

Without any operational burden.

Reliable and cost effective

Choice of Database engines

Page 16: Scalable Database Options on AWS

Schema design

Frequent server upgrades

Storage upgrades

Backup and recovery

Software upgrades

Patching

Hardware crash

Query construction

Query optimization

Configuration

Migration

Off load the “administration”

Focus on the “innovation”

Page 17: Scalable Database Options on AWS

Multiple databases per instance

Use MySQL tools & drivers

Quickly set up Read Replicas

High availability Multi-AZ option

Ability to promote Read replicas, Rename as Master

Diagnostics

Native MySQL replication

SSL for encryption over the wire

Monitor metrics

Shell, super user or direct file system access (Think security!)

MySQL Manual for Read Replica

OR Amazon RDS console

Page 18: Scalable Database Options on AWS

AZ location for both Primary and Stand-by are now visible

You can place 3rd replica in an AZ different from Primary and Stand-by

Ability to promote Read replicas

Rename as Master after promotion

Page 19: Scalable Database Options on AWS

ElastiCache is a fully managed Memcached

caching service.

Easy to set up and operate

Scale cache clusters with push button ease

Without any operational burden.

Ultra fast response time for read scaling

Page 20: Scalable Database Options on AWS

Amazon DynamoDB is a fully managed NoSQL

database service.

Store and retrieve any amount of data

Scale throughput to millions of IO

Without any operational burden.

Single digit millisecond latencies

Page 21: Scalable Database Options on AWS

CreateTable

UpdateTable

DeleteTable

DescribeTable

ListTables

PutItem

GetItem

UpdateItem

DeleteItem

BatchGetItem

BatchWriteItem

Query

Scan

Manage tables

Query specific items OR

scan the full table

“Select”, “insert”, “update”

items

Bulk select or update

(max 1MB)

Page 22: Scalable Database Options on AWS

So, what are the tips and techniques for

successful deployments?

Page 23: Scalable Database Options on AWS

Educates millions of students

Reaches millions of citizens

Analyzes billions of Ads

Kimo

Rosenbaum

Page 24: Scalable Database Options on AWS

Where learning happens.

Kimo Rosenbaum

[email protected]

AWS re: Invent 2012

Page 25: Scalable Database Options on AWS

• Largest, fastest growing social platform for education

• Secure learning network for teachers and students

• Browser, iOS, Android

• Free for teachers and students

Learning 101

Page 26: Scalable Database Options on AWS

• 100,000 schools

• 14 million users

• 7 million new users in the last year

• 1 million visits daily

Stats 101

Page 27: Scalable Database Options on AWS

RDS DB Instance

Read Replica

RDS DB Instance

Read Replica

RDS DB Instance

Read Replica

Instance

Cache

Instance

Cache

Instance

Web

Auto scaling Group

Availability Zone

MySQL DB Instance RDS DB Instance

Read Replica MySQL DB Instance RDS DB Instance

Read Replica MySQL DB Instance RDS DB Instance

Read Replica

Elastic Load

Balancer Amazon Route 53

Amazon S3 Amazon Cloudfront

Amazon CloudWatch

Instances

Page 28: Scalable Database Options on AWS

• Restore from snapshot

• Replica creation

• Parameter tuning

• Metrics collection

• Know your app/data

DBA 101

Page 29: Scalable Database Options on AWS

Educates millions of students

Reaches millions of citizens

Analyzes billions of Ads

Jay

Edwards

Page 30: Scalable Database Options on AWS

Me.

• Twitter: First dedicated DBA

• OFA: Lead Database Engineer

• PalominoDB: CTO & VP/Operations

Page 31: Scalable Database Options on AWS

Obama for America.

• Technically sophisticated for a campaign

• Not “web-scale”

• Hockey-stick++ growth

• Downtime hurts. A lot…really, really, really a lot.

Page 32: Scalable Database Options on AWS

Hockey-stick++

Page 33: Scalable Database Options on AWS

OFA Architecture RDS Read Replica

ELB

ElastiCache

DynamoDB

RDS with

Multi-AZ

Page 34: Scalable Database Options on AWS

Problems!

• You always need more databases

• OFA had 24+ schemas & 100+ RDS instances

• You never have enough DBAs

• OFA had 1 – 2 x 0.5 fulltime MySQL DBAs

Page 35: Scalable Database Options on AWS

Why RDS?

• Makes operational issues very easy

• Need more replicas? BAM!

• Upsize hardware? KAPOW!

• Point in time restore? BIF!

Page 36: Scalable Database Options on AWS

Why not RDS?

• Hardware cap (vertical v. horizontal)

• Sophisticated use-cases

• Frequent topology changes

• Multi-region replication (on their roadmap)

• DBAs need busy work

Page 37: Scalable Database Options on AWS

Educates millions of students

Reaches millions of citizens

Analyzes billions of Ads Andy

Skalet

Page 38: Scalable Database Options on AWS

Managed Services Bias

Page 39: Scalable Database Options on AWS

New Products/Markets – YesSQL!

Page 40: Scalable Database Options on AWS

Big Data? Cast your problem

Page 41: Scalable Database Options on AWS

AWS Options

Page 42: Scalable Database Options on AWS

Case Study: Crawl history

Page 43: Scalable Database Options on AWS
Page 45: Scalable Database Options on AWS

• Managed services let you focus on creating value

• Amazon S3 - Very robust, handles large items, but you filter

• Amazon DynamoDB - Extremely fast, scalable, good value • Must cast your problem as kvs or key + range

• Amazon RDS - MySQL, without the headaches

• Amazon ElastiCache - As memcached, fast kvs for small data

• Multi column queries on big data? • Looking forward to the AWS solution

Page 46: Scalable Database Options on AWS

Thank you

aws.amazon.com/dynamodb

aws.amazon.com/rds

Free

Tier

aws.amazon.com/elasticache