Aurora Flashcards
Basics about Aurora
- DB Engines: PostgreSQL-compatible & MySQL-compatible
- Storage: automatically grows up to 128 TB, 6 copies of data, multi-AZ
- Read Replicas: up to 15 RR, reader endpoint to access them all
- Cross Region RR: entire database is copied (not select tables)
- Load / Offload data directly from / to S3: efficient use of resources
- Backup, Snapshots & Restore: same as RDS
Aurora High Availability and Read Scaling
6 copies of your data across 3 AZ:
* 4 copies out of 6 needed for writes
* 3 copies out of 6 need for reads
* Self healing with peer-to-peer replication
* Storage is striped across 100s of volumes
- Automated failover for master in less
than 30 seconds - Master + up to 15 Aurora Read
Replicas serve reads - Support for Cross Region Replication
Aurora Endpoints
- Endpoint = Host Address + Port
Cluster Endpoint (Writer Endpoint)
* Connects to the current primary DB instance in the Aurora cluster
* Used for all write operations in the DB cluster (inserts, updates, deletes, and queries)
Reader Endpoint
* Provides load-balancing for read only connections to all Aurora Replicas in the Aurora cluster
* Used only for read operations (queries)
Custom Endpoint
* Represents a set on DB instances that you choose in the Aurora cluster
* Used when you want to connect to different subsets of DB instances with different capacities and
configurations (e.g., different DB parameter group)
Instance Endpoint
* Connects to a specific DB instance in the Aurora cluster
* Used when you want to diagnosis and fine tune a specific DB instance
Aurora Logs
You can monitor the following types
of Aurora MySQL log files:
* Error log
* Slow query log
* General log
* The audit log
These log files are either downloaded or
published to CloudWatch Logs
Troubleshooting RDS & Aurora Performance
- Performance Insights: find issues by waits, SQL statements, hosts and users
- CloudWatch Metrics: CPU, Memory, Swap Usage
- Enhanced Monitoring Metrics: at host level, process view, per-second metric
- Slow Query logs
Aurora Serverless
- Automated database instantiation and auto
- scaling based on actual usage
- Good for infrequent, intermittent or unpredictable workloads
- No capacity planning needed
- Pay per second, can be more cost-effective
Aurora Serverless - Data API
Access Aurora Serverless DB with a simple
API endpoint (no JDBC connection needed)
- Secure HTTPS endpoint to run SQL
statements - No persistent DB connections management
- Users must be granted permissions to Data
API and Secrets Manager (where credentials
are checked)
RDS Proxy for Aurora
Ability to create an additional read-only endpoint that connects to Aurora Read Replicas only
Global Aurora
Aurora Cross Region Read Replicas
* Useful for disaster recovery
* Simple to put in place
Aurora Global Database (recommended)
* 1 Primary Region (read / write)
* Up to 5 secondary (read-only) regions, replication lag is
less than 1 second
* Up to 16 Read Replicas per secondary region
* Helps for decreasing latency
* Promoting another region (for disaster recovery) has an
RTO of < 1 minute
* Ability to manage the RPO in Aurora for PostgreSQL
Aurora Global – Write Forwarding
Enables Secondary DB Clusters to
forward SQL statements that
perform write operations to the
Primary DB Cluster
- Data is always changed first on the
Primary DB Cluster, then replicated
to the Secondary DB Clusters - Primary DB Cluster always has an
up-to-date copy of all data - Reduces the number of endpoints to
manage
Two ways to convert RDS to Aurora
Create a snapshot of the RDS DB instance and restore it in Aurora DB instance
OR
Create an Aurora Read Replica of the RDS DB Instance and then later promote it to an Aurora DB instance