DEV Community

Adeline Makokha for AWS Community Builders

Posted on • Updated on

Amazon RDS

Database as a Service
Database Server as a service

The unit of consumption is a database server that you
have access to.

Can handle multiple SQL Database engines such as
MySQL, MariaDB, PostgreSQL, Oracle, Microsoft Server,
Aurora

Aurora is an engine created by AWS and it has a unique
set of features.

Works by creating an instance

It is accessed through it’s hostname

You can choose from the different instance types and sizes available

An instance can be in a single AZ or multi-AZ.

A single AZ deployment has one attached piece of Block Storage.

Access to the RDS instance is controlled by a security group.

rds

Multi-AZ

• No free tier – you pay double the price you pay for a single AZ deployment because the same infrastructure is provisioned in a different AZ.

• Synchronous replication

• Standby CAN’T be directly used. It can never be used to scale reads.

• It is used to improve availability, not performance.

• It makes your instance highly available but not fault tolerant. Failover is between 60 –120 seconds.

• It happens in the SAME region but a different AZ.

• Backups are taken from the standby instance (removes performance impact or disruption).

rds

RPO VS RTO
rds

RDS Backups
• 2 types of backups

• Automated Backups and Manual Snapshots

• Both utilize S3 but they are AWS managed S3 buckets so they won’t be visible to you.

• Snapshots take place on the Standby instance in a Multi-AZ deployment but takes place on the primary instance in a single AZ deployment.

Manual Snapshots

• Does not expire
• It exists beyond the lifetime of the RDS instance
• So the user has to go in and clear them

Automated Backups

• They are cleaned up automatically
• The retention period is between 0 to 35 days
• In addition to storing the backup, RDS also stores transaction logs which happens every 5 mins.
• Transaction logs store the actual data operations which causes changes within the database
• So can get a 5 mins RPO when using Automated backups
• You can restore an instance using the snapshot and transaction logs within that 35 days period.
• On deletion , you can choose to retain the backup, but I will still be expired based on the retention period or after the 35 days period.

rds

Read Replicas
• Provides both performance and availability improvements
• 5 direct read replicas per instance DB instance
• Replication is done asynchronously
• You can have Read replicas of Read Replicas but then, lag becomes a problem.
• Global performance improvements using Cross region read replicas.
• Snapshots/ Backups Improve RPO but RTOs are still a problem
• Restores of backups take time.
• Read replicas offer a near zero RTO
• Read replicas can be promoted immediately when the primary database fails.
• This happens only when the Primary database fails. READ ONLY UNTIL PROMOTED.
• Global availability improvements and resilience Cross region read replicas.

RDS Security
• Encryption is handled in 2 main ways
• Encryption handled by the RDS host
• Encryption handled by the DB engine; Transparent Data Encryption(TDE)
• Both can use KMS for Keys
• RDS Oracle and MySQL support TDE
• Oracle TDE supports integration CloudHSM

rds

Top comments (0)