Overview
- Amazon Relational Database Service (Amazon RDS) is a web service that makes it easier to set up, operate, and scale a relational database in the AWS Cloud. It provides cost-efficient, resizable capacity for an industry-standard relational database and manages common database administration tasks
- Amazon RDS doesn't provide shell access to DB instances.
- Amazon RDS currently supports the MySQL, MariaDB, PostgreSQL, Oracle, and Microsoft SQL Server DB engines
- You can get high availability with a primary instance and a synchronous secondary instance that you can fail over to when problems occur.
- You can also use MariaDB, Microsoft SQL Server, MySQL, Oracle, and PostgreSQL read replicas to increase read scaling.
DB instances
- A DB instance is an isolated database environment in the AWS Cloud.
- Your DB instance can contain multiple user-created databases.
- Each DB instance runs a DB engine, each DB engine has a set of parameters in a DB parameter group that control the behavior of the databases that it manages.
- You can run your DB instance in several Availability Zones, an option called a Multi-AZ deployment. By launching instances in separate Availability Zones, you can protect your applications from the failure of a single location.
- When you choose this option, Amazon automatically provisions and maintains a secondary standby DB instance in a different Availability Zone.
- Your primary DB instance is synchronously replicated across Availability Zones to the secondary instance.
- A security group controls the access to a DB instance.
- Each DB instance has a DB instance identifier, the DB instance identifier must be unique for that customer in an AWS Region
- The identifier is used as part of the DNS hostname allocated to your instance by RDS.
- The DB instance class determines the computation and memory capacity of an Amazon RDS DB instance.
- Amazon RDS supports three types of instance classes: Standard, Memory Optimized, and Burstable Performance.
- Amazon RDS use Amazon Elastic Block Store (Amazon EBS) volumes for database and log storage
Instance Storage
- DB instance storage comes in three types: Magnetic, General Purpose (SSD), and Provisioned IOPS (PIOPS)
- General Purpose SSD – General Purpose SSD volumes offer cost-effective storage that is ideal for a broad range of workloads
- Baseline I/O performance for General Purpose SSD storage is 3 IOPS for each GiB, with a minimum of 100 IOPS.
- This relationship means that larger volumes have better performance.
- Volumes below 1 TiB in size also have ability to burst to 3,000 IOPS for extended periods of time. Burst is not relevant for volumes above 1 TiB. Instance I/O credit balance determines burst performance.
- Provisioned IOPS – Provisioned IOPS storage is designed to meet the needs of I/O-intensive workloads, particularly database workloads, that require low I/O latency and consistent I/O throughput.
- Provisioned IOPS storage is optimized for online transaction processing (OLTP) workloads that have consistent performance requirements.
- When you create a DB instance, you specify the IOPS rate and the size of the volume.
- The ratio of IOPS to allocated storage (in GiB) must be at least 0.5 (1.0 on RDS for SQL Server) and not more than 50
- For production OLTP use cases, we recommend that you use Multi-AZ deployments for enhanced fault tolerance with Provisioned IOPS storage for fast and predictable performance.
- You can also use Provisioned IOPS SSD storage with read replicas for MySQL, MariaDB or PostgreSQL.
- Magnetic – Amazon RDS also supports magnetic storage for backward compatibility.
- Doesn't allow you to scale storage when using the SQL Server database engine.
- Doesn't support storage autoscaling.
- Doesn't support elastic volumes.
- Limited to a maximum size of 3 TiB.
- Limited to a maximum of 1,000 IOPS.
- The following system-related activities consume I/O capacity and might reduce database instance performance while in progress:
- Multi-AZ standby creation
- Read replica creation
- Changing storage types
- Database workload might reduce database instance performance:
- The throughput limit of the underlying instance type is reached.
- Queue depth is consistently less than 1 because your application is not driving enough I/O operations.
- You experience query contention in the database even though some I/O capacity is unused.
Configuring an Amazon RDS DB instance
- You can configure a DB instance with an option group and a DB parameter group.
- An option group specifies features, called options, that are available for a particular Amazon RDS DB instance.
- A DB parameter group acts as a container for engine configuration values that are applied to one or more D