What is the priority when accessing a file with the same name from different origins on Cloudfront?

0

Added index.html to origin a,b / path in one distribution.

=============

a.s3/index.html

b.s3/index.html

=============

In this case, it is thought that both are accessed at the same time.

(When connecting to cloudfrontURL.com/index.html, which one of a.s3/index.html OR b.s3/index.html is processed?)

I wonder how cloudfront is handled.

joker
질문됨 2년 전1982회 조회
1개 답변
0
수락된 답변

Hi There,

I understand you have uploaded similar named html files into two origins and would like to find out what the priority would be when accessing these files with the same name from different origins on Cloudfront.

Please note: CloudFront Distributions have one to many Behaviors, and there is always one default Behavior. You can have different Behaviors in order of precedence and if in that order of precedence no condition is met, then the default Behavior will take place. With that said, you need to arrange cache behaviors in the order in which you want CloudFront to evaluate them. Since in your case there would be two behaviors that match a given path, CloudFront will break this tie, by precedence ordering between the behaviors, When a request reaches the distribution, CloudFront starts from the top and tries to match the path patterns for each cache behavior. The first one that matches wins therefore with your example, it will depend which one is at the top.

I hope the above information is helpful.

References: [1] https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesPathPattern.

Have a great day ahead.

Mfanelo
답변함 2년 전
profile pictureAWS
전문가
Toni_S
검토됨 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠