Bharathi Batthula
5 min readAug 18, 2020

--

AWS: Amazon Aurora

Amazon Aurora is a part of the Amazon RDS family

It is fully managed relational database engine that compatible with MySQL and PostgreSQL

  • The code, tools, and applications you use today with your existing MySQL and PostgreSQL databases can be used with Aurora

Aurora can deliver up to 5 times the throughput of MySQL and up to 3 times the throughput of PostgreSQL, without requiring changes to most of your existing applications.

Its MySQL and PostgreSQL compatible database engines are customized to take advantage of the fast distributed storage.

The underlying storage grows automatically as needed, up to 64 TiB

An Amazon Aurora DB cluster consists of one or more DB instances and a cluster volume that manages the data for those DB instances.

The Aurora cluster volume is a virtual database storage volume that spans multiple Availability zone having 2 copies of the DB cluster data.

The Aurora cluster illustrates the separation of compute capacity and storage

  • An Aurora configuration with only a single DB instance is still a cluster
  • Since the underlying storage volume involves multiple storage nodes distributed across multiple Availability Zones.

Two types of DB instances make up an Aurora single Master DB cluster:

Primary DB instances

It supports read and write operations and performs all of the data modifications to the cluster volume.

Each Aurora DB cluster has one primary DB instance.

Aurora Replica

It connects to the same storage volume as the primary DB instance and supports only read operations

Each Aurora DB cluster can have up to 15 Aurora Replicas in addition to the primary DB instance

Maintain high availability by locating Aurora Replicas in separate Availability zones

Aurora automatically fails over to Aurora Replica in case the primary DB instance becomes unavailable.

  • You can specify the failover priority for Aurora Replicas.
  • Aurora Replicas can also offload read workloads from the primary DB instance.
  • Aurora automates and standardizes database clustering and replication,

_These are usually among the most challenging aspects of database administration and configuration.

Aurora features like automatic clustering, replication, and storage allocation make it cost effective and simple to set up, operate and scale large MySQL and Postgre SQL deployment.

Data can be migrated from Amazon RDS for MySQL and Amazon RDS for postgreSQL into Aurora to do this

  • Create RDS snapshot and restore it to Aurora, or by setting up one-way replication

Push-button migration tools can be used to convert existing Amazon RDS for MySQL and Amazon RDS for PostgreSQL application to Aurora.

Amazon Aurora Connection Management and Endpoints

When connecting to an Aurora cluster, the host name and port that specified point to an intermediate handler called an endpoint.

  • An endpoint is represented as an Aurora-specific URL that contains a host address and a port.

Aurora uses the endpoint mechanism to abstract these connections

  • Thus, hard coding all the host names or writing own logic for load balancing and rerouting connections when some DB instances arenot available is not required

Using endpoints, each connection can be mapped to the appropriate instance or group of instances based on the use case.

  • Connecting to whichever instance is the primary instance
  • Connecting to the reader endpoint, with Aurora automatically performing load balancing among all the Aurora replica
  • Connecting to custom endpoints associate with different subnets of DB instances
  • Connecting to a specific instance endpoint to examine details about a epcific DB instance.

The following types of endpoints are available from an Aurora DB cluster

Cluster endpoint:

A cluster endpoint for an Aurora DB cluster that connects to the current primary DB instance for that DB cluster.

  • This endpoint is the only one that can perform write operations.
  • The cluster endpoint is the one that needs to connect to when first setting up a cluster or when the cluster only contains a single DB instance.
  • This endpoint cant be changed, deleted or altered.

The cluster endpoint provides fail over support for read/write connections to the DB cluster.

If the current primary DB instance of a DB cluster fails. Aurora automatically fails over to anew primary DB instance.

During a fail over, the DB cluster continues to serve connection requests to the cluster endpoint from the new primary DB instance, with the minimal interruption of service.

Reader endpoint:

  • A reader endpoint for an Aurora DB cluster connects to one of the available Aurora Replica for that DB cluster.

Each Aurora DB cluster has only one reader endpoint. built in and whose name and attributed are manged by Aurora.

If there is more than one Aurora Replica, the reader endpoint directs each connection requests to one of the Aurora Replicas

Use the reader endpoint for read operations, such as queries.

It cant be used for write operations.

The reader endpoint provides loas balancing support for read-only connections to the DB cluster.

  • This type of endpoint, like the cluster endpoint, cant be created , deleted or modifies.
  • If the DB cluster contains only a primary DB instance, the reader endpoint serves connection requests from the primary DB instance.

Instance Endpoints

An instance endpoint connects to a specific DB instance within a Aurora cluster

  • Each DB instance in a DB cluster has its own unique instance endpoint.

The instance endpoint provides direct control connections to the DB cluster.

Custom Endpoints

A custom endpoint for an Aurora cluster represents a set of DB instances that you choose.

  • An Aurora DB cluster has no custom endpoint until you create one.

When you connect to the endpoint, Aurora performs load balancing and choose one of the instances in the group to handle the connection.

  • You define which instance this endpoint refers to, and you decide what purpose the endpoint serves.

You can create up to five custom endpoints for each provisioned Aurora cluster

You cant use custom endpoints for Aurora Server less clusters.

Thankyou,

Bharathi.

--

--

Bharathi Batthula

Bharathi is a self driven and purpose-oriented person.The main mission is to create profound change in her career. contact her on bharathi.batthula6@gmail.com