Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

App Engine standard dispatch.yaml 20 rules limit

I am facing an issue with the 20 limit dispatch.yaml rule

Currently I am using "client".mydomain.com which is easy to setup But I have some bigger clients who I want to put onto a separate service

My goal was the following,

  • Public website
  • Put 30-50 clients on service A using "client".mydomain.com
  • Put 1 client on service B using "client".mydomain.com
  • Put 20-30 clients on service C

But then using number 3 I need to be creative and use something like "client".2.mydomain.com. I would rather see also just "client".mydomain.com on service C

Now dispatch.yaml does have a 20 rule limit, so putting many clients on a separate service is not possible. Eventually I will run into the limit Anyone has any ideas on to fix this, or do this in another way.

I am open for any suggestions, I was thinking of putting up an nginx, but not each service has it's own ip, so that also not a possibility. Perhaps some new features or so ? I could also just setup different "similar" domain names and map those like mydomainapp.com appmydomain.com etc, but that would be a bit too much

Currently my dispatch.yaml looks like

dispatch:
  - url: "domain.com/*"
    service: default
  - url: "www.domain.com/*"
    service: default
  - url: "*.domain.com/*"
    service: myapp
  - url: "*/something"
    service: myapp
  - url: "*/*"
    service: default

So any ideas on how to make this working for everything so that I can use "client".domain.com for every

like image 580
cricque Avatar asked May 10 '26 04:05

cricque


1 Answers

For better routing you can make use of a Load Balancer in front of your App Engine services, and add App Engine as a NEG (Network Endpoint Group).

If you set up the Load Balancer and the NEG, you can then create a URL Map or even URL Masks to determine which service should be handling the request.

With that option you'll be also removing the limit that you've encountered while using the dispatch.yaml file to define the routing paths.

like image 175
bhito Avatar answered May 12 '26 19:05

bhito



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!