Understanding Amazon RDS to explain to a 5-year-old.
Tags: aws, database, cloud, writing
Published: 2022-10-26 00:27:12

Amazon Relational Database Service is a distributed and managed SQL database service that simplifies the set-up, operation, and scaling of relational databases in the cloud. It uses features that consider hardware provisioning, database set-up, patching and backing up database software while being cost-effective, highly scalable, secure, compatible, and swift. Note that Amazon RDS itself is not a database: it is a service used to manage relational databases.

And hurrah! RDS is 13 today, being one of the Saas products of Amazon that functions across many operating systems.

By default, Amazon RDS has six database engines; Aurora, PostgreSQL, MySQL, MariaDB, Oracle, and MS-SQL Server. It makes it easy for the client to choose if they should stick to the default engines or use their preferred choice.

### Features of RDS

- **Read Replicas:** A read replica is a reflection of changes made to an original instance in real time. RDS uses this feature to create read-only models of database instances without changing the master production database. This is useful in performance metrics and monitoring because an instance of the database is created, which shows the state of that instance at the said time. Instances use the local, serial replication functionality of their respective database engines. According to this, the read replica will only be used by an Aurora instance if its master database was created using an Aurora database. Instances are helpful for read scaling even though they don't come with backups enabled by default. Read replicas do not support replication at the database level.


- **Multi-AZ Deployment:** Multi-AZ stands for Multi-Availability Zone Deployment. Users can automatically maintain the physical standby replica no matter where they are thanks to Multi-AZ deployment. However, the database engine in use will determine the geographical location of the standby instance. The user is prompted to choose whether they would like to use a Multi-AZ instance when they create an RDS instance. This is beneficial since the standby instance performs a backup to avoid the scenario of halted input and output. In the second scenario, where there are numerous outages, Amazon RDS swiftly transitions to the latest standby instance, enabling operations to continue without interruption.
Multi-AZ Deployment aims at providing improved accessibility and data endurance for database engine instances. The instances of this feature have an associated cost with them.


- **Costs:** RDS instances are billed hourly, just like Amazon EC2. They come in two packages: On-Demand DB Instances and Reserved DB Instances. On-Demand DB Instances are debited at a rolling hourly rate. Reserved DB Instances require a one-time upfront payment, which gives you a discount on the hourly usage charges for that instance.
In addition, users are taxed for the amount of storage supplied. RDS supports three types:
General purpose SSD (which is the default choice for Amazon), Provisioned IOPS (used for intensive workloads), and Magnetic storage (which is the lowest cost option). IOPS is the most expensive storage option because the user has to define how many input/output
operations per second are required by their application.
The good news for every new AWS client is that they can begin with managed database service in the cloud for free as part of the AWS Free Tier; either for the purpose of developing new applications, testing existing ones, or just gaining hands-on experience with RDS.


- Backup: RDS provides automated instance backups with transaction logs for retrieval. This goes back to stating that computerized backups are performed in the standby instance, ensuring that the likelihood of any losses occurring is extremely low. Backup also allows users to manually take snapshots of instances, where the first snapshot of a database instance contains the data of the complete database instance. As long as they are not manually destroyed, these snapshots are preserved. Users can select a maximum retention period of 35 days during the backup process and restore databases at any moment within that time. RDS also gives users the option to define the length of the backup process and the retention period for backups and snapshots.


- Monitoring and Performance metrics: The enhanced monitoring feature provides an expanded set of metrics for database engines that lets users view the capacity and input/output metrics from the AWS Management Console or the Amazon CloudWatch API.

Below is a visual demonstrating how features of RDS function.

![Overall Functioning of Amazon RDS](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f9i8u6lvcjmqg1c50hbf.jpg)

When she overheard you discussing the Amazon Relational Database Service with a coworker, your five-year-old Emma became inquisitive and wondered what it was all about. Just remember that she has no understanding of what a relational database is. Since you would not want her to be perplexed, you must satisfy her curiosity. However, your kitchen has a fridge with a lot of contents in it. You inspire her to generate an odd mental image.

"There are several parts in the refrigerator that is in the kitchen. If a section must contain more than one kind of item, they are organized systematically, with one kind of vegetable on one side and the other kind on the other. The refrigerator is a relational database since it comprises compartments with things of various types that may or may not be related to one another. But as time goes on, your fridge becomes empty. You want to increase the number of things, but you do not want to reshuffle the sections you have created.

"Therefore, on Sunday, we go grocery shopping. We buy everything, including tomatoes, jam, carrots, spinach, Halloween pumpkins, eggs, and water. You organize each item so that it is in its proper location when we get home—carrots, jam, lettuce, and aubergines all in the appropriate portions. You become an Amazon RDS by doing that. When you take something out of the refrigerator, you take care of the contents. You make a mental note to get rid of the items that are rotting and add those that are rapidly getting exhausted. You are maintaining your refrigerator, keeping an eye on its contents, and determining which item is running low on supplies. You have changed to Amazon Relational Database Service from Emma."