I have two cloud run instances A and B.
A and B make calls to each other.
Here is the network setup for A
And here is a network setup for B
The problem starts when I control the outbound of B
When I make B to "send traffic directly to a VPC" + "route only requests to private IPs to the VPC"
All the calls to A now takes about 2 minutes. I'm very confused because A calling B via VPC traffic works fine. Please let me know if I'm missing anything.
Hi @thisisfine,
Welcome to Google Cloud Community!
Based on your provided configuration, traffic routes to the internet during the call from B to A which caused the delay(possibly from the overall health/congestion of the internet network and hops(devices or servers the traffic passes through). It is recommended that you set Ingress Control on Cloud Run instance A to Internal, and then allow traffic from external Application Load Balancers:
This will require you to create Serverless NEGS and external load balancer which will provide a single address to point your serverless app to. Traffic to be distributed effectively and the service to run smoothly. See Set up a global external Application Load Balancer with Cloud Run
Note: Serverless NEGs allow you to use Google Cloud serverless apps with external Application Load Balancers. After you configure a load balancer with the serverless NEG backend, requests are routed to the serverless app backend.
For Cloud Run instance B, you can attach a VPC with the same configuration on Cloud Run Instance A. Traffic routing: route only requests to private IPs to the VPC. Directing network traffic to its intended destination.
I hope the above information is helpful.
Thank you very much for the suggestion. I will try this and let you know the outcome.