×
Community Blog Simplifies Network Connection Redis & PostgreSQL in Different VPCs Using PrivateLink

Simplifies Network Connection Redis & PostgreSQL in Different VPCs Using PrivateLink

This article describes how to use PrivateLink to simplify network connections between Redis® and PostgreSQL databases located in different VPCs.

Written by Muchlis Insani, Solution Architect Alibaba Cloud Indonesia

Step 1: Create ALB/NLB/CLB

1. ALB
Create Instance
Add Listener of Redis/PostgreSQL

2. NLB
Create Instance
Add Listener of Redis/PostgreSQL

3. CLB
Create Instance
Add Listener of Redis/PostgreSQL

Notes:

  • If PrivateLink only required communication between services, we recommend to select Intranet on the Network Type section
  • Make sure SLB created in the same Zone as Redis®/PostgreSQL
  • Add listener for each Redis®/PostgreSQL instances
  • Make sure SLB deployed in multiple-zones

Step 2: Create Endpoint Service

1

a) Select either ALB/NLB/CLB instance created previously

b) Select more than 1 Zone for high-availability connection

c) If Automatically Accept Endpoint set to No you need manually accept the Endpoint connection

d) If Enable Zone Affinity set to Yes it will resolve the domain name of the nearest endpoint that is associated with the endpoint service

Notes:

  • You can use same SLB for multiple Endpoint Service

Ref: https://www.alibabacloud.com/help/en/privatelink/user-guide/create-and-manage-endpoint-services

Step 3: Create Endpoint

2

a) Select Endpoint Type for Interface Endpoint if you want the interface endpoint allows the service consumer to access the service that is provided by the service provider

b) Select Endpoint Service ID created previously

c) Select the zone of the Endpoint Service and select a vSwitch in the zone

Notes:

  • VPC of the Endpoint need to be the same as the VPC for App
  • Make sure Security Group of the Endpoint allow port for Redis®/PostgreSQL

Step 4: Test Connection

a) Copy Domain Name of Endpoint Service

3
4

b) Test connection from App server to Redis® server with PING & REDIS-CLI

5

c) Test connection from App server to PostgreSQL server with PING & REDIS-CLI

6


*Redis is a registered trademark of Redis Ltd. Any rights therein are reserved to Redis Ltd. Any use by Alibaba Cloud is for referential purposes only and does not indicate any sponsorship, endorsement or affiliation between Redis and Alibaba Cloud.

0 1 0
Share on

Alibaba Cloud Indonesia

110 posts | 20 followers

You may also like

Comments