Jakube
Jakube

Reputation: 3565

Mirror requests between Cloud Run revisions

Is it possible to mirror the traffic of one Cloud Run revision onto another?

We have a running Cloud Run service (one revision with 100% traffic), and we want to evaluate a change of in our algorithm, without actually deploying it to production. It would be ideal, if we can just deploy a second revision (with 0% traffic, but with a revision URL) and mirror all incoming requests onto this URL.

I've seen, that you can mirror traffic using an Internal HTTP(S) Load Balancer (https://cloud.google.com/load-balancing/docs/l7-internal/setting-up-traffic-management#multiple_allowed_in_a_url_map ). However, as far as I understand, I can't use an Internal HTTP(S) Load Balancer for Cloud Run, but only for VMs (Compute Engine).

For the serverless NEGs, it's possible to create External HTTP(S) Load Balancer, but those don't support this feature.

Am I understand it correctly, that it's not possible to mirror the traffic of Cloud Run with load balancers? Are there any other solutions? Or do we need need to deploy our own load balancer (e.g. Nginx), and define our mirroring strategy there?

Upvotes: 2

Views: 616

Answers (1)

guillaume blaquiere
guillaume blaquiere

Reputation: 75755

AFAIK, you can't mirror the request. you need, as you said, to deploy a proxy that split the traffic.

You can use another CLoud Run in front of your target service and then duplicate the request to the service tags. Nginx is an option, you can deploy it on Cloud Run for example.

Upvotes: 2

Related Questions