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

Gracefully switch domain from App Engine service to Cloud Run


I have a service running in App Engine, which has custom domain mapped to it.
We are in a process of migrating this service from App Engine to Cloud Run.
Thus, we would like to switch domain mapping from App Engine to Cloud Run.
We've tried doing that in our staging environment and discovered that such switching causes some downtime of our service (about 10-15 minutes).
Is it possible to avoid such a downtime and migrate traffic/switch domain gracefully without downtime?

Just for information, in our App Engine domain is mapped through deploying dispatch.yaml file.
In Cloud Run we enable domain for our service through following link: https://console.cloud.google.com/run/domains?project=<project_name>&supportedpurview=project


Solution

  • As @John Hanley mentioned and @Sandeep Vokkareni shared,

    It potentially will have downtime. The issue is that the domain mapping is managed by the GFE (Google Frontend). You must delete and reissue custom domain mappings. One way to decrease the downtime is to make the DNS resource record TTL value small, such as 60 seconds. Once the remapping succeeds, change the TTL back to a normal value such as 86400 (one day).