AWS RDS Overview

Furkan Gulsen
3 min readSep 26, 2021
  • RDS stands for Relational Database Service
  • It’s managed DB service for DB use SQL as a query language
  • It allows you to create database in the cloud that are managed by AWS
    - Postgress
    - MySQL
    - Oracle
    - MariaDB
    - MSSQL
    - Aurora (AWS proprietary database)

Advantage over using RDS versus deploying DB on EC2

  • RDS is a managed service:
    - Automated provisioning, OS patching
    - Continuous backups and restore to specific timestamp
    - Monitoring dashboards
    - Read replicas for improved read performance
    - Multi AZ setup for DR (Disaster Recovery)
    - Maintenance windows for upgrades
    - Scaling capability (vertical and horizontal)
    - Storage backed by EBS
  • But you can’t SSH into your instances

RDS Backups

  • Backups are automatically enabled in RDS
  • Automated backups:
    -
    Daily full backup of the database
    - Transaction logs are backed-up by RDS every 5 minutes
    - ⇒ ability to restore to any point in time (from oldest backup to 5 minutes ago)
    - 7 days retention (can be increased to 35 days)
  • DB Snapshots:
    -
    Manually triggered by the user
    - Retention of backup fo as long as you want

RD - Storage Auto Scaling

  • Helps you increase storage on your RDS DB instance dynamically
  • When RDS detects you are running out of free database storage, it scales automatically
  • Avoid manually scaling your database storage
  • You have to set maximum Storage threshold (maximum limit for DB storage)
  • Automatically modify storage if:
    -
    Free storage is less than %10 of allocated storage
    - Low-storage lasts at least 5 minutes
    - 6 hours have passed since last modification
  • Useful for applications with unpredictable workloads
  • Supports all RDS database engines (MariaDB, MySQL, PostgreSQL, SQL Server, Oracle)

RDS Read Replicas for read scalability

  • Up to 5 Read Replicas
  • Within AZ, Cross AZ or Cross Region
  • Replication is ASYNC, so reads are eventually consistent
  • Replicas can be promoted to their own DB
  • Application must update the connection string to leverage read replicas

RDS Read Replicas — Use Cases

  • You have a production database that is taking on normal load
  • Ypu want to run a reporting application to run some analytics
  • Ypu create a Read Replica to run the new workload there
  • The production application is unaffected
  • Read replicas are used for SELECT (=red) only kind of statements (not INSERT, UPDATE, DELETE)

RDS Read Replicas — Network Cost

  • In AWS there’s a network cost when data goes from one AZ to another
  • For RDS Read Replicas within the same region, you don’t pay that fee

RDS Multi AZ (Disaster Recovery)

  • SYNC replication
  • One DNS same — automatic app failover to standby
  • Increase availability
  • Failover in case of loss of AZ, loss of network, instance or storage failure
  • No manual intervention in apps
  • Not used for scaling

Note: The Read Replicas be setup as Multi AZ for Disaster Recovery (DR)

RDS - From Single-AZ to Multi-AZ

  • Zero downtown operation (no need to stop DB)
  • Just click on “modify” for the database
  • The following happens internally:
    - A snapshot is taken
    - A new DB is restored from the snapshot in a new AZ
    - Synchronization is established between the two databases
Ultimate AWS Certified Developer Associate 2021 — NEW!
Ultimate AWS Certified Developer Associate 2021 — NEW!

I would recommend this course to anyone who wants to improve themselves in AWS and DevOps.

--

--

Furkan Gulsen

🧑‍💻 As a software engineer, I write about software, artificial intelligence, productivity, and everything I know