gpt4 book ai didi

conflict - 具有多个起源的亚马逊云前沿分布是否有冲突?

转载 作者:行者123 更新时间:2023-12-03 09:23:01 26 4
gpt4 key购买 nike

我在2个网站上有2个不同的图片:

  • http://www.siteA.com/avatar.png
  • http://www.siteB.com/avatar.png

  • 如果我创建具有2个起源的Amazon Cloudfront发行版: www.siteA.comwww.siteB.com,然后调用 uniqueDistributionID.cloudfront.net/avatar.png,那么将返回哪个 avatar.png?是 siteA中的一个还是 siteB中的一个?

    为什么和为什么不呢?

    试图了解潜在的Cloudfront发行版冲突。

    最佳答案

    不,CloudfFront没有“冲突”的概念,因为当您的分布具有多个起点时,必须定义将哪个路径匹配到哪个起点。

    CloudFront的路径模式匹配是确定性的。它使用第一个匹配,而不是最佳匹配。即使最先匹配的模式是原始服务器上的死胡同,也将使用该模式。

    When CloudFront receives an end-user request, the requested path is compared with path patterns in the order in which cache behaviors are listed in the distribution. The first match determines which cache behavior is applied to that request.

    http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesPathPattern



    更新

    CloudFront现在支持 Origin Groups的概念,该概念允许任何给定的缓存行为将请求发送到一个起点,然后-如果第一个起点返回了您指定的一种错误类型(例如404或503),则CloudFront将尝试从第二个来源获取内容。这可以用于故障转移,但也可以用于希望CloudFront尝试一个起源然后再尝试另一个起源的情况。对于每个高速缓存未命中,按顺序尝试了原始组中的两个原始。如果任何一个源都返回可缓存的响应,则该响应将存储在缓存中。

    关于conflict - 具有多个起源的亚马逊云前沿分布是否有冲突?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29460522/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com