AWS — Aurora DB Cluster

Adela Chao
3 min readJul 29, 2022

--

Amazon Aurora is a relational database management system (RDBMS) built for the cloud with full MySQL and PostgreSQL compatibility. It is a proprietary technology from AWS.

Here are some of its significant features:

  • Aurora get 5x performance improvements over MySQL on the RDS, 3x the performance of Postgres on RDS.
  • Aurora storage automatically grows : starts at 10 GB, and grows automatically up to 128 TB as amount of your data increases.
  • Aurora can have up to 15 replicas, while MySQL only has 5 replicas, and the replication process is faster : Aurora has low replica lag — typically < 10ms.
  • Fail-over in Aurora is instantaneous, much faster than a fail-over from multi AZ on MySQL or RDS.
  • Since Aurora is designed and built for cloud, so it support High-Availability by default.
  • In terms of cost, Aurora costs about 20% more than RDS.

High availability for Aurora data

Aurora data is stored in the cluster volume, which is a single, virtual volume consists of copies of the data across 3 Availability Zones in a single AWS Region.

Aurora automatically maintains 6 copies of your data across 3 Availability Zones, with a write set of 4 and a read set of 3.

That means, anytime when we write data into database, we will have 6 copies of data across 3 AZ :

  • 4 copies out of 6 for write
  • 3 copies out of 6 for read

Replication

Because the data is automatically replicated across AZ, your data is highly durable with less possibility of data loss.

This replication also ensures that your database is more available during a failover.

Storage auto-repair

Aurora automatically detects failures in the disk volumes that make up the cluster volume. When a segment of a disk volume fails, Aurora immediately repairs the segment.

When Aurora repairs the disk segment, it uses the data in the other volumes that make up the cluster volume to ensure that the data in the repaired segment is current.

Aurora Read Scaling

There is single master in Aurora to take writes, then you can have up to 15 read replicas, all serving reads.

Any of these read replicas can be promoted to become the master in case the master doesn’t work. The fail-over will happens in less than 30 seconds on average.

These read replicas supports cross region replication.

Aurora DB Cluster

An Aurora DB cluster consists of

  • one or more DB instances : One master and up to 15 read replicas.
  • a cluster volume that manages the data for those DB instances.

Writer endpoint

The master is the only instance that will write to the storage.

Since the master can change during fail-over, the client should connect to a writer point : a DNS name which always connects to the master.

So even if the master fails-over, the client still talks to the writer endpoint and is automatically redirected to the new master.

Reader endpoint

Since we can have up to 15 read replicas with auto-scaling, the client should connect to a reader point : a DNS name which connects automatically to all the read replicas.

When the client connects to the reader endpoint, it will be routed to one of the read replicas, with Aurora automatically performing connection load-balancing.

--

--

No responses yet