After discussions with technical folks who know GCP VPC and GCP Memorystore very well, it seems that there is no way to have transitive peering using VPC Peering. A solution was suggested that, for my use case, worked well. With respect to the original story, we created a new Compute Engine in the vpc-1
VPC which has access to Redis. On that Compute Engine we installed the open source package called nutcracker which provides a Redis proxy. What this means is that a Redis client request sent to this Compute Engine is proxied to the real Redis server managed by Google through Memorystore. Since the Compute Engine is an ordinary compute resource in the vpc-1
VPC its internal IP address is reachable from other VPCs peered with vpc-1
(for example, in our story vpc-2
). The end result was that a Compute Engine created in vpc-2
could then target the Compute Engine running nutcracker
using the Redis protocols. That Compute Engine then relayed the request to the real Redis server and all worked as desired.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…