jeudi 8 mai 2014

les services web Amazon - Cloud-front soutenu avec Nginx (lesquelles procurations à S3) au hasard manque déjà mise en cache des éléments ? -Débordement de pile


I wish to serve images from a S3 bucket with Cloudfront as CDN frontend, for that I tried the following:



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



I have the following setup to serve images: ( Cloudfront --> Nginx --> S3 ) Cloudfront -> Nginx -> S3


<<<<<<<< Sample S3 headers >>>>>>>>>> Attempt-2 S3 headers


<<<<<<<< Sample Nginx -> S3 headers (Added Cache-Control) >>>>>>>>>> Attempt-2 Nginx->S3 headers


<<<<<<<< Sample Cloudfront -> Nginx -> S3 headers >>>>>>>>>> Attempt-2 Cloudfront->Nginx->S3 headers



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



Cloudfront -> S3


Cloudfront Settings:



What am I screwing up in Attemp-2 with my headers ? ( Cloudfront missing randomly )


Url(http://cdn.example.com/abc.jpg) & Url(http://cdn.example.com/abc.jpg?v=1) both will have same ETag, is that fine ?


Update


#AWS followed up on forums.aws.amazon.com, still waiting for a reply:


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


Update2



  • Recent hit/miss behavioral change from cloudfront without changing anything.

  • Earlier the hits/misses were random with no fix pattern

  • Now, (with no change on my end) I am getting all hits 1 day and all misses the next day.

  • This suggests that its 24 hour cache but TTL and cache headers suggest 5 year cache expiry.

  • This is again weird and without any explanations.


Hey, AWS can you see this ???




Checking the 2 IPs you listed in AWS forum when you run dig resolver-identity.cloudfront.net:


74.125.190.17 is from Google in CA, USA   
67.215.80.11 is from OpenDNS from Singapore

Are you using OpenDNS or Google DNS? If you are, can you try to disable them and see if CloudFront will work properly from then on?


There is an article here talking about the disadvantage when you using OpenDNS/Google DNS with CDN, which may be helpful. http://apcmag.com/why-using-google-dns-opendns-is-a-bad-idea.htm



I wish to serve images from a S3 bucket with Cloudfront as CDN frontend, for that I tried the following:



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



I have the following setup to serve images: ( Cloudfront --> Nginx --> S3 ) Cloudfront -> Nginx -> S3


<<<<<<<< Sample S3 headers >>>>>>>>>> Attempt-2 S3 headers


<<<<<<<< Sample Nginx -> S3 headers (Added Cache-Control) >>>>>>>>>> Attempt-2 Nginx->S3 headers


<<<<<<<< Sample Cloudfront -> Nginx -> S3 headers >>>>>>>>>> Attempt-2 Cloudfront->Nginx->S3 headers



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



Cloudfront -> S3


Cloudfront Settings:



What am I screwing up in Attemp-2 with my headers ? ( Cloudfront missing randomly )


Url(http://cdn.example.com/abc.jpg) & Url(http://cdn.example.com/abc.jpg?v=1) both will have same ETag, is that fine ?


Update


#AWS followed up on forums.aws.amazon.com, still waiting for a reply:


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


Update2



  • Recent hit/miss behavioral change from cloudfront without changing anything.

  • Earlier the hits/misses were random with no fix pattern

  • Now, (with no change on my end) I am getting all hits 1 day and all misses the next day.

  • This suggests that its 24 hour cache but TTL and cache headers suggest 5 year cache expiry.

  • This is again weird and without any explanations.


Hey, AWS can you see this ???



Checking the 2 IPs you listed in AWS forum when you run dig resolver-identity.cloudfront.net:


74.125.190.17 is from Google in CA, USA   
67.215.80.11 is from OpenDNS from Singapore

Are you using OpenDNS or Google DNS? If you are, can you try to disable them and see if CloudFront will work properly from then on?


There is an article here talking about the disadvantage when you using OpenDNS/Google DNS with CDN, which may be helpful. http://apcmag.com/why-using-google-dns-opendns-is-a-bad-idea.htm


1 commentaire:

  1. Kā atzina zemūdens darbu organizators Robs Vilsons (Rob Wilson) - dažas no zemūdens darbos pie Taranaki piestātnes atrastajām monētām acīmredzami ir vērtīgas.
    vumoo

    RépondreSupprimer