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.

Note:
VPC peering is available only with Flexible or Annual subscriptions. It is not supported for Fixed or Free subscriptions.

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:

  1. Configure and initiate VPC peering for your Redis Cloud subscription.

  2. Approve the VPC peering request.

  3. Update the routes tables.

Configure VPC peering

To set up VPC peering:

  1. From the Redis Cloud console, select the Subscriptions menu and then select your subscription from the list.

  2. Select Connectivity > VPC Peering.

  3. Select Add peering.

  4. 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)
  5. 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:

    1. Select Add CIDR.

    2. Enter additional CIDR-formatted IP address in the box:

      Select the Add CIDR button to add another VPC CIDR.
  6. Select Initiate peering.

  7. Note the Peering ID of the VPC peering request.

    View VPC peering list.

Approve VPC peering request

After you set up and intitiate VPC peering, you need to approve the VPC peering request:

  1. Follow the AWS guide to accept the VPC peering connection.

  2. 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.

Modify Route Table.

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:

  1. 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.

  2. 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.

Note:
If you’ve enabled the database’s CIDR allow list, you must also add the VPC peered IP addresses to the CIDR allow list to connect to the database via the private endpoint.

Google Cloud VPC peering

If you want to peer a Redis Cloud VPC with a Google Cloud VPC, you need to:

  1. Configure and initiate VPC peering for your Redis Cloud subscription.

  2. Approve the VPC peering request.

Configure VPC peering

To set up VPC peering:

  1. Select Subscriptions from the Redis Cloud console menu and then select your subscription from the list.

  2. Select Connectivity > VPC Peering.

  3. Select Add peering.

  4. 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)
  5. Copy the Google cloud command after you enter the other VPC peering settings. You need this command to accept the peering request later:

    The Initiate peering button creates a VPC peering request.
  6. Select Initiate peering.

  7. Note the Cloud peering ID of the VPC peering request.

    View VPC peering list.

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.

Note:
If you’ve enabled the database’s CIDR allow list, you must also add the VPC peered IP addresses to the CIDR allow list to connect to the database via the private endpoint.