RamyaKarri
RamyaKarri

Reputation: 51

Google App Engine Flexible - routing to specific service

Is it possible to route to specific service in Google App Engine Flexible without creating a dispatch.yaml?

The documentation (https://cloud.google.com/appengine/docs/flexible/java/how-requests-are-routed#default_routing) says we can route to a specific service by calling http://SERVICE_ID.MY_CUSTOM_DOMAIN.

When I tried http://SERVICE_ID.MY_CUSTOM_DOMAIN it did not work. The request got routed to default and not the service.

So I tried dispatch.yaml and it worked.

dispatch:
  - url: "SERVICE_ID.MY_CUSTOM_DOMAIN/*"
    service: SERVICE_ID

Sending request to a service is default routing and it should have routed to the service (but did not work?). Why do we need dispatch.yaml file in this case?

Upvotes: 2

Views: 1837

Answers (1)

Jofre
Jofre

Reputation: 3898

If you specify a subdomain, it'll always point to the default service of your GAE.

To be able to route to each service using subdomains, you must use a wildcard mapping.

Upvotes: 2

Related Questions