[AWS] RDS – Deployment & Backups

Using RDS, you are delegating most of the maintenance tasks to AWS. It is important to understand how you can make use of RDS features in order to utilize the service fully.

RDS reserved instances (RI)

Reserved instances (RI) let you reserve a DB instance for a specified period with a significant discount.

  • Each reserved instance is associated with a specific Region, which is fixed for the lifetime of the reservation and cannot be changed.
  • Each reservation can be used in any AZs within the associated region.
  • Reserved instances are available for Multi-AZ deployments.
  • Reserved instances can be used for read-replicas if they are in the same region.

RDS Backups and Snapshots

RDS is a managed service, and backups are automatically done by default.

Automated backups

  • RDS automated backup enables point-in-time recovery (PITR). Automated backups take a full daily snapshot and store transaction logs throughout the day.
  • Backups can be retained 0 ~ 35 days (retention period). The default retention period is 7 days.
  • Automated backups are enabled by default.
  • Backup data are stored in S3, and free storage space is allocated equally to the size of the provisioned database.

Database snapshots

  • Users can create snapshots manually and stored them in S3.
  • Manual snapshots are used for long-term backups. Snapshots exist even after the instance is deleted. Automated backups are deleted when the DB instance is deleted.

Features of Backups and Snapshots

  • For a single AZ RDS instance, I/O may be briefly suspended while the backup process initializes (typically a few seconds), and you may experience a brief period of elevated latency.
  • There is no I/O suspension for Multi-AZ DB deployments, since the backup is taken from the standby.
  • If an instance is encrypted, the backup snapshots are also encrypted.

Restoring RDS Backups

A restored RDS instance is different from the original instance. A restored instance has a new DNS endpoint (CNAME).

Point-in-time recovery (PITR) is the process of restoring a database to the state it was in at a specified date and time.

  • During the recovery, the most recent daily backup is restored, and then transaction logs are applied to the specific request time. This makes a point in time recovery down to seconds.

Snapshots can be copied to the same region or to a different region.

  • If you copy the encrypted snapshot to a different region, a new key needs to be created. (KMS is a regional service)

Leave a Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s