DEV Community

Le Huy Ho
Le Huy Ho

Posted on

Learning AWS - DVA - Day 10: Amazon RDS

Overview

  • RDS stands for Relational Database Service

  • It is a managed DB service for DB use SQL as a query language

  • It allows you to create databases in the cloud that are managed by AWS:

    • Postgres
    • MySQL
    • MariaDB
    • Oracle
    • Microsoft SQL Server
    • IBM DB2
    • Aurora (AWS Proprietary database)

Advantage over using RDS vs deploying DB on EC2

  • RDS is a managed service:

    • Automated provisioning, OS patching
    • Continuous backups and restore to specific timestamp (point-in-time restore)
    • Monitoring dashboards
    • Read replicas for improved read performance
    • Multi AZ setup for Disaster Recovery
    • Maintenance windows for upgrades
    • Scaling capability (vertical and horizontal)
    • Storage backed by EBS
  • BUT you CAN NOT SSH into your instance


Storage Auto Scaling

  • Help 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 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


RDS Read Replicas vs Multi AZ

RDS Read Replicas for read scalability

  • Up to 15 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 connection string to leverage read replicas

RDS read replicas

RDS Read Replicas - Use Cases

  • You have a production database that is taking on normal workload

  • You want to run a reporting application to run some analytics

  • You create a Read Replica to run the new workload there

  • The production application is unaffected

  • Read Replicas are used for SELECT (=read) only kind of statements (not INSERT, UPDATE, DELETE)

RDS Read Replicas - Network Cost

  • In AWS there is a network cost when data goes from one AZ to another

  • BUT For RDS Read Replicas within the same region, you don't pay that fee

RDS read replicas network cost

RDS Multi AZ (Disaster Recovery)

  • SYNC replication

  • One DNS name - automatic app failover to standby

  • Increase availability

  • Failover in case of loss AZ, loss of network, instance or storage failure

  • No manual intervention in apps

  • Not used for scaling


*What I noted: *

  • Increase read workloads -> Read Replicas. Increase High Availability and disaster recovery -> Multi AZ

  • Read Replicas is ASYNC replication (read eventually consistent). Multi AZ is SYNC replication.

  • Read Replicas (manual). Multi AZ (automatically)

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read full post →

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more