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

A URL map can only reference either a backend service or a backend bucket

Hello,

I am reaching out with reference to the following:

https://cloud.google.com/load-balancing/docs/url-map-concepts

It says:

> When you create a URL map, you must specify either a default backend service or a default backend bucket, but not both.

However, in the introduction of the page, it says the following, which gives the impression that the same URL map is referencing both a backend service and a backend bucket:

For example, with an external Application Load Balancer, you can use a single URL map to route requests to different destinations based on the rules configured in the URL map:

  • Requests for any other host and path combination go to a default backend service.

---

Assuming that the URL map is referencing a backend service, shoudln't it say:

Solved Solved
1 10 317
1 ACCEPTED SOLUTION

Yes, a URL map can reference both backend services and backend buckets, but the default backend must be either a service or a bucket—not both.

The example in the docs is correct because path-based routing allows you to direct requests to different destinations. For instance:

  • /video → Backend service
  • /audio → Backend service
  • /images → Cloud Storage backend bucket
  • Other requests → Default backend service

So, while the default backend must be either a service or a bucket, path-based rules let you use both in the same URL map. 😊 

Thanks, 
Darwin Vinoth.
Linkedin 

 



View solution in original post