Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Best proxy solution for managing 500+ Cloud Run services?

Hey everyone, looking for advice!

Let’s say I have a ton of Cloud Run services (around 500+), and I’m trying to set up a proxy to manage domain and subdomain routing for all of them. Initially, I tried using Nginx Reverse Proxy Manager, but it doesn’t seem to scale well for something this big.

What’s the best proxy solution or infrastructure setup for handling this kind of scale? Something that’s efficient, scalable, and won’t choke with so many services.

Any recommendations? 🙏

0 1 448
1 REPLY 1

Hi @lianstemp,

Welcome to Google Cloud Community!

I would recommend using Google Cloud External Application Load Balancer: ideal for routing HTTP/HTTPS traffic based on hostnames (domains/subdomains).

Set up DNS records for your domain and subdomains and configure URL maps in the load balancer to forward traffic to Cloud Run services based on the host (subdomain) or path. You can set up a wildcard DNS that directs traffic to the load balancer, and then use URL maps to route traffic to the correct service based on subdomains, which gives you the flexibility to manage multiple services with minimal manual configuration.

Use a URL mask

When creating a serverless NEG, instead of selecting a specific Cloud Run service, you can use a URL mask to point to multiple services serving at the same domain. A URL mask is a template of your URL schema. The serverless NEG will use this template to extract the service name from the incoming request's URL and map the request to the appropriate service.

URL masks are particularly useful if your service is mapped to a custom domain rather than the default address that Google Cloud provides for the deployed service. A URL mask allows you to target multiple services and versions with a single rule even when your application is using a custom URL pattern.

You may also check Application load balancer use cases for multiple cloud run services.

Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.