Amazon Relational Database Service (Amazon RDS) makes it easy to set up, operate and scale relational databases in the cloud. It provides cost-efficient and resizable capabilities while automating time-consuming administration tasks such as hardware provisioning, database setup, patching, and backup. It frees you up to focus on your applications so that you can provide them with the fast performance, high availability, security and compatibility they need.
Amazon RDS is available on multiple database instance types - optimized for memory, performance or I/O - and gives you six familiar database engines to choose from, including Amazon Aurora, PostgreSQL, MySQL, MariaDB, Oracle Database and SQL Server Huh. You can use the AWS Database Migration Service to migrate easily or replicate your existing databases to Amazon RDS.
Amazon Relational Database Service (Amazon RDS) is a collection of managed services that makes it simple to set up, operate, and scale databases in the cloud. Choose from seven popular engines — Amazon Aurora with MySQL compatibility, Amazon Aurora with PostgreSQL compatibility, MySQL, MariaDB, PostgreSQL, Oracle, and SQL Server — and deploy on-premises with Amazon RDS on AWS Outposts.
Databases store large amounts of data that applications can draw upon to help them perform various tasks. A relational database uses tables to store data and is called relational because it organizes data points with defined relationships.
Administrators control Amazon RDS with the AWS Management Console, Amazon RDS API calls, or the AWS command-line interface. They use these interfaces to deploy database instances to which users can apply specific settings.
Amazon provides several instance types with different resources, such as CPU, memory, storage options, and networking capability. Each type comes in a variety of sizes to suit the needs of different workloads.
RDS users can use AWS Identity and Access Management to define and set permissions to access RDS databases.
Amazon RDS features include the following:
Replication. RDS uses the replication feature to create read replicas, and these are read-only copies of the database instances that the application uses without changing the original production database. Administrators can also enable automatic failover across multiple availability zones through RDS multi-edge deployment and synchronous data replication.
A DB instance is an isolated database environment running in the cloud which can contain multiple user-created databases. It can be accessed using the same client tools and applications used to access a standalone database instance. But there is restriction on how many DB instances of what type you can have for a single customer account. The below diagram illustrates the different combinations based on the type of license you opt for.
Each DB instance is identified by a customer supplied name called DB instance identifier. It is unique for the customer for a given AWS region.
Depending on the need of the processing power and memory requirement, there is a variety of instance classes offered by AWS for the RDS service.
Standard
1 to 64
1.7 to 256
450 to 10000
Memory Optimized
2 to 128
17.1 to 3904
500 to 14000
Burstable Performance
1 to 8
1 to 32
Low to Moderate
When there is a need of more processing power than memory requirement you can choose the standard instance class with a higher number of virtual CPUs. But in the case of very high memory requirement you can choose Memory optimized class with appropriate number of VCPUs. Choosing a correct class not only impacts the speed of the processing but also the cost of using service. The burstable performance class is needed when you have a minimal processing requirement and the data size in not in peta bytes.
The DB Instance status indicates the health of the DB. It’s value can be seen from the AWS console or using AWS CLI command describe-db-instances. The important status values of DB instances and their meaning is described below.
Creating
The instance is being created. The instance is inaccessible while it is being created.
No
Deleting
The instance is being deleted.
No
Failed
The instance has failed and Amazon RDS can't recover it.
No
Available
The instance is healthy and available.
Yes
Backing-up
The instance is currently being backed up.
Yes
The RDS instances use Amazon Block Storage (EBS) volumes for storing data and log. These storage types can dynamically increase their size as and when needed. But based on the database workloads and price associated with these storage types we can customize the storage need. Following are the factors to be analysed while deciding on the storage types.
IOPS – It represents the number of Input Output operations performed per second. Both read and write operations are summed up for finding the IOPS value. AWS creates a report of IOPS value for every 1 minute. It can have value from 0 to tens of thousands per second.
Latency – It is the number of milliseconds elapsed between the initiation of an I/O request and the completion of the I/O request. A bigger latency indicates a slower performance.
Throughput – The number of bytes transferred to and from the disk every second. AWS reports the read and write throughput separately for every 1-minute interval.
Queue Depth – It is the number of I/O requests waiting in the queue before they can reach the disk. AWS reports the queue depth for every 1-minute interval. Also a higher queue-depth indicates a slower storage performance.
Based on the above considerations, the aws storage types are as below.
This is a cost-effective storage that is useful in most of the common database tasks. It can provide 3000 IOPS for a 1- TiB volume. In a 3.34 TiB size the performance can go up to 10000 IOPS.
Each GB of storage allows 3 IOPs as a base line performance. Which mean a 100 GB volume can provide 300 IOPs. But there may be scenario when you need more IOPS. In such scenario you need to use some IO credit balance which is offered when the storage is initialized. It is 5.4 million IO credits which can be used when a burstable performance need arises. On the other hand when you use less IOPS than the baseline performance, you accumulate the credits which can be used in future requirement of burstable performances.
Below is a equation which shows the relation between burst duration and Credit balance.
If your DB needs frequent and long duration burstable performance, then the next storage type will be a better choice.
This is a type of storage system that gives sustained higher performance and consistently low latency which is most suitable for OLTP workloads.
When creating the DB instance, you specify the required IOPS rate and volume size for such storage. Below is a chart which is used for reference for deciding about the IOPS and storage needed under provisioned storage.
MariaDB
1000 to 40000
100 GB to 16 TB
SQL Server
1000 to 32000
20GB to 16 TB
MySQL / Oracle/ PostgreSQL
1000 to 40000
100GB to 16 TB
This is a very old storage technology which is maintained by aws, only for backward compatibility. Its features are very limited which are the following.
Does not support Elastic Volumes
Limited to maximum size of 4 TB
Limited to maximum of 1000 IOPS