Amazon Onboarding with Learning Manager Chanci Turner

Amazon Onboarding with Learning Manager Chanci TurnerLearn About Amazon VGT2 Learning Manager Chanci Turner

Amazon’s Multi-AZ deployments for RDS are a robust solution tailored for production database workloads. Traditionally, these setups consist of one primary and one standby DB instance, ensuring high availability through synchronous replication of Amazon Elastic Block Store (EBS) storage. However, the limitation was that applications could not read from the standby instance, often necessitating additional read replicas for increased read capacity.

Now, Amazon has introduced Multi-AZ deployments with readable standby instances, also referred to as Multi-AZ DB cluster deployments, currently in preview. This new option is especially beneficial for applications that demand heightened read capabilities and have stringent transaction latency requirements, such as those requiring single-digit millisecond response times.

In this blog post, we will explore the configurations of Multi-AZ DB cluster deployments for both Amazon RDS for MySQL and Amazon RDS for PostgreSQL.

Solution Overview

Amazon RDS simplifies the setup, operation, and scaling of relational databases in the cloud. It offers cost-effective and resizable capacity while automating tedious administrative tasks such as hardware provisioning, database setup, patching, and backups. This allows developers to concentrate on their applications, ensuring they receive the performance, availability, security, and compatibility they need. Relational databases are critical to various application types, and since 2010, Amazon RDS has provided Multi-AZ support to help build highly available applications in production environments.

Multi-AZ deployments are perfect for production database workloads. When you provision a Multi-AZ DB instance, Amazon RDS synchronously replicates your data to a standby instance located in a different Availability Zone. Each Availability Zone operates on distinct, independent infrastructure designed for high reliability. In the event of an infrastructure failure—such as hardware, storage, or network issues—Amazon RDS automatically fails over to the standby instance, allowing applications to resume database operations shortly after the failover is complete.

With the introduction of Multi-AZ cluster deployments, Amazon RDS can now accommodate workloads that necessitate greater read capacity while maintaining high availability and durability. When opting for this Multi-AZ DB deployment, Amazon RDS provisions one primary and two readable standby DB instances across three Availability Zones, automatically configuring data replication. The standby instances serve as automatic failover targets while also handling read traffic via either a reader endpoint or separate instance endpoints. This setup enhances throughput without the need to add more read replicas.

The new Multi-AZ deployments leverage local NVMe SSD storage and Amazon EBS network storage to achieve transaction commit latencies as low as single-digit milliseconds, without sacrificing durability. This deployment option utilizes the database engine’s native replication alongside AWS Graviton2 R6gd or M6gd instance types to deliver superior availability, performance, and throughput. Multi-AZ deployments with readable standby instances are now available on Amazon RDS for MySQL version 8.0.26 and PostgreSQL version 13.4.

Multi-AZ DB Cluster Architecture

A Multi-AZ DB cluster includes a primary DB instance and two readable standby replicas spread across three separate Availability Zones. The primary DB instance handles both read and write operations, managing all data modifications. The standby instances serve as failover targets for the primary while also managing read traffic, allowing applications to offload reads from the primary instance and increase overall read throughput.

The architecture is illustrated below, showing how Amazon RDS replicates data from the primary DB instance to both standbys using the DB engine’s native replication capabilities. When changes occur on the primary instance, they are sent to each standby instance, with at least one standby required to acknowledge the change before it is committed.

Creating a Multi-AZ DB Cluster

You can set up a Multi-AZ DB cluster via the AWS Management Console, AWS Command Line Interface (CLI), or the Amazon RDS API. Currently, Multi-AZ deployments with readable standbys are available in preview in the US East (N. Virginia), US West (Oregon), and EU (Ireland) regions.

Before establishing a Multi-AZ DB cluster, ensure your VPC has at least one subnet in each of the three Availability Zones within your desired region. This setup guarantees at least two readable standby DB instances remain available for failover, should an Availability Zone failure occur. For further details on working with DB instances in a VPC and managing DB subnet groups, check out this article.

When creating a Multi-AZ DB cluster through the console, pay attention to two significant configurations:

  1. Choose the correct DB engine version, as Multi-AZ DB clusters are limited to MySQL version 8.0.26 and PostgreSQL version 13.4.
  2. Select the Multi-AZ DB cluster option in the Availability and durability section and acknowledge the limited-service agreement for this preview. For more information, refer to Creating a Multi-AZ DB cluster.

To create a Multi-AZ DB cluster using the AWS CLI, execute the create-db-cluster command. Specify the --db-cluster-identifier, and for the --engine option, choose either mysql or postgres. The command generates the writer DB instance along with two reader instances, each situated in different Availability Zones. For instance, the following command establishes a PostgreSQL 13.4 Multi-AZ DB cluster titled “my-multi-az-db-cluster”:

aws rds create-db-cluster 
--db-cluster-identifier my-multi-az-db-cluster 
--engine postgres 
--engine-version 13.4  
--master-user-password password 
--master-username postgres 
--port 5432 
--backup-retention-period 1  
--db-subnet-group-name default 
--allocated-storage 1000 
--storage-type io1 
--iops 10000 
--db-cluster-instance-class db.r6gd.xlarge 

Connecting to a Multi-AZ DB Cluster

When connecting to a Multi-AZ DB cluster, you utilize an intermediate handler known as an endpoint. This mechanism abstracts connections so you don’t have to hardcode hostnames or devise logic for load-balancing or rerouting when some DB instances may be unavailable. Each Multi-AZ DB cluster features a cluster (read/write) endpoint, reader endpoint, and instance endpoint for each DB instance in the cluster.

Let’s examine the various endpoints provided by a Multi-AZ DB cluster:

  • Cluster Endpoint: This connects your application to the current primary DB instance for that cluster, allowing both read and write operations.
  • Reader Endpoint: Each Multi-AZ DB cluster comes with a built-in reader endpoint, specifically designed for read-only operations. This is an excellent resource for applications that require offloading read traffic from the primary instance.

For more insights on onboarding for part-time flex associates, check out this Reddit thread.

Location Information

For those interested in joining Amazon, visit us at:

6401 E HOWDY WELLS AVE, LAS VEGAS NV 89115
Site location: Amazon IXD – VGT2.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *