Relational Database Service

Published on
Reading time
3 min read

Overview

RDS User Guide

Relational Database Service (RDS) allows relational databases to be deployed in the cloud in a server-based model. High availability can be achieved by deploying to multiple AZs or regions. Multiple AZ are facilitated directly by RDS such that data is replicated synchronously and failover is handled automatically. This means that when the health of the primary database is not great, then traffic can be directed to the other instances on standby.

Multiple Regions

This type of setup can be achieved multi-region but the drawbacks are that the data replication will be asynchronous and potentially slower, and the failovers must be handled manually. In general, the additional complexity of multi-region architecture are necessary when there are data-sovereignty requirements or needs to reduce latency to different geographical locations.

Database Configurations

Engines

Many database engines are supported, and AWS has there own called Aurora.

  1. MySQL

  2. PostgreSQL

  3. MariaDB

  4. Oracle Database

  5. Microsoft SQL Server

  6. Amazon Aurora

Amazon Aurora

Aurora User Guide

Aurora is AWS's own relational database engine. It can be used standalone or is compatible with MySQL and PostgreSQL. With the Aurora MySQL-compatible and PostgreSQL-compatible editions, performance can be greatly improved over the MySQL or PostgreSQL RDS engines. Some of the other benefits include automatic storage scaling, greater durability with replication across multiple AZs, faster backups to S3, and parallel query execution. Aurora can also reduce costs by reducing I/O operations through several means like self-healing storage, better caching of frequently accessed data, and by grouping logs in a log stream first instead of directly writing a single log to the disk each time.

Instances

When deploying a database instance, an instance class must be selected which determines the type and size. Like EC2 instances, there are several types with different optimizations:

  1. General Purpose

    • Balances performance and affordability
  2. Memory Optimized

    • Good for OLTP systems such as online banking, shopping or text messaging
    • More performant, more expensive
    • Used for in-memory database capabilities using a lot of caching
  3. Compute Optimized

    • Optimized to handle complex queries for faster processing
    • Good for game servers or any application that needs fast real-time processing and reduced latency
  4. Burstable-performance

    • General database that optimizes for occasional spikes in demand
    • Can have greater cost-savings
  5. Optimized Reads

    • Good for read-heavy applications like a search engine or real-time analytics

Storage

Block storage volumes can be attached to running instances to provide room to grow and a place to store manual snapshots or logs. There are three types available:

  1. Provisioned IOPS SSD

  2. General SSD

  3. Magnetic (Legacy)