SlideShare a Scribd company logo
1 of 28
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Brad Staszcuk
Solutions Architect, Amazon Web Services
Cost and Performance Optimisation
In Amazon RDS
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
• Managed relational database service in the AWS cloud
• Multi-engine support: Amazon Aurora, MySQL, MariaDB,
PostgreSQL, Oracle, SQL Server
• Automated provisioning, patching, scaling, replicas,
backup/restore
• Easily scales to handle growth
• High availability with Multi-AZ and Amazon Aurora Amazon RDS
What Is Amazon RDS?
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Why Use Amazon RDS?
• Lower TCO as a managed service
• More leverage from teams
• Focus on differentiation
• Built-in high availability and cross-region
replication
• Companies of all sizes can leverage multiple data
centres to design highly available apps with over
99.95% availability
© 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.
Amazon RDS Engine Selection
Amazon Aurora
Microsoft SQL
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
• T2 Family
• Burstable instance types
• Good for smaller workloads
• M3/M4 Family
• General purpose instance types
• Good for CPU intensive workloads
• R3/R4 Family
• Memory optimised instance types
• Good for query-intensive workloads
Amazon RDS Instance Type Selection
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
• General (GP2)
• SSD
• Affordable performance
• Provisioned IOPS (IO1)
• SSD
• High consistency and performance
• Magnetic
• Legacy support
Amazon RDS Storage Type Selection
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
• 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
How Do I Decide Between GP2 And IO1?
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
• 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 support Elastic Volumes
• No downtime for storage scaling
• Initial scaling operation may take longer for older
instances
• Re-provision IOPS on the fly
How Do I Scale My Database Instance?
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Managing High Availability, Read
Replicas, And Backups
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Automatic failover
Synchronous replication
Inexpensive and enabled with one click
DNS
Primary Standby
EC2
#1
EC2
#2
Availability Zone #1 Availability Zone #2
APP
EBS
#1
EBS
#2
PrimarySecondary
Multi-AZ
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
• 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
Read Replicas help your application scale
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
• 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
How Are Backups Managed?
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
• Restoring creates an entirely new database instance
• Define the instance configuration like a new
instance
• Will get the default parameter, security, and
option groups
• New volumes are hydrated from Amazon S3
• 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
• Maximise I/O during restore process
How Do I Restore A Backup?
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Securing Your Databases
On Amazon RDS
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
• Amazon RDS is designed to be secure by default
• Network isolation with Amazon Virtual Private
Cloud (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 SSL protection for data in transit
How Do I Secure My Database?
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
• Use IAM to control who can perform actions on Amazon RDS resources
• Do not use AWS root credentials to manage Amazon RDS resources—you should
create an IAM user for everyone, including yourself
• Can use AWS Multi-Factor Authentication (MFA) to provide extra level of protection
DBA and Ops
Amazon RDS
Controlled with IAM
Users and DBAApplications
Your database
Controlled with database grants
How Do I Grant Access To My Database?
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
• Use AWS KMS-based encryption in the AWS console
• No performance penalty for encrypting data
• Centralised 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
Data keys
Amazon
RDS
instance 3
Amazon
RDS
instance 2
Amazon
RDS
instance 1
Customer master key(s)
How Do I Encrypt My Database?
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Monitoring Your Databases
On Amazon RDS
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon CloudWatch metrics
• CPU/Storage/Memory
• Swap usage
• I/O (read and write)
• Latency (read and write)
• Throughput (read and write)
• Replica lag
Amazon CloudWatch Alarms
• Similar to on-premises monitoring tools
Enhanced monitoring for Amazon RDS
• Access to over 50 CPU, memory, file system,
and disk I/O metrics
• Low as 1-second intervals
Integration with third-party monitoring tools
How Do I Monitor My Database?
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
• Introducing Amazon RDS Performance Insights
• Measures DB Load: Average Active Sessions (AAS)
• Identifies database bottlenecks (Top SQL)
• Easy
• Powerful
• Identifies source of bottlenecks
• Enables problem discovery
• Adjustable time frame
• Hour, day, week, and longer
• Coming soon for EBS-based RDS engines
https://aws.amazon.com/rds/performance-insights/
How Do I Improve Database Performance?
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon RDS Billing
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
• Database instance (instance hours)
• Combination of Region + instance type + database engine +
license (optional)
• Database storage (GB-mo)
• Either provisioned (Amazon EBS) or consumed (Amazon Aurora)
• Provisioned IOPS (IOPS-Mo) for IO1 storage type
• Database I/O requests (IOs) for Amazon Aurora and Amazon
EBS magnetic-storage types
• Backup storage (GB-mo)
• Size of backups and snapshots stored in Amazon S3
• No charge for backup storage up to 100% of total database
storage
• Data transfer (GB-mo)
• Uses AWS regional data-transfer pricing
How Am I Charged For Amazon RDS?
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
• Amazon RDS charges are grouped by Region
• Instances are grouped by engine
• Storage and backup charges are cross-engine
• Use AWS Cost Explorer for graphical comparison
• Use the AWS Cost & Usage Report for billing
details
• Must be enabled for account
• Stored in your Amazon S3 bucket
How Do I Understand My Bill?
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
• Amazon RDS Reserved Instances (RIs) provide a discount over on-demand prices
• Region, instance family, and engine of on-demand usage must match to apply benefit
• Amazon RDS RIs offer size flexibility based on engine
• By default, RIs are shared between all
accounts in consolidated billing
• Use the RI utilisation report to determine
how your RIs are being used
• Support for RI coverage report
coming soon
How Can I Save Money On My Database?
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
• Yes! 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 automatically restarted after 7 days
• Pending maintenance operations are applied
• Instances can be stopped again if desired
Can I Stop My Database When Not In Use?
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Closing Notes
More information on Amazon Aurora: https://aws.amazon.com/rds/aurora/
• Reserve
• Right-size
• Monitor
• Shutdown
Cost Performance
• Instance family
• Storage type
• Read replicas
• Multi-AZ
• Vertical scaling
• VPC vs Public
• IAM and DB Grants
• Encryption
• Backups/Snapshots
Security
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Thank you!

More Related Content

What's hot

Introducing AWS DataSync - Simplify, automate, and accelerate online data tra...
Introducing AWS DataSync - Simplify, automate, and accelerate online data tra...Introducing AWS DataSync - Simplify, automate, and accelerate online data tra...
Introducing AWS DataSync - Simplify, automate, and accelerate online data tra...Amazon Web Services
 
AWS Security Week: Security, Identity, & Compliance
AWS Security Week: Security, Identity, & ComplianceAWS Security Week: Security, Identity, & Compliance
AWS Security Week: Security, Identity, & ComplianceAmazon Web Services
 
Migrating Your AD to the Cloud with AWS Directory Services for Microsoft Acti...
Migrating Your AD to the Cloud with AWS Directory Services for Microsoft Acti...Migrating Your AD to the Cloud with AWS Directory Services for Microsoft Acti...
Migrating Your AD to the Cloud with AWS Directory Services for Microsoft Acti...Amazon Web Services
 
Migrating Databases to the Cloud: Introduction to AWS DMS - SRV215 - Chicago ...
Migrating Databases to the Cloud: Introduction to AWS DMS - SRV215 - Chicago ...Migrating Databases to the Cloud: Introduction to AWS DMS - SRV215 - Chicago ...
Migrating Databases to the Cloud: Introduction to AWS DMS - SRV215 - Chicago ...Amazon Web Services
 
AWS Partner Webcast - Use Your AWS CloudTrail Data and Splunk Software To Imp...
AWS Partner Webcast - Use Your AWS CloudTrail Data and Splunk Software To Imp...AWS Partner Webcast - Use Your AWS CloudTrail Data and Splunk Software To Imp...
AWS Partner Webcast - Use Your AWS CloudTrail Data and Splunk Software To Imp...Amazon Web Services
 
Modern Cloud Data Warehousing ft. Intuit: Optimize Analytics Practices (ANT20...
Modern Cloud Data Warehousing ft. Intuit: Optimize Analytics Practices (ANT20...Modern Cloud Data Warehousing ft. Intuit: Optimize Analytics Practices (ANT20...
Modern Cloud Data Warehousing ft. Intuit: Optimize Analytics Practices (ANT20...Amazon Web Services
 
Best Practices for Database Migration to the Cloud: Improve Application Perfo...
Best Practices for Database Migration to the Cloud: Improve Application Perfo...Best Practices for Database Migration to the Cloud: Improve Application Perfo...
Best Practices for Database Migration to the Cloud: Improve Application Perfo...Amazon Web Services
 
An Overview of Best Practices for Large Scale Migrations - AWS Transformation...
An Overview of Best Practices for Large Scale Migrations - AWS Transformation...An Overview of Best Practices for Large Scale Migrations - AWS Transformation...
An Overview of Best Practices for Large Scale Migrations - AWS Transformation...Amazon Web Services
 
Deep Dive into Amazon ECS & Fargate
Deep Dive into Amazon ECS & FargateDeep Dive into Amazon ECS & Fargate
Deep Dive into Amazon ECS & FargateAmazon Web Services
 
Module 2: Core AWS Compute and Storage Services - Virtual AWSome Day June 2018
Module 2: Core AWS Compute and Storage Services - Virtual AWSome Day June 2018Module 2: Core AWS Compute and Storage Services - Virtual AWSome Day June 2018
Module 2: Core AWS Compute and Storage Services - Virtual AWSome Day June 2018Amazon Web Services
 
Getting Started with AWS Database Migration Service
Getting Started with AWS Database Migration ServiceGetting Started with AWS Database Migration Service
Getting Started with AWS Database Migration ServiceAmazon Web Services
 
How to Manage Inventory, Patching, and System Images for Your Hybrid Cloud wi...
How to Manage Inventory, Patching, and System Images for Your Hybrid Cloud wi...How to Manage Inventory, Patching, and System Images for Your Hybrid Cloud wi...
How to Manage Inventory, Patching, and System Images for Your Hybrid Cloud wi...Amazon Web Services
 
Day 5 - AWS Autoscaling Master Class - The New Capacity Plan
Day 5 - AWS Autoscaling Master Class - The New Capacity PlanDay 5 - AWS Autoscaling Master Class - The New Capacity Plan
Day 5 - AWS Autoscaling Master Class - The New Capacity PlanAmazon Web Services
 
Executing a Large-Scale Migration to AWS
Executing a Large-Scale Migration to AWSExecuting a Large-Scale Migration to AWS
Executing a Large-Scale Migration to AWSAmazon Web Services
 
Cloud cost optimization (AWS, GCP)
Cloud cost optimization (AWS, GCP)Cloud cost optimization (AWS, GCP)
Cloud cost optimization (AWS, GCP)Szabolcs Zajdó
 

What's hot (20)

Introducing AWS DataSync - Simplify, automate, and accelerate online data tra...
Introducing AWS DataSync - Simplify, automate, and accelerate online data tra...Introducing AWS DataSync - Simplify, automate, and accelerate online data tra...
Introducing AWS DataSync - Simplify, automate, and accelerate online data tra...
 
AWS Security Week: Security, Identity, & Compliance
AWS Security Week: Security, Identity, & ComplianceAWS Security Week: Security, Identity, & Compliance
AWS Security Week: Security, Identity, & Compliance
 
Migrating Your AD to the Cloud with AWS Directory Services for Microsoft Acti...
Migrating Your AD to the Cloud with AWS Directory Services for Microsoft Acti...Migrating Your AD to the Cloud with AWS Directory Services for Microsoft Acti...
Migrating Your AD to the Cloud with AWS Directory Services for Microsoft Acti...
 
AWS RDS
AWS RDSAWS RDS
AWS RDS
 
Migrating Databases to the Cloud: Introduction to AWS DMS - SRV215 - Chicago ...
Migrating Databases to the Cloud: Introduction to AWS DMS - SRV215 - Chicago ...Migrating Databases to the Cloud: Introduction to AWS DMS - SRV215 - Chicago ...
Migrating Databases to the Cloud: Introduction to AWS DMS - SRV215 - Chicago ...
 
AWS Partner Webcast - Use Your AWS CloudTrail Data and Splunk Software To Imp...
AWS Partner Webcast - Use Your AWS CloudTrail Data and Splunk Software To Imp...AWS Partner Webcast - Use Your AWS CloudTrail Data and Splunk Software To Imp...
AWS Partner Webcast - Use Your AWS CloudTrail Data and Splunk Software To Imp...
 
Modern Cloud Data Warehousing ft. Intuit: Optimize Analytics Practices (ANT20...
Modern Cloud Data Warehousing ft. Intuit: Optimize Analytics Practices (ANT20...Modern Cloud Data Warehousing ft. Intuit: Optimize Analytics Practices (ANT20...
Modern Cloud Data Warehousing ft. Intuit: Optimize Analytics Practices (ANT20...
 
Best Practices for Database Migration to the Cloud: Improve Application Perfo...
Best Practices for Database Migration to the Cloud: Improve Application Perfo...Best Practices for Database Migration to the Cloud: Improve Application Perfo...
Best Practices for Database Migration to the Cloud: Improve Application Perfo...
 
An Overview of Best Practices for Large Scale Migrations - AWS Transformation...
An Overview of Best Practices for Large Scale Migrations - AWS Transformation...An Overview of Best Practices for Large Scale Migrations - AWS Transformation...
An Overview of Best Practices for Large Scale Migrations - AWS Transformation...
 
Deep Dive into Amazon ECS & Fargate
Deep Dive into Amazon ECS & FargateDeep Dive into Amazon ECS & Fargate
Deep Dive into Amazon ECS & Fargate
 
AWS Storage Options
AWS Storage OptionsAWS Storage Options
AWS Storage Options
 
Introducing AWS Fargate
Introducing AWS FargateIntroducing AWS Fargate
Introducing AWS Fargate
 
Module 2: Core AWS Compute and Storage Services - Virtual AWSome Day June 2018
Module 2: Core AWS Compute and Storage Services - Virtual AWSome Day June 2018Module 2: Core AWS Compute and Storage Services - Virtual AWSome Day June 2018
Module 2: Core AWS Compute and Storage Services - Virtual AWSome Day June 2018
 
Getting Started with AWS Database Migration Service
Getting Started with AWS Database Migration ServiceGetting Started with AWS Database Migration Service
Getting Started with AWS Database Migration Service
 
How to Manage Inventory, Patching, and System Images for Your Hybrid Cloud wi...
How to Manage Inventory, Patching, and System Images for Your Hybrid Cloud wi...How to Manage Inventory, Patching, and System Images for Your Hybrid Cloud wi...
How to Manage Inventory, Patching, and System Images for Your Hybrid Cloud wi...
 
Day 5 - AWS Autoscaling Master Class - The New Capacity Plan
Day 5 - AWS Autoscaling Master Class - The New Capacity PlanDay 5 - AWS Autoscaling Master Class - The New Capacity Plan
Day 5 - AWS Autoscaling Master Class - The New Capacity Plan
 
Cost Optimization in AWS
Cost Optimization in AWSCost Optimization in AWS
Cost Optimization in AWS
 
Executing a Large-Scale Migration to AWS
Executing a Large-Scale Migration to AWSExecuting a Large-Scale Migration to AWS
Executing a Large-Scale Migration to AWS
 
Getting Started with Amazon EC2
Getting Started with Amazon EC2Getting Started with Amazon EC2
Getting Started with Amazon EC2
 
Cloud cost optimization (AWS, GCP)
Cloud cost optimization (AWS, GCP)Cloud cost optimization (AWS, GCP)
Cloud cost optimization (AWS, GCP)
 

Similar to Cost and Performance Optimisation in Amazon RDS - AWS Summit Sydney 2018

Relational Database Services on AWS
Relational Database Services on AWSRelational Database Services on AWS
Relational Database Services on AWSAmazon Web Services
 
Amazon RDS & Amazon Aurora: Relational Databases on AWS - SRV206 - Atlanta AW...
Amazon RDS & Amazon Aurora: Relational Databases on AWS - SRV206 - Atlanta AW...Amazon RDS & Amazon Aurora: Relational Databases on AWS - SRV206 - Atlanta AW...
Amazon RDS & Amazon Aurora: Relational Databases on AWS - SRV206 - Atlanta AW...Amazon Web Services
 
SRV310 Optimizing Relational Databases on AWS: Deep Dive on Amazon RDS
 SRV310 Optimizing Relational Databases on AWS: Deep Dive on Amazon RDS SRV310 Optimizing Relational Databases on AWS: Deep Dive on Amazon RDS
SRV310 Optimizing Relational Databases on AWS: Deep Dive on Amazon RDSAmazon 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
 
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
 
Relational Database Services on AWS
Relational Database Services on AWSRelational Database Services on AWS
Relational Database Services on AWSAmazon 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 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
 
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
 
Databases - EBC on the road Brazil Edition [Portuguese]
Databases - EBC on the road Brazil Edition [Portuguese]Databases - EBC on the road Brazil Edition [Portuguese]
Databases - EBC on the road Brazil Edition [Portuguese]Amazon 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
 
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 - 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
 
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
 
Module 4 - AWSome Day Online Conference 2018
Module 4 - AWSome Day Online Conference 2018Module 4 - AWSome Day Online Conference 2018
Module 4 - AWSome Day Online Conference 2018Amazon Web Services
 
Oracle and SQL Server on the Cloud
Oracle and SQL Server on the CloudOracle and SQL Server on the Cloud
Oracle and SQL Server on the CloudAmazon Web Services
 

Similar to Cost and Performance Optimisation in Amazon RDS - AWS Summit Sydney 2018 (20)

Relational Database Services on AWS
Relational Database Services on AWSRelational Database Services on AWS
Relational Database Services on AWS
 
Amazon RDS & Amazon Aurora: Relational Databases on AWS - SRV206 - Atlanta AW...
Amazon RDS & Amazon Aurora: Relational Databases on AWS - SRV206 - Atlanta AW...Amazon RDS & Amazon Aurora: Relational Databases on AWS - SRV206 - Atlanta AW...
Amazon RDS & Amazon Aurora: Relational Databases on AWS - SRV206 - Atlanta AW...
 
Amazon RDS_Deep Dive - SRV310
Amazon RDS_Deep Dive - SRV310 Amazon RDS_Deep Dive - SRV310
Amazon RDS_Deep Dive - SRV310
 
SRV310 Optimizing Relational Databases on AWS: Deep Dive on Amazon RDS
 SRV310 Optimizing Relational Databases on AWS: Deep Dive on Amazon RDS SRV310 Optimizing Relational Databases on AWS: Deep Dive on Amazon RDS
SRV310 Optimizing Relational Databases on AWS: Deep Dive on Amazon RDS
 
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
 
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
 
Relational Database Services on AWS
Relational Database Services on AWSRelational Database Services on AWS
Relational Database Services on AWS
 
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 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
 
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...
 
Databases - EBC on the road Brazil Edition [Portuguese]
Databases - EBC on the road Brazil Edition [Portuguese]Databases - EBC on the road Brazil Edition [Portuguese]
Databases - EBC on the road Brazil Edition [Portuguese]
 
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
 
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 - 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
 
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
 
Module 4 - AWSome Day Online Conference 2018
Module 4 - AWSome Day Online Conference 2018Module 4 - AWSome Day Online Conference 2018
Module 4 - AWSome Day Online Conference 2018
 
SQL Server on AWS
SQL Server on AWSSQL Server on AWS
SQL Server on AWS
 
Oracle and SQL Server on the Cloud
Oracle and SQL Server on the CloudOracle and SQL Server on the Cloud
Oracle and SQL Server on the Cloud
 

More from 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
 

More from 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
 

Cost and Performance Optimisation in Amazon RDS - AWS Summit Sydney 2018

  • 1. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Brad Staszcuk Solutions Architect, Amazon Web Services Cost and Performance Optimisation In Amazon RDS
  • 2. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. • Managed relational database service in the AWS cloud • Multi-engine support: Amazon Aurora, MySQL, MariaDB, PostgreSQL, Oracle, SQL Server • Automated provisioning, patching, scaling, replicas, backup/restore • Easily scales to handle growth • High availability with Multi-AZ and Amazon Aurora Amazon RDS What Is Amazon RDS?
  • 3. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Why Use Amazon RDS? • Lower TCO as a managed service • More leverage from teams • Focus on differentiation • Built-in high availability and cross-region replication • Companies of all sizes can leverage multiple data centres to design highly available apps with over 99.95% availability
  • 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. Amazon RDS Engine Selection Amazon Aurora Microsoft SQL
  • 6. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. • T2 Family • Burstable instance types • Good for smaller workloads • M3/M4 Family • General purpose instance types • Good for CPU intensive workloads • R3/R4 Family • Memory optimised instance types • Good for query-intensive workloads Amazon RDS Instance Type Selection
  • 7. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. • General (GP2) • SSD • Affordable performance • Provisioned IOPS (IO1) • SSD • High consistency and performance • Magnetic • Legacy support Amazon RDS Storage Type Selection
  • 8. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. • 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 How Do I Decide Between GP2 And IO1?
  • 9. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. • 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 support Elastic Volumes • No downtime for storage scaling • Initial scaling operation may take longer for older instances • Re-provision IOPS on the fly How Do I Scale My Database Instance?
  • 10. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Managing High Availability, Read Replicas, And Backups
  • 11. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Automatic failover Synchronous replication Inexpensive and enabled with one click DNS Primary Standby EC2 #1 EC2 #2 Availability Zone #1 Availability Zone #2 APP EBS #1 EBS #2 PrimarySecondary Multi-AZ
  • 12. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. • 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 Read Replicas help your application scale
  • 13. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. • 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 How Are Backups Managed?
  • 14. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. • Restoring creates an entirely new database instance • Define the instance configuration like a new instance • Will get the default parameter, security, and option groups • New volumes are hydrated from Amazon S3 • 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 • Maximise I/O during restore process How Do I Restore A Backup?
  • 15. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Securing Your Databases On Amazon RDS
  • 16. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. • Amazon RDS is designed to be secure by default • Network isolation with Amazon Virtual Private Cloud (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 SSL protection for data in transit How Do I Secure My Database?
  • 17. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. • Use IAM to control who can perform actions on Amazon RDS resources • Do not use AWS root credentials to manage Amazon RDS resources—you should create an IAM user for everyone, including yourself • Can use AWS Multi-Factor Authentication (MFA) to provide extra level of protection DBA and Ops Amazon RDS Controlled with IAM Users and DBAApplications Your database Controlled with database grants How Do I Grant Access To My Database?
  • 18. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. • Use AWS KMS-based encryption in the AWS console • No performance penalty for encrypting data • Centralised 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 Data keys Amazon RDS instance 3 Amazon RDS instance 2 Amazon RDS instance 1 Customer master key(s) How Do I Encrypt My Database?
  • 19. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Monitoring Your Databases On Amazon RDS
  • 20. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon CloudWatch metrics • CPU/Storage/Memory • Swap usage • I/O (read and write) • Latency (read and write) • Throughput (read and write) • Replica lag Amazon CloudWatch Alarms • Similar to on-premises monitoring tools Enhanced monitoring for Amazon RDS • Access to over 50 CPU, memory, file system, and disk I/O metrics • Low as 1-second intervals Integration with third-party monitoring tools How Do I Monitor My Database?
  • 21. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. • Introducing Amazon RDS Performance Insights • Measures DB Load: Average Active Sessions (AAS) • Identifies database bottlenecks (Top SQL) • Easy • Powerful • Identifies source of bottlenecks • Enables problem discovery • Adjustable time frame • Hour, day, week, and longer • Coming soon for EBS-based RDS engines https://aws.amazon.com/rds/performance-insights/ How Do I Improve Database Performance?
  • 22. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon RDS Billing
  • 23. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. • Database instance (instance hours) • Combination of Region + instance type + database engine + license (optional) • Database storage (GB-mo) • Either provisioned (Amazon EBS) or consumed (Amazon Aurora) • Provisioned IOPS (IOPS-Mo) for IO1 storage type • Database I/O requests (IOs) for Amazon Aurora and Amazon EBS magnetic-storage types • Backup storage (GB-mo) • Size of backups and snapshots stored in Amazon S3 • No charge for backup storage up to 100% of total database storage • Data transfer (GB-mo) • Uses AWS regional data-transfer pricing How Am I Charged For Amazon RDS?
  • 24. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. • Amazon RDS charges are grouped by Region • Instances are grouped by engine • Storage and backup charges are cross-engine • Use AWS Cost Explorer for graphical comparison • Use the AWS Cost & Usage Report for billing details • Must be enabled for account • Stored in your Amazon S3 bucket How Do I Understand My Bill?
  • 25. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. • Amazon RDS Reserved Instances (RIs) provide a discount over on-demand prices • Region, instance family, and engine of on-demand usage must match to apply benefit • Amazon RDS RIs offer size flexibility based on engine • By default, RIs are shared between all accounts in consolidated billing • Use the RI utilisation report to determine how your RIs are being used • Support for RI coverage report coming soon How Can I Save Money On My Database?
  • 26. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. • Yes! 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 automatically restarted after 7 days • Pending maintenance operations are applied • Instances can be stopped again if desired Can I Stop My Database When Not In Use?
  • 27. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Closing Notes More information on Amazon Aurora: https://aws.amazon.com/rds/aurora/ • Reserve • Right-size • Monitor • Shutdown Cost Performance • Instance family • Storage type • Read replicas • Multi-AZ • Vertical scaling • VPC vs Public • IAM and DB Grants • Encryption • Backups/Snapshots Security
  • 28. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Thank you!