Search code examples
google-cloud-platformgoogle-cloud-load-balancer

Are there alternative options for suffix DNS wildcards in routing rules?


I'm trying to create a load balancer that can route traffic to subdomains (login...) for multiple higher-ordered (...mytenant1.com) domains to individual backends.

So say for example:

login.mytenant1.com
login.topic.mytenant2.net

Unfortunately, when I go to create a path rule with a hostname like login.*, I get an error.

screenshot of validation error

Google cloud quotas for routing rules makes me think that I'm limited to 50, which is definitely too low as I have around five subdomains like this to configure per tenant.

What could be an economical way for me to set this up without having to create a load balancer for every single tenant?


Solution

  • In a host rule, the hostname must be a fully qualified domain name (FQDN). The hostname can't be an IPv4 or IPv6 address. Suffix wildcard is not supported at the moment.

    Here are the examples that should work:

    • Works: example.com
    • Works: web.example.com
    • Works: *.example.com
    • Doesn't work: 35.244.221.250

    Additionally,  Host rules, path matchers per URL map and Hosts per host rule are limited to 50 only if you are using Global external Application Load Balancer and Regional external Application Load Balancer. I suggest that you go with Classic Application Load Balancer which has a limit of 1000