Search code examples
google-cloud-platformgoogle-cloud-run

Provide a single endpoint to multiple CloudRun service endpoints


I have a CloudRun service with the url "https://mycrservice.gxygegr.a.run.app". Since my callers are in multiple regions, do I have to create a new service for each region ?

If I do, how can I have only 1 endpoint (https://mycrservice.mydomain.com) and any caller for a region gets routed to that region. Can I achieve this ?

I know I can do a "custom domain" for a service.


Solution

  • Since my callers are in multiple regions, do I have to create a new service for each region ?

    The answer depends. Cloud Run is a regional service and is not a global service. Cloud Run does not support domain mappings across multiple regions. This means that if you deploy Cloud Run in both us-central1 and us-west1 you will have two different URLs. At this time, Cloud Run does not support integration with HTTP(S) Load Balancers. Once that happens, the correct answer will be different.

    For performance, it is best to locate your services close to customers. However, with Cloud Run you will have one URL per deployed region.