关于使用amazone的cloudfront

关于使用amazone的cloudfront

cloudfront类似于CDN,文件存储在S3上,cloudfront的各个edge从S3上抓取文件,最终客户端按照地理位置的最近原则访问cloudfront的某个edge,cloudfront每24小时从S3上抓取一次文件,这个时间不能减小,如果你修改了S3上的文件,那么,你需要等24小时,cloudfront才会更新该文件,amazon推荐使用object version命名方法来为文件命名:
We recommend that you use the common technique of versioning to give yourself better control of your content. Versioning means that you assign each object in the origin server a version number. For example, instead of calling the file image.jpg, you call it image_1.jpg. Then when you want to start serving a new version of the file, you name that new file image_2.jpg, and you update your links to point to image_2.jpg. With versioning, you do not have to wait for an object to expire before you can serve a new version of it.
你可以为上传到S3上的文件设置http的header,如Cache-Control,等。

如果网站的国外访问量不是很大,完全可以将文件放到S3上,然后在国内建立squid来缓存S3上的文件。
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值