SlideShare ist ein Scribd-Unternehmen logo
1 von 41
Downloaden Sie, um offline zu lesen
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Steve Abraham
Principal Solutions Architect, AWS
SRV310
Optimizing Relational Databases on AWS:
Deep Dive on Amazon RDS
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
What is Amazon RDS?
No need to provision
infrastructure, install,
and maintain DB
software
Scale DB compute
and storage with a few
clicks; minimal
downtime for your
application
Automatic Multi-AZ data
replication; automated
backup, snapshots, and
failover
SSD storage
and guaranteed
provisioned I/O;
data encryption at rest
and in transit
Managed relational database service with a choice of 6 popular engines
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Why use Amazon RDS?
Lower TCO because we manage critical administrative functions
• Automated hardware provisioning, database setup, patching, and backups
• Get more leverage from your teams
• Focus on the things that differentiate you
Built-in high availability and disaster recovery across multiple data centers
• Enabled with a single API call or click of a button in the console
• Even a small startup can leverage enterprise-level availability, durability, and
scalability
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Configuring your database instance in
Amazon RDS
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Which RDS engine should I use?
Commercial Open source Cloud native
Amazon EBS-based storage Aurora storage system
MySQL-compatible
PostgreSQL-compatible
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Which instance type should I choose?
T2 Family
• Burstable instances
• 1 vCPU/1 GB RAM > 8 vCPU 32-
GB RAM
• Moderate networking
performance
• Good for smaller or variable
workloads
• Monitor CPU credit metrics in
Amazon CloudWatch
• T2.micro is eligible for free tier
M4 Family
• General-purpose instances
• 2 vCPU/8 GiB RAM > 64 vCPU
256-GiB RAM
• High-performance networking
• Good for running CPU intensive
workloads (e.g., WordPress)
R4 Family
• Memory-optimized instances
• 2 vCPU/16 GiB RAM > 64 vCPU 488-
GiB RAM
• High-performance networking
• Good for query-intensive workloads
or high connection counts
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Which storage type should I choose?
General purpose (GP2)
• SSD storage
• Maximum of 16 TB
• Leverages Amazon EBS Elastic
Volumes
• IOPS determined by volume
size
• Minimum of 100 IOPS (below
33.33 GiB)
• Bursts to 3,000 IOPS (applicable
below 1.3 TB)
• Baseline of 10,000 IOPS (at 3.3
TB and above)
• Affordable performance
Provisioned IOPS (IO1)
• SSD storage
• Maximum of 16 TB
• Leverages Amazon EBS Elastic
Volumes
• Maximum of 40 K IOPS (20 K on
SQL Server)
• Delivers within 10% of the IOPS
performance 99.9% of the time
• High performance and
consistency
Magnetic
• Magnetic storage
• Maximum of 1 TB
• Supported for legacy databases
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
How do I decide between GP2 and IO1?
• GP2 is a great choice, but be aware of burst credits on volumes < 1 TB
• Hitting credit-depletion results in IOPS drop—latency and queue depth metrics will
spike until credits are replenished
• Monitor BurstBalance to see percent of burst-bucket I/O credits available
• Monitor read/write IOPS to see if average IOPS is greater than the baseline
• Think of GP2 burst rate and PIOPS
stated rate as maximum I/O rates
Why am I not seeing 30 K IOPS?
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
How do I scale my database instance?
• Scale compute/memory vertically up or down
• Handle higher load to grow over time
• Lower usage to control costs
• New host is attached to existing storage with minimal downtime
• Scale up Amazon EBS storage (now up to 16 TB!)
• Amazon EBS engines now support Elastic Volumes for fast scaling
(now including SQL Server)
• No downtime for storage scaling
• Initial scaling operation may take longer, because storage is
reconfigured on older instances
• Can re-provision IOPS on the fly
Why am I not seeing 30 K IOPS?
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Managing high availability, read replicas,
and backups in Amazon RDS
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
How do I ensure database high availability?
Multi-AZ provides enterprise-
grade fault-tolerance across
multiple data centers
• Automatic failover
• Synchronous replication
• Enabled with one click Availability Zone A
Availability Zone B
Application
servers
Database failure
Standby
Primary
New standby
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
What happens during a Multi-AZ failover?
• Each host manages set of Amazon EBS
volumes with a full copy of the data
• Instances are monitored by an
external observer to maintain
consensus over quorum
• Failover initiated by automation or
through the Amazon RDS API
• Redirection to the new primary
instance is provided through DNS
DNS
Primary Standby
EC2
#1
EC2
#2
Availability Zone #1 Availability Zone #2
APP
EBS
#1
EBS
#2
PrimarySecondary
How long does it take?
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Why would I use Read Replicas?
Asynchronous
replication
BI/reporting
application server
Read only
Read/write Primary
Read replica
• Relieve pressure on your source database
with additional read capacity
• Bring data close to your applications in
different regions
• Promote a Read Replica to a master for
faster recovery in the event of disaster
• Upgrade a Read Replica to a new engine
version
• Supported for MySQL, MariaDB, and
PostgreSQL
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
When should I use Multi-AZ as opposed to Read
Replicas?
• Synchronous replication—highly durable
• Only primary instance is active at any point in
time
• Backups can be taken from secondary
• Always in two Availability Zones within a
Region
• Database engine version upgrades happen on
primary
• Automatic failover when a problem is
detected
• Asynchronous replication—highly scalable
• All replicas are active and can be used for read
scaling
• No backups configured by default
• Can be within an Availability Zone, cross-AZ, or
cross-region
• Database engine version upgrades
independently from source instance
• Can be manually promoted to a standalone
database
Read ReplicasMulti-AZ
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
How does Amazon RDS manage backups?
• Two options – automated backups
and manual snapshots
• Amazon RDS backups leverage
Amazon EBS snapshots stored in
Amazon S3
• Transaction logs are stored every
5 minutes in Amazon S3 to
support point-in-time recovery
(PITR)
• No performance penalty for
backups
• Snapshots can be copied across
regions or shared with other
accounts
Availability Zone #2
Availability Zone #1
Region #1 Region #2
Transaction Logs
DB
App
RDS
Host
RDS
Host
EBS
Vol
EBS
Vol
EBS Snapshot
Amazon
S3
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
When should I use automated backups as opposed to
snapshots?
• Specify backup retention window per
instance (7-day default)
• Kept until outside of window (35-day
maximum) or instance is deleted
• Supports PITR
• Good for disaster recovery
• Manually created through AWS console, AWS
CLI, or Amazon RDS API
• Kept until you delete them
• Restores to saved snapshot
• Use for checkpoint before making large
changes, non-production/test environments,
final copy before deleting a database
Manual snapshotsAutomated backups
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
How do I restore a backup?
• Restoring creates an entirely new database instance
• Define the instance configuration just like a new
instance
• Will get the default parameter, security, and option
groups
• New volumes are hydrated from Amazon S3
• While the volume is usable immediately, full
performance requires the volume to warm up until
fully instantiated
• Migrate to a DB instance class with high I/O capacity
• Maximize I/O during restore process
Why does it take so long?
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Securing your Amazon RDS database
instance
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
How do I secure my Amazon RDS database?
• Amazon RDS is designed to be secure by default
• Network isolation with Amazon VPC
• AWS Identity and Access Management (IAM)-based
resource-level permission controls
• Encryption at rest using AWS KMS (all engines) or
Oracle/Microsoft TDE
• Use Secure Sockets Layer protection for data in transit
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
What does Amazon VPC provide?
• Places your instance in a private subnet, making
it secure from public routes on the internet
• Database instance IP firewall protection lets you
securely control network configuration
• Turn off Public Accessibility in DB instance
settings to restrict access outside Amazon VPC
• Use ClassicLink to network with non-VPC
resources
Availability Zone
AWS Region
10.1.0.0/16
10.1.1.0/24
AWS Direct
Connect
VPN
connection
VPC
peering
Internet
gateway
Routing
rules
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
How do I grant access to my database?
• Use IAM to control who can
perform actions on Amazon
RDS resources.
• Do not use AWS account
root users to manage
Amazon RDS resources. You
should create an IAM user
for everyone, including
yourself.
• Can use AWS multi-factor
authentication (MFA) to
provide an extra level of
protection.
DBA and Ops
RDS
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
How do I encrypt my database?
Data keys
Amazon RDS
instance 3
Amazon RDS
instance 2
Amazon RDS
instance 1
Customer master key(s)
• Use AWS KMS-based encryption in the AWS
console
• No performance penalty for encrypting data
• Centralized access and audit of key activity
• Best practices
• Encryption cannot be removed from DB
instances
• If source is encrypted, Read Replicas must be
encrypted
• Add encryption to an unencrypted DB instance
by encrypting a snapshot copy
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Monitoring your Amazon RDS database
instance
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
How do I monitor my Amazon RDS database?
Amazon CloudWatch metrics & alarms
Upload DB logs directly to CloudWatch Logs
• Amazon RDS for MySQL/MariaDB
Enhanced Monitoring for Amazon RDS
• Access to over 50 CPU, memory, file system, and disk I/O metrics
• As low as 1-second intervals
Integration with third-party monitoring tools
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
How do I improve database performance?
• Introducing Amazon RDS Performance
Insights
• DB load: average active sessions
• Identifies database bottlenecks
• Easy
• Powerful
• Top SQL/most intensive queries
• Identifies source of bottlenecks
• Enables problem discovery
• Adjustable timeframe
• Hour, day, week, and longer
• Available now for Aurora PostgreSQL
• Coming soon for all Amazon RDS
engines
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Can I know when service events happen?
• Amazon RDS uses Amazon SNS to receive
notification when an event occurs
• Notifications can be in any form supported by
Amazon SNS (email, a text message, or a call
to an HTTP endpoint)
• Six different source types (DB instance, DB
parameter group, DB security group, DB
snapshot, DB cluster, DB cluster snapshot)
• 17 different event categories (availability,
backup, deletion, configuration change, etc.)
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Can I stop my database when it’s not in use?
• Stop and start a running database instance from the console
or AWS CLI
• Available for Single-AZ DB instances
• While instance is stopped, you only pay for storage
• Backup retention window is maintained while stopped
• Instances are restarted after 7 days
• Pending maintenance operations are applied
• Instances can be stopped again if desired
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon Aurora
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Scale-out, distributed architecture
Logging pushed down to a purpose-built log-
structured distributed storage system
Storage volume is striped across hundreds of
storage nodes distributed across three
Availability Zones (AZ)
Six copies of data, two copies in each AZ
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Aurora performance
WRITE PERFORMANCE READ PERFORMANCE
MySQL SysBench results; R4.16XL: 64 cores / 488-GB RAM
Aurora read/write throughput compared to MySQL 5.6
based on industry standard benchmarks
Aurora MySQL 5.6
0
100000
200000
300000
400000
500000
600000
700000
0
50000
100000
150000
200000
250000
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
How did we achieve this?
Do fewer I/Os
Minimize network packets
Cache prior results
Offload the database engine
DO LESS WORK
Process asynchronously
Reduce latency path
Use lock-free data structures
Batch operations together
BE MORE EFFICIENT
DATABASES ARE ALL ABOUT I/O
NETWORK-ATTACHED STORAGE IS ALL ABOUT PACKETS/SECOND
HIGH-THROUGHPUT PROCESSING IS ALL ABOUT CONTEXT SWITCHES
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
I/O traffic in MySQL
BINLOG DATA DOUBLE-WRITELOG FRM FILES
T Y P E O F WR IT E
MYSQL WITH REPLICA
EBS MIRROREBS MIRROR
AZ 1 AZ 2
AMAZON S3
EBSEBS
PRIMARY
INSTANCE
REPLICA
INSTANCE
1
2
3
4
5
Issue write to EBS – EBS issues to mirror, ack when both done
Stage write to standby instance
Issue write to EBS on standby instance
I/O FLOW
Steps 1, 3, 4 are sequential and synchronous
This amplifies both latency and jitter
Many types of writes for each user operation
Have to write data blocks twice to avoid torn writes
OBSERVATIONS
780K transactions
7,388K I/Os per million txns (excludes mirroring, standby)
Average 7.4 I/Os per transaction
PERFORMANCE
30 minute SysBench write-only workload, 100-GB dataset, Amazon RDS Multi-AZ, 30K PIOPS
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
I/O traffic in Aurora
AZ 1 AZ 3
PRIMARY
INSTANCE
Amazon S3
AZ 2
REPLICA
INSTANCE
AMAZON AURORA
ASYNC
4/6 QUORUM
DISTRIBUTED
WRITES
BINLOG DATA DOUBLE-WRITELOG FRM FILES
T Y P E O F W R I T E
I/O FLOW
Only write redo log records; all steps asynchronous
No data block writes (checkpoint, cache replacement)
6X more log writes, but 9X less network traffic
Tolerant of network and storage outlier latency
OBSERVATIONS
27,378K transactions 35X MORE
950K I/Os per 1M txns (6X amplification) 7.7X LESS
PERFORMANCE
Boxcar redo log records – fully ordered by LSN
Shuffle to appropriate segments – partially ordered
Boxcar to storage nodes and issue writesREPLICA
INSTANCE
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon Aurora Serverless
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Aurora Serverless
▪ Starts up on demand, shuts down
when not in use
▪ Scales up/down automatically
▪ No application impact when scaling
▪ Pay per second, 1 minute minimum
WARM POOL
OF INSTANCES
APPLICATION
DATABASE STORAGE
SCALABLE DB CAPACITY
REQUEST ROUTER
DATABASE ENDPOINT
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Database endpoint provisioning
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Instance provisioning and scaling
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Speaker Contact
Steve Abraham
Principal Solutions Architect
abrsteve@amazon.com
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Please complete the session survey in
the summit mobile app.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Thank you!
aws.amazon.com/rds
aws.amazon.com/dms
Submit Session Feedback
1. Tap the Schedule icon.
2. Select the session you
attended.
3. Tap Session Evaluation to
submit your feedback.

Weitere ähnliche Inhalte

Was ist angesagt?

How to Bring Microsoft Apps to AWS - AWS Online Tech Talks
How to Bring Microsoft Apps to AWS - AWS Online Tech TalksHow to Bring Microsoft Apps to AWS - AWS Online Tech Talks
How to Bring Microsoft Apps to AWS - AWS Online Tech TalksAmazon Web Services
 
AWS Data Transfer Services Deep Dive
AWS Data Transfer Services Deep Dive AWS Data Transfer Services Deep Dive
AWS Data Transfer Services Deep Dive Amazon Web Services
 
How Liberty Mutual Moves toward Real-Time Financial Closing
How Liberty Mutual Moves toward Real-Time Financial ClosingHow Liberty Mutual Moves toward Real-Time Financial Closing
How Liberty Mutual Moves toward Real-Time Financial ClosingAmazon Web Services
 
Analyzing Your Web and Application Logs
Analyzing Your Web and Application Logs Analyzing Your Web and Application Logs
Analyzing Your Web and Application Logs Amazon Web Services
 
AWSome Day - Solutions Architecture Best Practices
AWSome Day - Solutions Architecture Best PracticesAWSome Day - Solutions Architecture Best Practices
AWSome Day - Solutions Architecture Best PracticesAmazon Web Services
 
Develop Containerized Apps with AWS Fargate
Develop Containerized Apps with AWS Fargate Develop Containerized Apps with AWS Fargate
Develop Containerized Apps with AWS Fargate Amazon Web Services
 
SID304 Threat Detection and Remediation with Amazon GuardDuty
 SID304 Threat Detection and Remediation with Amazon GuardDuty SID304 Threat Detection and Remediation with Amazon GuardDuty
SID304 Threat Detection and Remediation with Amazon GuardDutyAmazon Web Services
 
Containerize Legacy .NET Framework Web Apps for Cloud Migration
Containerize Legacy .NET Framework Web Apps for Cloud Migration Containerize Legacy .NET Framework Web Apps for Cloud Migration
Containerize Legacy .NET Framework Web Apps for Cloud Migration Amazon Web Services
 
Amazon EC2 and Amazon VPC Hands-on Workshop
Amazon EC2 and Amazon VPC Hands-on WorkshopAmazon EC2 and Amazon VPC Hands-on Workshop
Amazon EC2 and Amazon VPC Hands-on WorkshopAmazon Web Services
 
Cutting to the chase for Machine Learning Analytics Ecosystem & AWS Lake Form...
Cutting to the chase for Machine Learning Analytics Ecosystem & AWS Lake Form...Cutting to the chase for Machine Learning Analytics Ecosystem & AWS Lake Form...
Cutting to the chase for Machine Learning Analytics Ecosystem & AWS Lake Form...AWS Riyadh User Group
 
Hands-On: Building a Migration Strategy for SQL Server on AWS (WIN310) - AWS ...
Hands-On: Building a Migration Strategy for SQL Server on AWS (WIN310) - AWS ...Hands-On: Building a Migration Strategy for SQL Server on AWS (WIN310) - AWS ...
Hands-On: Building a Migration Strategy for SQL Server on AWS (WIN310) - AWS ...Amazon Web Services
 
SRV308 Deep Dive on Amazon Aurora
SRV308 Deep Dive on Amazon AuroraSRV308 Deep Dive on Amazon Aurora
SRV308 Deep Dive on Amazon AuroraAmazon Web Services
 
Replicate and Manage Data Using Managed Databases and Serverless Technologies
Replicate and Manage Data Using Managed Databases and Serverless Technologies Replicate and Manage Data Using Managed Databases and Serverless Technologies
Replicate and Manage Data Using Managed Databases and Serverless Technologies Amazon Web Services
 
Deep Dive on Amazon EC2 Accelerated Computing - AWS Online Tech Talks
Deep Dive on Amazon EC2 Accelerated Computing - AWS Online Tech TalksDeep Dive on Amazon EC2 Accelerated Computing - AWS Online Tech Talks
Deep Dive on Amazon EC2 Accelerated Computing - AWS Online Tech TalksAmazon Web Services
 
Analyze your Data Lake, Fast @ Any Scale - AWS Online Tech Talks
Analyze your Data Lake, Fast @ Any Scale - AWS Online Tech TalksAnalyze your Data Lake, Fast @ Any Scale - AWS Online Tech Talks
Analyze your Data Lake, Fast @ Any Scale - AWS Online Tech TalksAmazon Web Services
 
Workshop: Building Serverless Real-time Data Processing (Now with Unicorns!)
Workshop: Building Serverless Real-time Data Processing (Now with Unicorns!)Workshop: Building Serverless Real-time Data Processing (Now with Unicorns!)
Workshop: Building Serverless Real-time Data Processing (Now with Unicorns!)Amazon Web Services
 
DEM19 Advanced Auto Scaling and Deployment Tools for Kubernetes and ECS
DEM19 Advanced Auto Scaling and Deployment Tools for Kubernetes and ECSDEM19 Advanced Auto Scaling and Deployment Tools for Kubernetes and ECS
DEM19 Advanced Auto Scaling and Deployment Tools for Kubernetes and ECSAmazon Web Services
 
Automate the Provisioning of Secure Developer Environments on AWS PPT
 Automate the Provisioning of Secure Developer Environments on AWS PPT Automate the Provisioning of Secure Developer Environments on AWS PPT
Automate the Provisioning of Secure Developer Environments on AWS PPTAmazon Web Services
 
Amazon S3_Updates and Best Practices
Amazon S3_Updates and Best Practices Amazon S3_Updates and Best Practices
Amazon S3_Updates and Best Practices Amazon Web Services
 

Was ist angesagt? (20)

How to Bring Microsoft Apps to AWS - AWS Online Tech Talks
How to Bring Microsoft Apps to AWS - AWS Online Tech TalksHow to Bring Microsoft Apps to AWS - AWS Online Tech Talks
How to Bring Microsoft Apps to AWS - AWS Online Tech Talks
 
AWS Data Transfer Services Deep Dive
AWS Data Transfer Services Deep Dive AWS Data Transfer Services Deep Dive
AWS Data Transfer Services Deep Dive
 
How Liberty Mutual Moves toward Real-Time Financial Closing
How Liberty Mutual Moves toward Real-Time Financial ClosingHow Liberty Mutual Moves toward Real-Time Financial Closing
How Liberty Mutual Moves toward Real-Time Financial Closing
 
Analyzing Your Web and Application Logs
Analyzing Your Web and Application Logs Analyzing Your Web and Application Logs
Analyzing Your Web and Application Logs
 
AWSome Day - Solutions Architecture Best Practices
AWSome Day - Solutions Architecture Best PracticesAWSome Day - Solutions Architecture Best Practices
AWSome Day - Solutions Architecture Best Practices
 
Develop Containerized Apps with AWS Fargate
Develop Containerized Apps with AWS Fargate Develop Containerized Apps with AWS Fargate
Develop Containerized Apps with AWS Fargate
 
SID304 Threat Detection and Remediation with Amazon GuardDuty
 SID304 Threat Detection and Remediation with Amazon GuardDuty SID304 Threat Detection and Remediation with Amazon GuardDuty
SID304 Threat Detection and Remediation with Amazon GuardDuty
 
Containerize Legacy .NET Framework Web Apps for Cloud Migration
Containerize Legacy .NET Framework Web Apps for Cloud Migration Containerize Legacy .NET Framework Web Apps for Cloud Migration
Containerize Legacy .NET Framework Web Apps for Cloud Migration
 
Amazon EC2 and Amazon VPC Hands-on Workshop
Amazon EC2 and Amazon VPC Hands-on WorkshopAmazon EC2 and Amazon VPC Hands-on Workshop
Amazon EC2 and Amazon VPC Hands-on Workshop
 
Cutting to the chase for Machine Learning Analytics Ecosystem & AWS Lake Form...
Cutting to the chase for Machine Learning Analytics Ecosystem & AWS Lake Form...Cutting to the chase for Machine Learning Analytics Ecosystem & AWS Lake Form...
Cutting to the chase for Machine Learning Analytics Ecosystem & AWS Lake Form...
 
Cost Optimisation on AWS
Cost Optimisation on AWS Cost Optimisation on AWS
Cost Optimisation on AWS
 
Hands-On: Building a Migration Strategy for SQL Server on AWS (WIN310) - AWS ...
Hands-On: Building a Migration Strategy for SQL Server on AWS (WIN310) - AWS ...Hands-On: Building a Migration Strategy for SQL Server on AWS (WIN310) - AWS ...
Hands-On: Building a Migration Strategy for SQL Server on AWS (WIN310) - AWS ...
 
SRV308 Deep Dive on Amazon Aurora
SRV308 Deep Dive on Amazon AuroraSRV308 Deep Dive on Amazon Aurora
SRV308 Deep Dive on Amazon Aurora
 
Replicate and Manage Data Using Managed Databases and Serverless Technologies
Replicate and Manage Data Using Managed Databases and Serverless Technologies Replicate and Manage Data Using Managed Databases and Serverless Technologies
Replicate and Manage Data Using Managed Databases and Serverless Technologies
 
Deep Dive on Amazon EC2 Accelerated Computing - AWS Online Tech Talks
Deep Dive on Amazon EC2 Accelerated Computing - AWS Online Tech TalksDeep Dive on Amazon EC2 Accelerated Computing - AWS Online Tech Talks
Deep Dive on Amazon EC2 Accelerated Computing - AWS Online Tech Talks
 
Analyze your Data Lake, Fast @ Any Scale - AWS Online Tech Talks
Analyze your Data Lake, Fast @ Any Scale - AWS Online Tech TalksAnalyze your Data Lake, Fast @ Any Scale - AWS Online Tech Talks
Analyze your Data Lake, Fast @ Any Scale - AWS Online Tech Talks
 
Workshop: Building Serverless Real-time Data Processing (Now with Unicorns!)
Workshop: Building Serverless Real-time Data Processing (Now with Unicorns!)Workshop: Building Serverless Real-time Data Processing (Now with Unicorns!)
Workshop: Building Serverless Real-time Data Processing (Now with Unicorns!)
 
DEM19 Advanced Auto Scaling and Deployment Tools for Kubernetes and ECS
DEM19 Advanced Auto Scaling and Deployment Tools for Kubernetes and ECSDEM19 Advanced Auto Scaling and Deployment Tools for Kubernetes and ECS
DEM19 Advanced Auto Scaling and Deployment Tools for Kubernetes and ECS
 
Automate the Provisioning of Secure Developer Environments on AWS PPT
 Automate the Provisioning of Secure Developer Environments on AWS PPT Automate the Provisioning of Secure Developer Environments on AWS PPT
Automate the Provisioning of Secure Developer Environments on AWS PPT
 
Amazon S3_Updates and Best Practices
Amazon S3_Updates and Best Practices Amazon S3_Updates and Best Practices
Amazon S3_Updates and Best Practices
 

Ähnlich wie RDS Deep Dive on Optimizing Relational Databases

Relational Database Services on AWS
Relational Database Services on AWSRelational Database Services on AWS
Relational Database Services on AWSAmazon Web Services
 
Relational Database Services on AWS - Bill Baldwin
Relational Database Services on AWS - Bill BaldwinRelational Database Services on AWS - Bill Baldwin
Relational Database Services on AWS - Bill BaldwinAmazon Web Services
 
DAT302_Deep Dive on Amazon Relational Database Service (RDS)
DAT302_Deep Dive on Amazon Relational Database Service (RDS)DAT302_Deep Dive on Amazon Relational Database Service (RDS)
DAT302_Deep Dive on Amazon Relational Database Service (RDS)Amazon Web Services
 
Relational Database Services on AWS
Relational Database Services on AWSRelational Database Services on AWS
Relational Database Services on AWSAmazon Web Services
 
Scaling your Application with AWS Relational Databases I AWS Dev Day 2018
Scaling your Application with AWS Relational Databases I AWS Dev Day 2018Scaling your Application with AWS Relational Databases I AWS Dev Day 2018
Scaling your Application with AWS Relational Databases I AWS Dev Day 2018AWS Germany
 
Relational Database Services on AWS
Relational Database Services on AWSRelational Database Services on AWS
Relational Database Services on AWSAmazon Web Services
 
Cost and Performance Optimisation in Amazon RDS - AWS Summit Sydney 2018
Cost and Performance Optimisation in Amazon RDS - AWS Summit Sydney 2018Cost and Performance Optimisation in Amazon RDS - AWS Summit Sydney 2018
Cost and Performance Optimisation in Amazon RDS - AWS Summit Sydney 2018Amazon Web Services
 
What's New in Amazon Relational Database Service (DAT203) - AWS re:Invent 2018
What's New in Amazon Relational Database Service (DAT203) - AWS re:Invent 2018What's New in Amazon Relational Database Service (DAT203) - AWS re:Invent 2018
What's New in Amazon Relational Database Service (DAT203) - AWS re:Invent 2018Amazon Web Services
 
10 Hacks for Optimizing MySQL in the Cloud - AWS Online Tech Talks
10 Hacks for Optimizing MySQL in the Cloud - AWS Online Tech Talks10 Hacks for Optimizing MySQL in the Cloud - AWS Online Tech Talks
10 Hacks for Optimizing MySQL in the Cloud - AWS Online Tech TalksAmazon Web Services
 
What’s new in Amazon RDS - ADB207 - Chicago AWS Summit
What’s new in Amazon RDS - ADB207 - Chicago AWS SummitWhat’s new in Amazon RDS - ADB207 - Chicago AWS Summit
What’s new in Amazon RDS - ADB207 - Chicago AWS SummitAmazon Web Services
 
Best Practices for Running Oracle Databases on Amazon RDS (DAT317) - AWS re:I...
Best Practices for Running Oracle Databases on Amazon RDS (DAT317) - AWS re:I...Best Practices for Running Oracle Databases on Amazon RDS (DAT317) - AWS re:I...
Best Practices for Running Oracle Databases on Amazon RDS (DAT317) - AWS re:I...Amazon Web Services
 
What's new in Amazon RDS - ADB206 - New York AWS Summit
What's new in Amazon RDS - ADB206 - New York AWS SummitWhat's new in Amazon RDS - ADB206 - New York AWS Summit
What's new in Amazon RDS - ADB206 - New York AWS SummitAmazon Web Services
 
DAT203_Running MySQL Databases on AWS
DAT203_Running MySQL Databases on AWSDAT203_Running MySQL Databases on AWS
DAT203_Running MySQL Databases on AWSAmazon Web Services
 
Oracle & SQL Server on the Cloud: Database Week SF
Oracle & SQL Server on the Cloud: Database Week SFOracle & SQL Server on the Cloud: Database Week SF
Oracle & SQL Server on the Cloud: Database Week SFAmazon Web Services
 
Oracle & SQL Server on the Cloud: Database Week San Francisco
Oracle & SQL Server on the Cloud: Database Week San FranciscoOracle & SQL Server on the Cloud: Database Week San Francisco
Oracle & SQL Server on the Cloud: Database Week San FranciscoAmazon Web Services
 
Oracle and SQL Server on the Cloud - Bill Baldwin
Oracle and SQL Server on the Cloud - Bill BaldwinOracle and SQL Server on the Cloud - Bill Baldwin
Oracle and SQL Server on the Cloud - Bill BaldwinAmazon Web Services
 
Relational Database Services on AWS - Bill Baldwin, Gareth Eagar
Relational Database Services on AWS - Bill Baldwin, Gareth EagarRelational Database Services on AWS - Bill Baldwin, Gareth Eagar
Relational Database Services on AWS - Bill Baldwin, Gareth EagarAmazon Web Services
 

Ähnlich wie RDS Deep Dive on Optimizing Relational Databases (20)

Relational Database Services on AWS
Relational Database Services on AWSRelational Database Services on AWS
Relational Database Services on AWS
 
Relational Database Services on AWS - Bill Baldwin
Relational Database Services on AWS - Bill BaldwinRelational Database Services on AWS - Bill Baldwin
Relational Database Services on AWS - Bill Baldwin
 
DAT302_Deep Dive on Amazon Relational Database Service (RDS)
DAT302_Deep Dive on Amazon Relational Database Service (RDS)DAT302_Deep Dive on Amazon Relational Database Service (RDS)
DAT302_Deep Dive on Amazon Relational Database Service (RDS)
 
Relational Database Services on AWS
Relational Database Services on AWSRelational Database Services on AWS
Relational Database Services on AWS
 
Scaling your Application with AWS Relational Databases I AWS Dev Day 2018
Scaling your Application with AWS Relational Databases I AWS Dev Day 2018Scaling your Application with AWS Relational Databases I AWS Dev Day 2018
Scaling your Application with AWS Relational Databases I AWS Dev Day 2018
 
Relational Database Services on AWS
Relational Database Services on AWSRelational Database Services on AWS
Relational Database Services on AWS
 
Cost and Performance Optimisation in Amazon RDS - AWS Summit Sydney 2018
Cost and Performance Optimisation in Amazon RDS - AWS Summit Sydney 2018Cost and Performance Optimisation in Amazon RDS - AWS Summit Sydney 2018
Cost and Performance Optimisation in Amazon RDS - AWS Summit Sydney 2018
 
What's New in Amazon Relational Database Service (DAT203) - AWS re:Invent 2018
What's New in Amazon Relational Database Service (DAT203) - AWS re:Invent 2018What's New in Amazon Relational Database Service (DAT203) - AWS re:Invent 2018
What's New in Amazon Relational Database Service (DAT203) - AWS re:Invent 2018
 
10 Hacks for Optimizing MySQL in the Cloud - AWS Online Tech Talks
10 Hacks for Optimizing MySQL in the Cloud - AWS Online Tech Talks10 Hacks for Optimizing MySQL in the Cloud - AWS Online Tech Talks
10 Hacks for Optimizing MySQL in the Cloud - AWS Online Tech Talks
 
What’s new in Amazon RDS - ADB207 - Chicago AWS Summit
What’s new in Amazon RDS - ADB207 - Chicago AWS SummitWhat’s new in Amazon RDS - ADB207 - Chicago AWS Summit
What’s new in Amazon RDS - ADB207 - Chicago AWS Summit
 
Best Practices for Running Oracle Databases on Amazon RDS (DAT317) - AWS re:I...
Best Practices for Running Oracle Databases on Amazon RDS (DAT317) - AWS re:I...Best Practices for Running Oracle Databases on Amazon RDS (DAT317) - AWS re:I...
Best Practices for Running Oracle Databases on Amazon RDS (DAT317) - AWS re:I...
 
What's new in Amazon RDS - ADB206 - New York AWS Summit
What's new in Amazon RDS - ADB206 - New York AWS SummitWhat's new in Amazon RDS - ADB206 - New York AWS Summit
What's new in Amazon RDS - ADB206 - New York AWS Summit
 
MySQL and MariaDB
MySQL and MariaDBMySQL and MariaDB
MySQL and MariaDB
 
SQL Server on AWS
SQL Server on AWSSQL Server on AWS
SQL Server on AWS
 
SQL Server on AWS
SQL Server on AWSSQL Server on AWS
SQL Server on AWS
 
DAT203_Running MySQL Databases on AWS
DAT203_Running MySQL Databases on AWSDAT203_Running MySQL Databases on AWS
DAT203_Running MySQL Databases on AWS
 
Oracle & SQL Server on the Cloud: Database Week SF
Oracle & SQL Server on the Cloud: Database Week SFOracle & SQL Server on the Cloud: Database Week SF
Oracle & SQL Server on the Cloud: Database Week SF
 
Oracle & SQL Server on the Cloud: Database Week San Francisco
Oracle & SQL Server on the Cloud: Database Week San FranciscoOracle & SQL Server on the Cloud: Database Week San Francisco
Oracle & SQL Server on the Cloud: Database Week San Francisco
 
Oracle and SQL Server on the Cloud - Bill Baldwin
Oracle and SQL Server on the Cloud - Bill BaldwinOracle and SQL Server on the Cloud - Bill Baldwin
Oracle and SQL Server on the Cloud - Bill Baldwin
 
Relational Database Services on AWS - Bill Baldwin, Gareth Eagar
Relational Database Services on AWS - Bill Baldwin, Gareth EagarRelational Database Services on AWS - Bill Baldwin, Gareth Eagar
Relational Database Services on AWS - Bill Baldwin, Gareth Eagar
 

Mehr von Amazon Web Services

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Amazon Web Services
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Amazon Web Services
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateAmazon Web Services
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSAmazon Web Services
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Amazon Web Services
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Amazon Web Services
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...Amazon Web Services
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsAmazon Web Services
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareAmazon Web Services
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSAmazon Web Services
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAmazon Web Services
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareAmazon Web Services
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWSAmazon Web Services
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckAmazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without serversAmazon Web Services
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...Amazon Web Services
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceAmazon Web Services
 

Mehr von Amazon Web Services (20)

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 

RDS Deep Dive on Optimizing Relational Databases

  • 1. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Steve Abraham Principal Solutions Architect, AWS SRV310 Optimizing Relational Databases on AWS: Deep Dive on Amazon RDS
  • 2. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. What is Amazon RDS? No need to provision infrastructure, install, and maintain DB software Scale DB compute and storage with a few clicks; minimal downtime for your application Automatic Multi-AZ data replication; automated backup, snapshots, and failover SSD storage and guaranteed provisioned I/O; data encryption at rest and in transit Managed relational database service with a choice of 6 popular engines
  • 3. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Why use Amazon RDS? Lower TCO because we manage critical administrative functions • Automated hardware provisioning, database setup, patching, and backups • Get more leverage from your teams • Focus on the things that differentiate you Built-in high availability and disaster recovery across multiple data centers • Enabled with a single API call or click of a button in the console • Even a small startup can leverage enterprise-level availability, durability, and scalability
  • 4. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Configuring your database instance in Amazon RDS
  • 5. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Which RDS engine should I use? Commercial Open source Cloud native Amazon EBS-based storage Aurora storage system MySQL-compatible PostgreSQL-compatible
  • 6. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Which instance type should I choose? T2 Family • Burstable instances • 1 vCPU/1 GB RAM > 8 vCPU 32- GB RAM • Moderate networking performance • Good for smaller or variable workloads • Monitor CPU credit metrics in Amazon CloudWatch • T2.micro is eligible for free tier M4 Family • General-purpose instances • 2 vCPU/8 GiB RAM > 64 vCPU 256-GiB RAM • High-performance networking • Good for running CPU intensive workloads (e.g., WordPress) R4 Family • Memory-optimized instances • 2 vCPU/16 GiB RAM > 64 vCPU 488- GiB RAM • High-performance networking • Good for query-intensive workloads or high connection counts
  • 7. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Which storage type should I choose? General purpose (GP2) • SSD storage • Maximum of 16 TB • Leverages Amazon EBS Elastic Volumes • IOPS determined by volume size • Minimum of 100 IOPS (below 33.33 GiB) • Bursts to 3,000 IOPS (applicable below 1.3 TB) • Baseline of 10,000 IOPS (at 3.3 TB and above) • Affordable performance Provisioned IOPS (IO1) • SSD storage • Maximum of 16 TB • Leverages Amazon EBS Elastic Volumes • Maximum of 40 K IOPS (20 K on SQL Server) • Delivers within 10% of the IOPS performance 99.9% of the time • High performance and consistency Magnetic • Magnetic storage • Maximum of 1 TB • Supported for legacy databases
  • 8. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. How do I decide between GP2 and IO1? • GP2 is a great choice, but be aware of burst credits on volumes < 1 TB • Hitting credit-depletion results in IOPS drop—latency and queue depth metrics will spike until credits are replenished • Monitor BurstBalance to see percent of burst-bucket I/O credits available • Monitor read/write IOPS to see if average IOPS is greater than the baseline • Think of GP2 burst rate and PIOPS stated rate as maximum I/O rates Why am I not seeing 30 K IOPS?
  • 9. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. How do I scale my database instance? • Scale compute/memory vertically up or down • Handle higher load to grow over time • Lower usage to control costs • New host is attached to existing storage with minimal downtime • Scale up Amazon EBS storage (now up to 16 TB!) • Amazon EBS engines now support Elastic Volumes for fast scaling (now including SQL Server) • No downtime for storage scaling • Initial scaling operation may take longer, because storage is reconfigured on older instances • Can re-provision IOPS on the fly Why am I not seeing 30 K IOPS?
  • 10. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Managing high availability, read replicas, and backups in Amazon RDS
  • 11. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. How do I ensure database high availability? Multi-AZ provides enterprise- grade fault-tolerance across multiple data centers • Automatic failover • Synchronous replication • Enabled with one click Availability Zone A Availability Zone B Application servers Database failure Standby Primary New standby
  • 12. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. What happens during a Multi-AZ failover? • Each host manages set of Amazon EBS volumes with a full copy of the data • Instances are monitored by an external observer to maintain consensus over quorum • Failover initiated by automation or through the Amazon RDS API • Redirection to the new primary instance is provided through DNS DNS Primary Standby EC2 #1 EC2 #2 Availability Zone #1 Availability Zone #2 APP EBS #1 EBS #2 PrimarySecondary How long does it take?
  • 13. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Why would I use Read Replicas? Asynchronous replication BI/reporting application server Read only Read/write Primary Read replica • Relieve pressure on your source database with additional read capacity • Bring data close to your applications in different regions • Promote a Read Replica to a master for faster recovery in the event of disaster • Upgrade a Read Replica to a new engine version • Supported for MySQL, MariaDB, and PostgreSQL
  • 14. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. When should I use Multi-AZ as opposed to Read Replicas? • Synchronous replication—highly durable • Only primary instance is active at any point in time • Backups can be taken from secondary • Always in two Availability Zones within a Region • Database engine version upgrades happen on primary • Automatic failover when a problem is detected • Asynchronous replication—highly scalable • All replicas are active and can be used for read scaling • No backups configured by default • Can be within an Availability Zone, cross-AZ, or cross-region • Database engine version upgrades independently from source instance • Can be manually promoted to a standalone database Read ReplicasMulti-AZ
  • 15. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. How does Amazon RDS manage backups? • Two options – automated backups and manual snapshots • Amazon RDS backups leverage Amazon EBS snapshots stored in Amazon S3 • Transaction logs are stored every 5 minutes in Amazon S3 to support point-in-time recovery (PITR) • No performance penalty for backups • Snapshots can be copied across regions or shared with other accounts Availability Zone #2 Availability Zone #1 Region #1 Region #2 Transaction Logs DB App RDS Host RDS Host EBS Vol EBS Vol EBS Snapshot Amazon S3
  • 16. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. When should I use automated backups as opposed to snapshots? • Specify backup retention window per instance (7-day default) • Kept until outside of window (35-day maximum) or instance is deleted • Supports PITR • Good for disaster recovery • Manually created through AWS console, AWS CLI, or Amazon RDS API • Kept until you delete them • Restores to saved snapshot • Use for checkpoint before making large changes, non-production/test environments, final copy before deleting a database Manual snapshotsAutomated backups
  • 17. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. How do I restore a backup? • Restoring creates an entirely new database instance • Define the instance configuration just like a new instance • Will get the default parameter, security, and option groups • New volumes are hydrated from Amazon S3 • While the volume is usable immediately, full performance requires the volume to warm up until fully instantiated • Migrate to a DB instance class with high I/O capacity • Maximize I/O during restore process Why does it take so long?
  • 18. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Securing your Amazon RDS database instance
  • 19. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. How do I secure my Amazon RDS database? • Amazon RDS is designed to be secure by default • Network isolation with Amazon VPC • AWS Identity and Access Management (IAM)-based resource-level permission controls • Encryption at rest using AWS KMS (all engines) or Oracle/Microsoft TDE • Use Secure Sockets Layer protection for data in transit
  • 20. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. What does Amazon VPC provide? • Places your instance in a private subnet, making it secure from public routes on the internet • Database instance IP firewall protection lets you securely control network configuration • Turn off Public Accessibility in DB instance settings to restrict access outside Amazon VPC • Use ClassicLink to network with non-VPC resources Availability Zone AWS Region 10.1.0.0/16 10.1.1.0/24 AWS Direct Connect VPN connection VPC peering Internet gateway Routing rules
  • 21. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. How do I grant access to my database? • Use IAM to control who can perform actions on Amazon RDS resources. • Do not use AWS account root users to manage Amazon RDS resources. You should create an IAM user for everyone, including yourself. • Can use AWS multi-factor authentication (MFA) to provide an extra level of protection. DBA and Ops RDS
  • 22. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. How do I encrypt my database? Data keys Amazon RDS instance 3 Amazon RDS instance 2 Amazon RDS instance 1 Customer master key(s) • Use AWS KMS-based encryption in the AWS console • No performance penalty for encrypting data • Centralized access and audit of key activity • Best practices • Encryption cannot be removed from DB instances • If source is encrypted, Read Replicas must be encrypted • Add encryption to an unencrypted DB instance by encrypting a snapshot copy
  • 23. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Monitoring your Amazon RDS database instance
  • 24. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. How do I monitor my Amazon RDS database? Amazon CloudWatch metrics & alarms Upload DB logs directly to CloudWatch Logs • Amazon RDS for MySQL/MariaDB Enhanced Monitoring for Amazon RDS • Access to over 50 CPU, memory, file system, and disk I/O metrics • As low as 1-second intervals Integration with third-party monitoring tools
  • 25. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. How do I improve database performance? • Introducing Amazon RDS Performance Insights • DB load: average active sessions • Identifies database bottlenecks • Easy • Powerful • Top SQL/most intensive queries • Identifies source of bottlenecks • Enables problem discovery • Adjustable timeframe • Hour, day, week, and longer • Available now for Aurora PostgreSQL • Coming soon for all Amazon RDS engines
  • 26. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Can I know when service events happen? • Amazon RDS uses Amazon SNS to receive notification when an event occurs • Notifications can be in any form supported by Amazon SNS (email, a text message, or a call to an HTTP endpoint) • Six different source types (DB instance, DB parameter group, DB security group, DB snapshot, DB cluster, DB cluster snapshot) • 17 different event categories (availability, backup, deletion, configuration change, etc.)
  • 27. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Can I stop my database when it’s not in use? • Stop and start a running database instance from the console or AWS CLI • Available for Single-AZ DB instances • While instance is stopped, you only pay for storage • Backup retention window is maintained while stopped • Instances are restarted after 7 days • Pending maintenance operations are applied • Instances can be stopped again if desired
  • 28. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Aurora
  • 29. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Scale-out, distributed architecture Logging pushed down to a purpose-built log- structured distributed storage system Storage volume is striped across hundreds of storage nodes distributed across three Availability Zones (AZ) Six copies of data, two copies in each AZ
  • 30. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Aurora performance WRITE PERFORMANCE READ PERFORMANCE MySQL SysBench results; R4.16XL: 64 cores / 488-GB RAM Aurora read/write throughput compared to MySQL 5.6 based on industry standard benchmarks Aurora MySQL 5.6 0 100000 200000 300000 400000 500000 600000 700000 0 50000 100000 150000 200000 250000
  • 31. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. How did we achieve this? Do fewer I/Os Minimize network packets Cache prior results Offload the database engine DO LESS WORK Process asynchronously Reduce latency path Use lock-free data structures Batch operations together BE MORE EFFICIENT DATABASES ARE ALL ABOUT I/O NETWORK-ATTACHED STORAGE IS ALL ABOUT PACKETS/SECOND HIGH-THROUGHPUT PROCESSING IS ALL ABOUT CONTEXT SWITCHES
  • 32. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. I/O traffic in MySQL BINLOG DATA DOUBLE-WRITELOG FRM FILES T Y P E O F WR IT E MYSQL WITH REPLICA EBS MIRROREBS MIRROR AZ 1 AZ 2 AMAZON S3 EBSEBS PRIMARY INSTANCE REPLICA INSTANCE 1 2 3 4 5 Issue write to EBS – EBS issues to mirror, ack when both done Stage write to standby instance Issue write to EBS on standby instance I/O FLOW Steps 1, 3, 4 are sequential and synchronous This amplifies both latency and jitter Many types of writes for each user operation Have to write data blocks twice to avoid torn writes OBSERVATIONS 780K transactions 7,388K I/Os per million txns (excludes mirroring, standby) Average 7.4 I/Os per transaction PERFORMANCE 30 minute SysBench write-only workload, 100-GB dataset, Amazon RDS Multi-AZ, 30K PIOPS
  • 33. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. I/O traffic in Aurora AZ 1 AZ 3 PRIMARY INSTANCE Amazon S3 AZ 2 REPLICA INSTANCE AMAZON AURORA ASYNC 4/6 QUORUM DISTRIBUTED WRITES BINLOG DATA DOUBLE-WRITELOG FRM FILES T Y P E O F W R I T E I/O FLOW Only write redo log records; all steps asynchronous No data block writes (checkpoint, cache replacement) 6X more log writes, but 9X less network traffic Tolerant of network and storage outlier latency OBSERVATIONS 27,378K transactions 35X MORE 950K I/Os per 1M txns (6X amplification) 7.7X LESS PERFORMANCE Boxcar redo log records – fully ordered by LSN Shuffle to appropriate segments – partially ordered Boxcar to storage nodes and issue writesREPLICA INSTANCE
  • 34. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Aurora Serverless
  • 35. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Aurora Serverless ▪ Starts up on demand, shuts down when not in use ▪ Scales up/down automatically ▪ No application impact when scaling ▪ Pay per second, 1 minute minimum WARM POOL OF INSTANCES APPLICATION DATABASE STORAGE SCALABLE DB CAPACITY REQUEST ROUTER DATABASE ENDPOINT
  • 36. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Database endpoint provisioning
  • 37. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Instance provisioning and scaling
  • 38. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Speaker Contact Steve Abraham Principal Solutions Architect abrsteve@amazon.com
  • 39. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Please complete the session survey in the summit mobile app.
  • 40. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Thank you! aws.amazon.com/rds aws.amazon.com/dms
  • 41. Submit Session Feedback 1. Tap the Schedule icon. 2. Select the session you attended. 3. Tap Session Evaluation to submit your feedback.