Database Specialty - Aurora Flashcards
Aurora compatible relational database
MySQL and PostgreSQL
Aurora faster standard MySQL
5x faster
Aurora faster standard PostgreSQL
3x faster
Aurora quantity copies maintains
6 copies across 3 AZs
Fast backtracking option for…
PITR
Aurora DB cluster types
Writer Endpoint (master) and Reader Endpoint (Connection Load Balancing)
Number Max Endpoints custom
5
Automatic failovers from the
master instance
Aurora Serverless automatically…
starts up, shuts down, scales up/down based on application needs
Aurora serverless results compared to RDS
40% lesser overall
What happens in case of cluster or AZ failure?
Creates the DB instance in another AZ
Data API types used for run queries
Query Editor within RDS console, Command Line, AWS SDK
To access VPC resources in relation for Lambda
No need to configure
Aurora Multi-Master - typically results in…
zero downtime
Global Aurora - Cross Region Read Replicas points principal
- useful for disaster recovery
- simple to put in place
- replica promotion can take a few minutes depending on worload
Aurora Global Databases (recommended) - points principal
- Primary Region (read / write)
- up to 5 secondary (read-only) regions
- up to 16 read replicas per secondary region
- helps for decreasing latency
- promoting another region (for DR)
Reliability features in Aurora - explain storage Auto-Repair principal points
- automatically detects and repairs disk volume failures in the cluster volume
- quorum model ensure that is no data loss due to disk failures
Principal points about Survivable Warming
- Aurora page cache is managed in a separate process from the DB
- Page cache stores pages for known common queries
- Every time Aurora starts/restarts, it preloads the buffer pool cache from the page cache
- Eliminates the need to warm up the buffer cache
Principal points Crash Recovery
- Designed to recover from crashes almost instantaneously
- DOES NOT need replay the redo log from DB checkpoint
- DOES NOT need binary logs for replication within cluster or for PITR
- Binary logging on Aurora directly affects the recovery time after a crash
- Higher the binlog data size, longer it takes for crash recovery
- Disable binary logging (binlog_format=OFF) to reduce recovery time
Principal Points in cluster cache management CCM
> Buffer cache is to reduce disk IO in RDBMS
Cached content in primary and replica may be different
Post a failover from primary to a replica, promoted replica takes some time to warm up its cache
this causes slower response time post failover
CCM improves the performance of the promoted instance post failover
Replica preemptively reads frequently accessed buffers cached from the primary
Simulating Fault Tolerance in Aurora points
- Two ways to test/simulate fault tolerance (Manual failover, Fault injection queries)
- Fault tolerance is synonymous to resiliency (or fault resiliency)
- You can use these options to simulate AZ Failure
- Can perform primary upgrade by force failover
Simulating fault tolerance w/ manua failover points
> Select the master instance and choose Actions -> Failover (or use failover-db-cluster command)
Failover to the replica with highest failover priority will be triggered
The read replica with highest failover priority will be the new master
The master instance that failed over will become a replica when it comes online
As each instance has its own endpoint address
So you should clean up and re-establish any existing connections that use the old endpoints post a failover
Simulating fault tolerance w/ fault injection
queries points
- Fault injection queries are issued as SQL commands
- You can schedule a simulated occurrence of
different failure events - writer/reader crash
- replica failure
- disk failure
- disk congestion
Fault injection queries – writer / reader crash
ALTER SYSTEM CRASH
[ INSTANCE | DISPATCHER | NODE ];
- Instance = DB instance (default crash type)
- Dispatcher = writes updates to the cluster volume
- Node = Instance + Dispatcher