首页 > 其他分享 >How CloudFront works with regional edge caches

How CloudFront works with regional edge caches

时间:2023-04-04 16:59:01浏览次数:42  
标签:cache regional CloudFront How edge POP caches

Reference :  How CloudFront works with regional edge caches

CloudFront points of presence (also known as POPs or edge locations) make sure that popular content can be served quickly to your viewers. CloudFront also has regional edge caches that bring more of your content closer to your viewers, even when the content is not popular enough to stay at a POP, to help improve performance for that content.

Regional edge caches help with all types of content, particularly content that tends to become less popular over time. Examples include user-generated content, such as video, photos, or artwork; e-commerce assets such as product photos and videos; and news and event-related content that might suddenly find new popularity.

How regional caches work

Regional edge caches are CloudFront locations that are deployed globally, close to your viewers. They’re located between your origin server and the POPs—global edge locations that serve content directly to viewers. As objects become less popular, individual POPs might remove those objects to make room for more popular content. Regional edge caches have a larger cache than an individual POP, so objects remain in the cache longer at the nearest regional edge cache location. This helps keep more of your content closer to your viewers, reducing the need for CloudFront to go back to your origin server, and improving overall performance for viewers.

When a viewer makes a request on your website or through your application, DNS routes the request to the POP that can best serve the user’s request. This location is typically the nearest CloudFront edge location in terms of latency. In the POP, CloudFront checks its cache for the requested object. If the object is in the cache, CloudFront returns it to the user. If the object is not in the cache, the POP typically goes to the nearest regional edge cache to fetch it. For more information about when the POP skips the regional edge cache and goes directly to the origin, see the following note.

In the regional edge cache location, CloudFront again checks its cache for the requested object. If the object is in the cache, CloudFront forwards it to the POP that requested it. As soon as the first byte arrives from regional edge cache location, CloudFront begins to forward the object to the user. CloudFront also adds the object to the cache in the POP for the next time someone requests it.

For objects not cached at either the POP or the regional edge cache location, CloudFront compares the request with the specifications in your distributions and forwards the request to the origin server. After your origin server sends the object back to the regional edge cache location, it is forwarded to the POP, and then CloudFront forwards it to the user. In this case, CloudFront also adds the object to the cache in the regional edge cache location in addition to the POP for the next time a viewer requests it. This makes sure that all of the POPs in a region share a local cache, eliminating multiple requests to origin servers. CloudFront also keeps persistent connections with origin servers so objects are fetched from the origins as quickly as possible.

Note
Regional edge caches have feature parity with POPs. For example, a cache invalidation request removes an object from both POP caches and regional edge caches before it expires. The next time a viewer requests the object, CloudFront returns to the origin to fetch the latest version of the object. Proxy HTTP methods (PUT, POST, PATCH, OPTIONS, and DELETE) go directly to the origin from the POPs and do not proxy through the regional edge caches. Dynamic requests, as determined at request time, do not flow through regional edge caches, but go directly to the origin. When the origin is an Amazon S3 bucket and the request’s optimal regional edge cache is in the same Amazon Web Services Region as the S3 bucket, the POP skips the regional edge cache and goes directly to the S3 bucket.

The following diagram illustrates how requests and responses flow through CloudFront edge locations and regional edge caches.

 

标签:cache,regional,CloudFront,How,edge,POP,caches
From: https://www.cnblogs.com/5201351/p/17286944.html

相关文章

  • 微信小程序自定义封装组件-showModal
    封装一个组件这里由于最近使用微信小程序居多,所以着重写的是小程序的,但是万变不离其宗,组件实现思路其实都差不多的微信小程序开发中官方自带的wx.showModal,这个弹窗API有时候并不能满足我们的弹窗效果,所以往往需要自定义modal组件。下面我们进行一个自定义modal弹窗组件的开发,并......
  • 类型类Type classes(第一部分)类约束 Eq、Ord、Show、Read、Enum、Num、Integral、Float
    类型类Typeclasses是一种定义某种行为的接口。如果类型是类型类的成员,则意味着类型支持并实现了类型类定义的行为。类约束==函数的类型,如下:type(==)(==)::Eqa=>a->a->Bool=>符号定义了一个类约束,==函数接受两个相同类型的形参,并返回Bool类型。这两个形参的类型......
  • How to find the "usbmodem" of Raspberry Pi Pico on macOS All In One
    Howtofindthe"usbmodem"ofRaspberryPiPicoonmacOSAllInOneerrors/dev/tty.usbmodem0000000000001notexistbug❌#0000000000001❌$minicom-b115200-o-D/dev/tty.usbmodem0000000000001官方SDK文档❌bughttps://datasheets.raspberr......
  • 【THM】How websites work(网站运行基础)-学习
    本文相关的TryHackMe实验房间链接:https://tryhackme.com/room/howwebsiteswork本文相关内容:要对网站进行漏洞利用,你首先需要知道网站是如何被创建的,本文将涉及HTML&JS以及......
  • VM虚拟机安装centos7.9并docker启动showdoc
    一、准备工作安装VMwareworkstations16版本,这个不做过多的介绍下载centos64位dvd版的centos7.9的镜像文件创建虚拟机,此过程也不做过多的介绍,设置root密码的时候千万要......
  • ctfshow web入门 文件上传 web151-160
    web151经典前端绕过web152简单后端绕过从web153开始,需使用.user.ini从web154开始,对文件内容进行黑名单过滤每个关卡会累计前面关卡的限制重点:了解前后端......
  • Disqus API 用法 How to get your Disqus API keys
    I’mworkingonimportingmycommentsintotheotherwiseexcellentDisquscommentingsystem,butgettingaholdofyourAPIkeyscanberatherdifficult,soI’l......
  • showDoc漏洞
    攻击者使用showDoc的漏洞传播僵尸网络 近日,阿里云安全团队基于威胁情报挖掘网络攻击日志的过程中,发现了使用showDoc漏洞传播僵尸网络和挖矿软件的攻击事件,使用该......
  • How can I know an IP is a public IP or not?
    HowcanIknowanIPisapublicIPornot?TodeterminewhetheranIPaddressispublicorprivate,youcancompareittoalistofprivateIPaddressrang......
  • IntelliJ IDEA 怎样关闭重复代码提示:Show all duplicates like this
    IDEA提示如下:ShowallduplicateslikethisDonotdetectduplicatesofthissize  1.打开左上角File-->Settings,选择Editor-->Inspections  2.找到Gen......