high availability summary… · •you can have up to 5 read replicas for mysql, postgresql &...

20
High Availability Summary

Upload: others

Post on 12-Oct-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: High Availability Summary… · •You can have up to 5 read replicas for MySQL, PostgreSQL & MariaDB • You can have read replicas in different REGIONS for all engines • Replication

High Availability Summary

Page 2: High Availability Summary… · •You can have up to 5 read replicas for MySQL, PostgreSQL & MariaDB • You can have read replicas in different REGIONS for all engines • Replication

ELASTICITY AND SCALABILITY 101

• Elasticity - Scale with Demand (Short Term)

• Scalability - Scale Out Infrastructure (Long Term)

Elasticity & Scalability Exam Tips

Page 3: High Availability Summary… · •You can have up to 5 read replicas for MySQL, PostgreSQL & MariaDB • You can have read replicas in different REGIONS for all engines • Replication

RDS MULTI-AZ FAILOVER

• RDS Multi-AZ Failover IS NOT A SCALING SOLUTION

• Read Replica’s are used to scale

RDS Multi-AZ Exam Tips

Page 4: High Availability Summary… · •You can have up to 5 read replicas for MySQL, PostgreSQL & MariaDB • You can have read replicas in different REGIONS for all engines • Replication

RDS MULTI-AZ FAILOVER

acloudguru.cgbnytpf6xwd.eu-west-2.rds.amazonaws.com

How Failover Works

Page 5: High Availability Summary… · •You can have up to 5 read replicas for MySQL, PostgreSQL & MariaDB • You can have read replicas in different REGIONS for all engines • Replication

What is Multi-AZ RDS?RDS - BACK UPS, MULTI-AZ & READ REPLICAS

Multi-AZ is for Disaster Recovery only

It is not primarily used for improving performance. For performance improvement, you need Read Replicas.

Page 6: High Availability Summary… · •You can have up to 5 read replicas for MySQL, PostgreSQL & MariaDB • You can have read replicas in different REGIONS for all engines • Replication

• You can have up to 5 read replicas for MySQL, PostgreSQL & MariaDB

• You can have read replicas in different REGIONS for all engines• Replication is Asynchronous only, not synchronous• Read Replica’s can be built off Multi-AZ’s databases• Read Replica’s themselves can also be Multi-AZ• You can have Read Replica’s of Read Replica’s beware of latency• Key Metric to look for is REPLICA LAG• KNOW THE DIFFERENCE BETWEEN READ REPLICAS AND

MULTI-AZ!

RDS Read Replicas Exam TipsRDS READ REPLICAS

Page 7: High Availability Summary… · •You can have up to 5 read replicas for MySQL, PostgreSQL & MariaDB • You can have read replicas in different REGIONS for all engines • Replication

WHICH VERSION OF RDS

• Using AWS Console

• Using CLI - aws rds describe-db-instances --region

Which Version Of RDS - Exam Tips

Page 8: High Availability Summary… · •You can have up to 5 read replicas for MySQL, PostgreSQL & MariaDB • You can have read replicas in different REGIONS for all engines • Replication

Encrypting RDS Instances

Exam Tips - Steps To Encrypt RDS Snaps

• Take a Snap of existing RDS instance.

• Copy the snap to the same/different region.

• Encrypt the copy during the copy process.

• Restore the snap.

Page 9: High Availability Summary… · •You can have up to 5 read replicas for MySQL, PostgreSQL & MariaDB • You can have read replicas in different REGIONS for all engines • Replication

Sharing Encrypted Snaps Between Accounts

Exam Tips

You can share DB snapshots that have been encrypted "at rest" using the AES-256 encryption algorithm.

• Create a CUSTOM KMS Encryption key.

• Create an RDS snapshot using the custom key.

• Share the CUSTOM AWS KMS encryption key that was used to encrypt the snapshot.

• Use the AWS Management Console, AWS CLI, or Amazon RDS API to share the encrypted snapshot with the other accounts.

Page 10: High Availability Summary… · •You can have up to 5 read replicas for MySQL, PostgreSQL & MariaDB • You can have read replicas in different REGIONS for all engines • Replication

Which Services Have Maintenance Windows?

Which Services Have Maintenance WindowsServices with maintenance windows include:

• RDS• Elasticache• Redshift• DynamoDB DAX• Neptune• Amazon DocumentDB

Services without maintenance windows include:

• EC2• Lambda• Amazon QLDB

Page 11: High Availability Summary… · •You can have up to 5 read replicas for MySQL, PostgreSQL & MariaDB • You can have read replicas in different REGIONS for all engines • Replication

ELASTICACHE

Elasticache consists of two engines:

• Memcached• Redis

http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/

CacheMetrics.WhichShouldIMonitor.html

Elasticache

Page 12: High Availability Summary… · •You can have up to 5 read replicas for MySQL, PostgreSQL & MariaDB • You can have read replicas in different REGIONS for all engines • Replication

Elasticache Exam TipsELASTICACHE

Typically, you will be given a scenario where a particular database is under a lot of stress/load. You may be asked which service you should use to alleviate this.

Elasticache is a good choice if your database is particularly read-heavy and not prone to frequent changing.

Redshift is a good answer if the reason your database is feeling stress is because management keep running OLAP transactions on it etc.

Page 13: High Availability Summary… · •You can have up to 5 read replicas for MySQL, PostgreSQL & MariaDB • You can have read replicas in different REGIONS for all engines • Replication

Elasticache Exam TipsELASTICACHE

When it comes to monitoring our caching engines there are 4 important things to look at:

• CPU Utilization• Swap Usage• Evictions• Concurrent Connections

Page 14: High Availability Summary… · •You can have up to 5 read replicas for MySQL, PostgreSQL & MariaDB • You can have read replicas in different REGIONS for all engines • Replication

Aurora Comes In Two Flavours• Aurora• Aurora Serverless

Redundancy - Two copies of your data is contained in 3 separate Availability Zones with a total of 6 copies.

Storage Is Self Healing - Data blocks and disks are continuously scanned for errors and repaired automatically.

Aurora Exam TipsAURORA 101

Page 15: High Availability Summary… · •You can have up to 5 read replicas for MySQL, PostgreSQL & MariaDB • You can have read replicas in different REGIONS for all engines • Replication

Aurora at 100% CPU Utilization? • Is it Writes causing the issue? If so Scale Up (increase

instance size)• Is it Reads causing the issue? If so Scale Out (increase the

number of read replicas).

Aurora 100% CPU Utilization?AURORA 101

Page 16: High Availability Summary… · •You can have up to 5 read replicas for MySQL, PostgreSQL & MariaDB • You can have read replicas in different REGIONS for all engines • Replication

Aurora Exam TipsAURORA 101

Page 17: High Availability Summary… · •You can have up to 5 read replicas for MySQL, PostgreSQL & MariaDB • You can have read replicas in different REGIONS for all engines • Replication

Aurora - Encryption at rest is turned on by default. Once Encryption is turned on, all read replicas will be encrypted.

Failover - Failover is defined by Tiers. The lower the tier the higher the priority with Tier 0 being the highest priority available.

Aurora Exam TipsAURORA

Page 18: High Availability Summary… · •You can have up to 5 read replicas for MySQL, PostgreSQL & MariaDB • You can have read replicas in different REGIONS for all engines • Replication

Cross Region Replicas - Creating a new cross region replica will also create a new Aurora cluster in the target region. If the replication is disrupted, you will have to set up again. It is recommended that you select "Multi-AZ Deployment" to ensure high availability for the target cluster.

Aurora Exam TipsAURORA

Page 19: High Availability Summary… · •You can have up to 5 read replicas for MySQL, PostgreSQL & MariaDB • You can have read replicas in different REGIONS for all engines • Replication

Instances not launching in to Autoscaling GroupsTroubleshooting Autoscaling

Below is a list of things to look for if your instances are not launching in to an autoscaling group;

• Associated Key Pair does not exist• Security group does not exist• Autoscaling config is not working correctly• Autoscaling group not found• Instance type specified is not supported in the AZ• AZ is no longer supported• Invalid EBS device mapping• Autoscaling service is not enabled on your account• Attempting to attach and EBS block device to an instance-store AMI

Page 20: High Availability Summary… · •You can have up to 5 read replicas for MySQL, PostgreSQL & MariaDB • You can have read replicas in different REGIONS for all engines • Replication

IMPROVING CLOUDFRONT PERFORMANCE - CACHE HIT RATIOS

Maximise Cache Hit RatioThe following strategies can maximise your cache hit ratios• Specifying How Long CloudFront Caches Your Objects• Caching Based on Query String Parameters• Caching Based on Cookie Values• Caching Based on Request Headers• Remove Accept-Encoding Header When Compression is Not

Needed• Serving Media Content by Using HTTP