- Traditional relational databases that include tables, rows, fields
- On-Line Transaction Processing (OLTP) type DB
- You can copy a snapshot to another region if you want to have your database available in another region
- You scale your DB by taking a snapshot and doing a restore to a larger sized tier
- RDS maximum size for a MS SQL Server DB with SQL Server Express Edition is 10GB per DB
- Supported RDS Platforms:
- MS SQL Server
- Oracle
- MySQL Server
- PostgreSQL
- Aurora
- MariaDB
- When a backup is restored, the restore will always be a new RDS instance, with a new DNS name
- Backup types:
- Automated backups
- Allows you to recover your database to any point in time within a retention period
- Retention periods can be between 1 and 35 days
- Takes a full daily snapshot and will also store transaction logs through the day
- When you do a recovery, AWS will choose the most recent daily backup and then apply transaction logs
- Allows you to do a point in time recover down to a second within the retention period
- Enabled by default
- Backup data is stored in S3
- You get free storage space equal to the size of your database.
- Taken within a defined window
- During the backup, storage I/0 may be suspended and you may experience extended latency
- Database snapshots
- User initiated from the console
- Stored even after you delete the original RDS instance unlike automatic backups
- Automated backups
- Encryption:
- Encryption at rest is supported for MySQL, Oracle, SQL Server, PostgreSQL, and MariaDB
- Encryption is done using the AWS Key Management Service (KMS)
- Once your RDS instance is encrypted the data stored at rest in the underlaying storage is encrypted, as are its automated backups, read replicas and snapshots
- To use RDS encryption, create a new DB instance with encryption enabled and migrate your data to it
- Encrypting an existing DB instance is not supported
RDS And Multi-AZ Failover
- Allows you to have an exact copy of your production database in another AZ
- AWS handles the replication for you, so when your prod database is written to, the write will automatically be synchronized to the stand-by DB
- In the event of DB maintenance, instance failure or AZ failure, RDS will automatically fail-over to the standby so that database operations can resume quickly without Admin intervention.
- In a fail-over scenario, the same DNS name is used to connect to the secondary instance, There is no need to reconfigure your application
- Multi AZ configurations are used for HA/DR only, and is not used for improving performance
- To scale for performance you need to set up read replicas
- Available for SQL Server, Oracle, MySQL, PostGreSQL, and Aurora
RDS & Using Read Replicas
- Uses asynchronous replication, from the primary instance to other instances that can be read from
- You can have up to 5 read replicas of your main database
- Allow you to have a read only copy of your prod database
- Used primarily for very read-heavy database workloads
- SQL Server and Oracle are not supported
- Used for scaling not DR
- Must have automatic backups setup
- You can have read replicas of read replicas (but could incur latency as its daisy chained)
- Each read replica will have its own DNS endpoint
- You cannot have read replicas that have Multi-AZ
- You can create read replicas of Multi-AZ source databases however
- Read Replicas can be promoted to be their own databases, however this breaks replication
- Read Replicas in a second region for MySQL and MariaDB, not for PostgreSQL
- Read Replicas can be bigger than the primary source DB from a resource perspective
Are you an AWS SysOps Administrator Associate?Take a Quiz