Enable VPC peering
VPC peering uses private IP addresses to route traffic between a Redis Cloud VPC and an application VPC.
VPC peering uses private IP addresses to allow network connections between two virtual private clouds (VPCs).
You can connect your VPC in the Redis Cloud subscription to the VPC of your application. This lets your application connect securely to your Redis Cloud database using VPC peering to optimize the performance of your application.
VPC peering configuration requires you to initiate VPC peering on your Redis Cloud subscription and then accept the VPC peering request for the AWS VPC that you want to peer with.
AWS VPC peering
If you want to peer a Redis Cloud VPC with an AWS VPC, you need to:
-
Configure and initiate VPC peering for your Redis Cloud subscription.
Configure VPC peering
To set up VPC peering:
-
From the Redis Cloud console, select the Subscriptions menu and then select your subscription from the list.
-
Select Connectivity > VPC Peering.
-
Select Add peering.
-
Enter VPC peering details:
Setting Description Consumer AWS Account Your AWS account ID (see Finding your AWS account ID) Consumer region AWS VPC region Consumer VPC ID The VPC ID for the application that needs to access your Redis Cloud VPC (see Finding a VPC ID) Consumer VPC CIDRs CIDR-formatted IP addresses for the AWS VPC that needs to access your Redis Cloud VPC; must not overlap with the Redis producer VPC CIDR (see View your VPCs) -
You can provide up to five VPC CIDRs.
Note:The Redis Cloud Terraform provider currently supports one VPC CIDR. Additional CIDRs defined by the console will be removed by Terraform.To add multiple VPC CIDRs:
-
Select Initiate peering.
-
Note the Peering ID of the VPC peering request.
Approve VPC peering request
After you set up and intitiate VPC peering, you need to approve the VPC peering request:
-
Follow the AWS guide to accept the VPC peering connection.
-
After you accept the peering request, select Modify my route tables now. This button can be found in the green header once the peering connection is active.
Update route tables
To finish VPC peering setup, update your route tables for the peering connection. There may be many different route tables assigned to different VPCs. It is important to choose the route table assigned to the VPC you specified in the Configure VPC Peering section with the following details:
-
In the Destination field, enter the Requester VPC CIDRs shown when you accepted the peering request.
This is the Redis Cloud VPC CIDR address, to which your application's VPC connects.
-
In the Target field, select Peering Connection and select the relevant Peering ID.
Once VPC peering is established, we recommend switching your application connection string to the private endpoint.
Google Cloud VPC peering
If you want to peer a Redis Cloud VPC with a Google Cloud VPC, you need to:
-
Configure and initiate VPC peering for your Redis Cloud subscription.
Configure VPC peering
To set up VPC peering:
-
Select Subscriptions from the Redis Cloud console menu and then select your subscription from the list.
-
Select Connectivity > VPC Peering.
-
Select Add peering.
-
Enter the VPC peering details:
Setting name Description Project ID Google Cloud project ID (see Identifying projects) Network name Google Cloud VPC network you want to peer with (see View networks) -
Copy the Google cloud command after you enter the other VPC peering settings. You need this command to accept the peering request later:
-
Select Initiate peering.
-
Note the Cloud peering ID of the VPC peering request.
Approve VPC peering request
To approve the VPC peering request between Redis Cloud and Google Cloud, use the gcloud
CLI to run the Google cloud command that you copied before you initiated VPC peering.
Once VPC peering is established, we recommend switching your application connection string to the private endpoint.