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
preguntada hace 2 años1982 visualizaciones
1 Respuesta
0
Respuesta aceptada

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
respondido hace 2 años
profile pictureAWS
EXPERTO
Toni_S
revisado hace 2 años

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas