Introduction To Database Services: Brian Rice Product Marketing Manager, Amazon RDS
Introduction To Database Services: Brian Rice Product Marketing Manager, Amazon RDS
Brian Rice
Product Marketing Manager, Amazon RDS
©2015, Amazon Web Services, Inc. or its affiliates. All rights reserved
Today’s agenda
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
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
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
• 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
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
• 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?
Monthly
bill = + GB
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
• 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
123 20 CA 500
678 40 FL 125
123 20 CA 500
678 40 FL 125
• Direct-attached storage
• COPY compresses
automatically
• Column storage 10 10 | 13 | 14 | 26 |…
DW.HS1.XL:
• Column storage
• Zone maps
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
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
• One-click deployments
http://aws.amazon.com/marketplace
Try AWS database services for free