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. Select Subscriptions from the admin console menu and then select your subscription from the list.

  2. Select the Connectivity tab and then VPC Peering.

  3. Select the Add peering button:

    The Add peering button lets you set up VPC peering.
  4. Enter VPC peering details:

    Setting name 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 the Add CIDR button:

      Select the Add CIDR button to add another VPC CIDR.
    2. Enter the additional CIDR-formatted IP address in the box:

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

    The Initiate peering button creates a VPC peering request.
  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.

Update route tables

To finish VPC peering setup, update your route tables for the peering connection 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.

GCP VPC peering

If you want to peer a Redis Cloud VPC with a GCP 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 admin console menu and then select your subscription from the list.

  2. Select the Connectivity tab and then select VPC Peering.

  3. Select the Add peering button:

    The Add peering button lets you set up VPC peering.
  4. Enter the VPC peering details:

    Setting name Description
    Project ID GCP project ID (see Identifying projects)
    Network name GCP 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 the Initiate peering button:

    The Initiate peering button creates a VPC peering request.
  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 GCP, 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.