amazon-web-services - 云前端支持 Nginx(S3 的代理)随机丢失已缓存的项目?

标签 amazon-web-services nginx amazon-s3 amazon-ec2 amazon-cloudfront

我希望提供来自 的图像S3 存储桶 云前线 作为 CDN 前端,为此我尝试了以下操作:

What I wish to acheive (Attempt 2) -- (Misses cloudfront cache randomly)



我有以下设置来提供图像:( Cloudfront --> Nginx --> S3 )
Cloudfront -> Nginx -> S3

<<<<<<<<样本 S3 标题 >>>>>>>>>>
Attempt-2 S3 headers

<<<<<<<<样本 Nginx -> S3 header (添加 缓存控制 )>>>>>>>>>>
Attempt-2 Nginx->S3 headers

<<<<<<<<样本 Cloudfront -> Nginx -> S3 标题 >>>>>>>>>>
Attempt-2 Cloudfront->Nginx->S3 headers

What I am currently working with (Attempt 1) -- (Hits cloudfront as expected everytime)



Cloudfront -> S3

Cloudfront 设置 :
  • 致意 GET支持像 ( http://cdn.example.com/abc.jpg?v=1 )
  • 这样的 url 的参数
  • 缓存 TTL设置为 157680000 (回退 缓存控制 )

  • 我在搞什么 Attemp-2 用我的标题? ( Cloudfront 随机丢失 )

    网址( http://cdn.example.com/abc.jpg )和网址( http://cdn.example.com/abc.jpg?v=1 )都将具有相同的 ETag ,可以吗?

    更新

    #AWS 跟进 forums.aws.amazon.com ,还在等回复:

    https://forums.aws.amazon.com/thread.jspa?threadID=144286&tstart=0#

    更新 2
  • 最近从 cloudfront 改变了命中/未命中行为,而没有改变任何东西。
  • 早些时候,命中/未命中是随机的,没有固定模式
  • 现在,(我的结局没有变化)我在 1 天内获得了所有点击,第二天全部未命中。
  • 这表明其 24 小时缓存但 TTL 和缓存 header 表明 5 年缓存到期。
  • 这再次很奇怪,没有任何解释。

  • 嘿, AWS 你能看到这个吗???

    最佳答案

    后约4 monthsamazon support 的重复往返未能解决问题。

    所有问题仍然存在:

  • 缓存在大约一天后过期,并在 后丢失24小时 . (我的有效期是 1 年)
  • 所有标题和 aws 设置 amazon support 验证自己
  • 不幸的是,由于锁定,该公司仍在为这种糟糕的体验付出代价。

  • enter image description here
    ------ After 24 hours ------
    

    enter image description here
    ------ After 24 hours ------
    

    enter image description here
    ------ After 24 hours ------
    

    enter image description here
    -------- And so on.. -------
    

    结论,问题依旧未解决 亚马逊支持 似乎已经放弃了。这是自 aws 以来的奇怪经历是我们通常认为理所当然的事情。

    :(

    关于amazon-web-services - 云前端支持 Nginx(S3 的代理)随机丢失已缓存的项目?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21248999/

    相关文章:

    amazon-web-services - 未找到 AmazonServiceException 类

    amazon-web-services - aws 引用代码 - 不工作 - 无法访问 S3 图像

    amazon-web-services - 使用 AWS CloudFormation 中的 EC2 实例创建的卷上的标签

    ubuntu - 如何在我的服务器中每 1 小时运行一次此代码

    amazon-s3 - 使用 aws cli 在用户本地下载 s3 存储桶文件

    Python从下载链接获取s3文件

    javascript - Evaporate.js 暂停/恢复

    performance - 更新目标Pod时,如何减少Nginx入口路由的停机时间?

    node.js - nginx vs node-http-proxy

    amazon-web-services - 如何缓存存储在 Amazon S3 中的图像?