Emulate Oracle RAC workloads using custom endpoints in Aurora PostgreSQL - AWS Prescriptive Guidance

Emulate Oracle RAC workloads using custom endpoints in Aurora PostgreSQL

Created by HariKrishna Boorgadda (AWS)

Environment: PoC or pilot

Source: Databases: Relational

Target: Aurora PostgreSQL

R Type: Replatform

Workload: Oracle

Technologies: Databases; Migration

AWS services: Amazon Aurora; Amazon CloudWatch

Summary

This pattern describes how to emulate services in an Oracle Real Application Clusters (Oracle RAC) workload by using Amazon Aurora PostgreSQL-Compatible Edition with custom endpoints that distribute workloads across instances within a single cluster. The pattern shows you how to create custom endpoints for Amazon Aurora databases. Custom endpoints enable you to distribute and load balance workloads across different sets of DB instances in your Aurora cluster.

In an Oracle RAC environment, services can span one or more instances and facilitate workload balancing based on transaction performance. Service features include end-to-end unattended recovery, rolling changes by workload, and full location transparency. You can use this pattern to emulate some of these features. For example, you can emulate the ability to route connections for reporting applications.

Prerequisites and limitations

Prerequisites

Limitations

Architecture

Source technology stack

  • A three-node Oracle RAC database

Target technology stack

  • An Aurora PostgreSQL-Compatible database with two read replicas

Source architecture

The following diagram shows the architecture of a three-node Oracle RAC database.

Architecture of a three-node Oracle RAC database.

Target architecture

The following diagram shows the architecture of an Aurora PostgreSQL-Compatible database with two read replicas. Three different applications/services are using custom endpoints, which serve different application users and redirect the traffic and load between primary and read replicas.

Emulating services in an Oracle RAC by using custom endpoints in Aurora.

Tools

Epics

TaskDescriptionSkills required

Create a cluster.

To create the cluster, see Creating a DB cluster and connecting to a database on an Aurora PostgreSQL DB cluster in the Amazon RDS documentation.

AWS administrator

Create a custom parameter group for the workload.

To create a parameter group, see Creating a DB cluster parameter group in the Amazon RDS documentation.

AWS administrator

Create event notifications and alarms.

You can use event notifications and Amazon CloudWatch alarms to notify you when the cluster changes state and to capture metrics when a predefined threshold is met.

To create a CloudWatch alarm, see Create a CloudWatch alarm based on a static threshold in the CloudWatch documentation.

To create an event notification, see Creating a CloudWatch Events Rule That Triggers on an Event in the CloudWatch documentation.

AWS administrator
TaskDescriptionSkills required

Add the read replicas to the cluster.

  1. Create a read replica.

  2. Add the read replica to the same Availability Zone that your DB cluster is in. Note: You can use a different Availability Zone if you have requirements that must be met for your failover node.

AWS administrator

Note the read replica endpoint.

Document your read replica endpoint for later use in creating the custom endpoints.

AWS administrator
TaskDescriptionSkills required

Enter a name for the custom endpoint.

For each endpoint that you require, create a unique endpoint name related to your workload or application.

AWS administrator

Add the endpoint members.

Add your read replica endpoints to a custom group. For more information, see Editing a custom endpoint in the Amazon RDS documentation.

AWS administrator

(Optional) Add future instances to the cluster.

If you want to add more replicas or endpoints to the custom group, see Adding Aurora Replicas to a DB cluster in the Amazon RDS documentation.

AWS administrator

Create the endpoint.

To create the endpoint, see Creating a custom endpoint in the Amazon RDS documentation.

AWS administrator
TaskDescriptionSkills required

Share the custom endpoint details with the application that points to your workload.

Add your custom endpoint details to the database connection details in the reporting application that you plan to test.

AWS administrator

Connect the workload by using the custom endpoint.

Validate the custom endpoint details in the reporting application.

AWS administrator

Check the connection details from the database.

  1. Test the user name and connection count for your application.

  2. Check the load balancing across your workloads to make sure the connections are distributed across different custom endpoints (primary and read replicas).

AWS administrator

Related resources