Relational Database Service
- Published on
- Reading time
- 3 min read
Overview
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.
MySQL
PostgreSQL
MariaDB
Oracle Database
Microsoft SQL Server
Amazon Aurora
Amazon Aurora
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:
General Purpose
- Balances performance and affordability
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
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
Burstable-performance
- General database that optimizes for occasional spikes in demand
- Can have greater cost-savings
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:
Provisioned IOPS SSD
General SSD
Magnetic (Legacy)