如何将 Google Cloud CDN 用于托管在 Google App Engine 上的静态网站?

How can I use Google Cloud CDN for static website hosted on Google App Engine?

我在 Google App Engine 上提供一个超级简单的静态网站。我选择了苏黎世的地点,它在我在欧洲测试的所有地点都提供相当不错的内容。我在网上进行的速度测试显示,欧洲的页面加载速度不到 1 秒。然而,在美国,尤其是西海岸、南美、亚洲和澳大利亚,页面加载时间超过 3 秒,这对我来说是无法接受的。

于是想到了Google云CDN。不幸的是,他们的 CDN 似乎需要一些 HTTPS 负载平衡器,我不知道如何设置它。如果 Google 拥有自己的 CDN 似乎很愚蠢,但这不适用于他们的 App Engine,所以我必须去 Cloudflare。

很遗憾,您无法在 Google App Engine 上为您的站点使用 Google Cloud CDN。如今,Cloud CDN 可用于提供源自 Cloud Storage 存储桶、Compute Engine 实例组和 Compute Engine 网络端点组的内容。

查看文档 Overview of Cloud CDN:

The Cloud CDN content delivery network works with HTTP(S) load balancing to deliver content to your users. The HTTP(S) load balancer provides the frontend IP addresses and ports that receive requests and the backends that respond to the requests.

Cloud CDN content can be sourced from various types of backends:

我在 Google Public Issue Tracker 发现了两个关于为 App Engine 添加 Cloud CDN 支持的功能请求 Standard and Flexible - 您可以加入这些案例、发表评论并跟踪进度。

可能的解决方法 对于一个简单的站点,您可以在此 article.

中找到