top of page

Using Amazon RDS to Help A Client Achieve Higher Database Performance and Availability

In Today’s Article:

🙍Client’s Key Challenges

🤔Why Amazon RDS?

✍️Create User Requirements

☁️Architectural Design

⚒️Implementation:

📝Step 1: Migrate the database to AWS cloud 

📝Step 2: Create an RDS instance with Multi-AZ deployment 

📝Step 3: Configure a read replica

💯Results and Benefits

🤔Reflections & Lessons



Hi friends, welcome 😃

This week’s lab challenge plunged me into the world of databases. Today we’ll take a peek into cloud database services, specifically, Amazon RDS. I’ll walk you through my client’s challenges, the solution I implemented and key takeaways from doing this project. Let’s dive in!🚀



🙍Client’s Key Challenges

My client runs an insurance company whose core operations run on an on-premises MySQL database server. However, he struggles with setting up, scaling and configuring his databases. Additionally, he is worried that if one part of his database fails, everything could go down.


Here is what he expressed:

"...however, managing and scaling this database infrastructure has become increasingly challenging. Setting up and maintaining our databases on physical servers is time consuming and resource-intensive, hindering our ability to focus on innovation… We require a solution to prevent the database from becoming a single point of failure and need read replicas to offload read-only transactions. Could you please help us to find a solution to manage our MySQL infrastructure?"


✍️Create User Requirements

From the conversation with my client, I determined my client needs his MySQL database infrastructure to:

  • Be easy-to-manage with less operational overhead.

  • Simplify scaling.

  • Be easy to set up without relying on physical servers.

  • Easy to use 

  • Eliminate a single point of failure

  • Support read replicas to offload read-only transactions. 



🤔Why Amazon RDS?

Amazon RDS was a perfect solution for my client due to its diverse range of capabilities. Besides supporting MySQL engines, here are other features of RDS that directly addressed my client’s challenges: 

  • Fully managed— RDS is a fully managed service. This means that AWS takes care of operational tasks like software patching, configuration, deployment and backing up allowing users to spend more time on innovation. 

  • Automated backups— RDS automatically backs up transaction logs and databases in an S3 bucket for a user-specified time. Snapshots of your database are also stored in S3 until you explicitly delete them. This feature allows one to easily restore their database. 

  • Easy to use— provisioning and deploying an RDS instance is simple. One needs to only specify details like the database engine, storage capacity, etc. with just a few clicks.

  • Read replicas— RDS provides up to 15 read replicas per primary database for many of its engines. This not only helps with scaling, but also provides a way to increase database performance by offloading read-heavy transactions. 

  • High availability— RDS allows one to create a standby instance in a different availability zone from the primary database. If the primary database fails, a standby copy helps with disaster recovery as it can be flawlessly promoted to serve as the primary database.  



☁️Architectural Design

I designed the following architecture to meet my client’s needs.

Architectural design
Architectural design

  1. Database migration to the cloud: AWS Database Migration Service can be used to move databases from on-premises locations to AWS cloud seamlessly and quickly.

  2. Write operations: the primary database mainly processes write transactions.

  3. Read operations: the read replica offloads read transactions from the primary database increasing the overall performance of the database infrastructure.

  4. Disaster recovery: in case the primary database fails, the standby instance will be promoted to be the primary database with no manual intervention required.

  5. Resume read/write operations: once the standby copy has assumed the role of the primary database, database processes can resume as normal.



⚒️Implementation

📝Step 1: Migrate the database to AWS cloud 

Since my client did not want to deal with on-premises database servers anymore, I suggested using AWS Database Migration Service(DMS). DMS is a managed AWS service that migrates databases to AWS cloud with minimal downtime. When migrating databases, it continuously replicates databases by keeping the source and target databases in sync. This allows one to switch to the new database with minimal downtime.


Requirements met: Be easy to set up without relying on physical servers.


📝Step 2: Create an RDS instance with Multi-AZ deployment

As my next step, I created an RDS instance from the Management Console. I configured the instance to include a standby copy located in a different availability zone from its primary database. 

Create a standby instance in another Availability Zone
Create a standby instance in another Availability Zone

How this helps: creating a standby instance provides a failover strategy. If the primary one RDS instance fails, this can be promoted to be the new primary instance with little to no downtime. Additionally deploying the two databases in different availability zones ensures at least one of them remains operational if a disaster strikes in either one of the availability zones. 


The image below shows the outcome of successfully creating an RDS instance and its standby, 

Created RDS instance
Created RDS instance

Requirements met: 

  • Easy to use

  • Be easy-to-manage with less operational overhead

  • Eliminate a single point of failure


📝Step 3: Configure a read replica

Next, I created a read replica from the existing primary database. On the RDS console, I selected the Databases option from the left navigation pane. This shows me all the existing databases, which in our case is the primary database. I then proceeded to create a read replica from the Actions menu. I included the same configurations for the read replica as I did the primary database, except creating a standby copy of it.


How this helps:  a read replica offloads read operations from the primary database and handles read-only queries, leaving the primary database to handle write operations. This means database transactions can be executed faster, especially for read-heavy operations. Ultimately, this improves the performance of a database. 

Read replica instance for read-heavy transactions.
Read replica instance for read-heavy transactions.

Requirements met:

  • Easy to use

  • Be easy-to-manage with less operational overhead

  • Simplify scaling.

  • Support read replicas to offload read-only transactions.



✨Results and Benefits

Below are potential quantifiable outcomes that could come from implementing the approach discussed here for my client.

  • 99,99% uptime due to multi-AZ failover, ensuring the database remains available even if the primary database instance fails. 

  • Up to 2x faster read queries  because read replicas handle read queries separately.

  • Better response time since application will experience lower latency due to read replicas. 

  • Up to 50% data migration compared to manual database migration.



🤔Reflections & Lessons & Challenges

Doing this lab challenge taught me some valuable lessons, some of which are:

  • Need for scaling strategy: while the architecture supports high availability, integrating AWS Auto Scaling for the database layer would optimize resource usage and optimize cost.

  • Balancing cost and performance: using on-demand instances vs. reserved instances and optimizing storage provisioning are key considerations. 

  • Fine-tuning read replica strategy: while read-replicas improve performance, determining the right number is necessary to avoid unnecessary costs. 

  • Challenges with lab environment: I couldn’t fully utilize AWS DMS to migrate my client’s database due to lab restrictions. 



In this lab challenge, I explored how Amazon RDS can transform a client’s database infrastructure by enhancing availability, performance, and ease of management. Through Multi-AZ deployment, read replicas, and automated backups via a standby copy, I provided a scalable and resilient solution tailored to my client’s needs. 


Have you used any cloud database services for your business/organization? Tell me more about that in the comments below.


Well, friends, until next time—toodooloos! 😊


 
 
 

Comments


bottom of page