【问题标题】:How to use Google Cloud CDN to access Google Cloud Storage public objects如何使用 Google Cloud CDN 访问 Google Cloud Storage 公共对象
【发布时间】:2017-07-30 05:10:51
【问题描述】:

我有一些从 Google Cloud Storage (GCS) 提供的公共二进制文件,我想探索使用 Google Cloud CDN 来降低延迟。我通过在创建 GCS 对象时设置适当的 HTTP 标头来使用 GCS 缓存。

是否可以使用 Google Cloud CDN 从 GCS 提供这些对象?如果不是,Google Cloud CDN 是否仅适用于 HTTP(S) 负载平衡器?

【问题讨论】:

    标签: google-cloud-storage google-cloud-platform google-cloud-cdn


    【解决方案1】:

    默认情况下,Google Cloud Storage 确实提供了一定数量的边缘缓存,因此我建议您通过实验来衡量您的性能是否已经足以需要 CDN。

    也就是说,Google Cloud CDN 和 Cloud Load Balancer 支持 GCS 存储桶作为支持资源,尽管该功能处于测试阶段。完整的说明在这里:https://cloud.google.com/compute/docs/load-balancing/http/using-http-lb-with-cloud-storage

    要进行设置,请像往常一样配置 Google Cloud Load Balancer,但作为后备存储桶,请指定 GCS 存储桶,并指定应使用 Cloud CDN,如下所示:

    gcloud beta compute backend-buckets create static-bucket \
        --description "A Bucket" \
        --gcs-bucket-name [EXAMPLE_BUCKET] \
        --enable-cdn
    

    【讨论】:

    【解决方案2】:

    据我所知,Google Cloud Storage 带有某种边缘缓存。

    是的,你需要有一个 LB。它处于测试阶段,请阅读文档here

    这可能是为了提供来自同一域的静态文件和动态后端,而不是将 CDN 添加到 GCS。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-03-28
      • 1970-01-01
      • 2021-04-14
      • 2019-04-13
      • 2020-03-24
      • 1970-01-01
      • 2012-10-15
      • 2021-11-14
      相关资源
      最近更新 更多