Cloud-front backed with Nginx (which proxies to S3) randomly missing already cached items?How can I see which flags Nginx was compiled with?Loadbalance nginx proxies with keepalived possible?nginx with real_ip — log both client remote_addr and proxies addressJSF stylesheets missing with nginxchrome requests get stuck pendingPassing User-Agent through Cloudfront for Facebook scraperUnable to add custom headers to CloudFront distribution - using s3 as backendChrome S3 Cloudfront: No 'Access-Control-Allow-Origin' header on initial XHR requestAWS S3, CloudFront, web font CORS error

Game artist computer workstation set-up – is this overkill?

Sparring against two opponents test

Clarification of algebra in moment generating functions

Undefined Control Sequence for my 0-norm

Why does blending blueberries, milk, banana and vanilla extract cause the mixture to have a yogurty consistency?

Can I hide the part of long lines that exceeds the visual line?

In Futurama, how many beings has Leela slept with?

What makes an isotope stable?

Dihedral group D4 composition with custom labels

Dirichlet series with a single zero

Endgame puzzle: How to avoid stalemate and win?

How to pass hash as password to ssh server

Is there a word for food that's gone 'bad', but is still edible?

Is it normal for gliders not to have attitude indicators?

Does running exec do anything?

What's the 2-minute timer on mobile Deutsche Bahn tickets?

As a GM, is it bad form to ask for a moment to think when improvising?

Page count conversion from single to double-space for submissions

Krull dimension of the ring of global sections

Is there a word that describes the unjustified use of a more complex word?

How to remap repeating commands i.e. <number><command>?

Why did WWI include Japan?

Drawing an hexagonal cone in TikZ 2D

Has the United States ever had a non-Christian President?



Cloud-front backed with Nginx (which proxies to S3) randomly missing already cached items?


How can I see which flags Nginx was compiled with?Loadbalance nginx proxies with keepalived possible?nginx with real_ip — log both client remote_addr and proxies addressJSF stylesheets missing with nginxchrome requests get stuck pendingPassing User-Agent through Cloudfront for Facebook scraperUnable to add custom headers to CloudFront distribution - using s3 as backendChrome S3 Cloudfront: No 'Access-Control-Allow-Origin' header on initial XHR requestAWS S3, CloudFront, web font CORS error






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








3















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 **:



  • Respects GET params to support urls like (http://cdn.example.com/abc.jpg?v=1)

  • Cache TTL set to 157680000 ( Fallback for Cache-Control )

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 ?










share|improve this question




























    3















    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 **:



    • Respects GET params to support urls like (http://cdn.example.com/abc.jpg?v=1)

    • Cache TTL set to 157680000 ( Fallback for Cache-Control )

    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 ?










    share|improve this question
























      3












      3








      3








      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 **:



      • Respects GET params to support urls like (http://cdn.example.com/abc.jpg?v=1)

      • Cache TTL set to 157680000 ( Fallback for Cache-Control )

      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 ?










      share|improve this question














      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 **:



      • Respects GET params to support urls like (http://cdn.example.com/abc.jpg?v=1)

      • Cache TTL set to 157680000 ( Fallback for Cache-Control )

      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 ?







      nginx amazon-ec2 amazon-web-services amazon-s3 amazon-cloudfront






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jan 21 '14 at 6:33









      Yugal JindleYugal Jindle

      1216




      1216




















          1 Answer
          1






          active

          oldest

          votes


















          0














          Maybe this is related to the clients making requests that indicate that cache should be by-passed?



          E.g., maybe Pragma: no-cache appears in the requests, and is respected by the front-facing server, resulting in a miss?






          share|improve this answer

























          • Since my access method remains same every-time, this should not be the case. This would have resulted in constant miss

            – Yugal Jindle
            Jan 21 '14 at 23:06











          • What are your access methods? Do you use a browser? When you click various refresh and shift-refresh or whatever, they do send these extra no-cache headers.

            – cnst
            Jan 21 '14 at 23:10











          • I have tried all browser, curl, wget, etc. Though, I didn't checked the defaults. Shouldn't it miss everytime if its the case that you are talking about.

            – Yugal Jindle
            Jan 21 '14 at 23:33











          • Why would it miss all the time? You don't always have these extra no-cache headers flying around. Also, maybe there's some extra logic involved in cloudfront.net of when the no-cache directives are respected, and when not. If the above is not an answer, then, IMHO, the question is probably off-topic for serverfault.

            – cnst
            Jan 21 '14 at 23:40






          • 1





            See this discussion for more : forums.aws.amazon.com/thread.jspa?threadID=144286&tstart=0#

            – Yugal Jindle
            Jan 24 '14 at 14:19











          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "2"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f568693%2fcloud-front-backed-with-nginx-which-proxies-to-s3-randomly-missing-already-cac%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          Maybe this is related to the clients making requests that indicate that cache should be by-passed?



          E.g., maybe Pragma: no-cache appears in the requests, and is respected by the front-facing server, resulting in a miss?






          share|improve this answer

























          • Since my access method remains same every-time, this should not be the case. This would have resulted in constant miss

            – Yugal Jindle
            Jan 21 '14 at 23:06











          • What are your access methods? Do you use a browser? When you click various refresh and shift-refresh or whatever, they do send these extra no-cache headers.

            – cnst
            Jan 21 '14 at 23:10











          • I have tried all browser, curl, wget, etc. Though, I didn't checked the defaults. Shouldn't it miss everytime if its the case that you are talking about.

            – Yugal Jindle
            Jan 21 '14 at 23:33











          • Why would it miss all the time? You don't always have these extra no-cache headers flying around. Also, maybe there's some extra logic involved in cloudfront.net of when the no-cache directives are respected, and when not. If the above is not an answer, then, IMHO, the question is probably off-topic for serverfault.

            – cnst
            Jan 21 '14 at 23:40






          • 1





            See this discussion for more : forums.aws.amazon.com/thread.jspa?threadID=144286&tstart=0#

            – Yugal Jindle
            Jan 24 '14 at 14:19















          0














          Maybe this is related to the clients making requests that indicate that cache should be by-passed?



          E.g., maybe Pragma: no-cache appears in the requests, and is respected by the front-facing server, resulting in a miss?






          share|improve this answer

























          • Since my access method remains same every-time, this should not be the case. This would have resulted in constant miss

            – Yugal Jindle
            Jan 21 '14 at 23:06











          • What are your access methods? Do you use a browser? When you click various refresh and shift-refresh or whatever, they do send these extra no-cache headers.

            – cnst
            Jan 21 '14 at 23:10











          • I have tried all browser, curl, wget, etc. Though, I didn't checked the defaults. Shouldn't it miss everytime if its the case that you are talking about.

            – Yugal Jindle
            Jan 21 '14 at 23:33











          • Why would it miss all the time? You don't always have these extra no-cache headers flying around. Also, maybe there's some extra logic involved in cloudfront.net of when the no-cache directives are respected, and when not. If the above is not an answer, then, IMHO, the question is probably off-topic for serverfault.

            – cnst
            Jan 21 '14 at 23:40






          • 1





            See this discussion for more : forums.aws.amazon.com/thread.jspa?threadID=144286&tstart=0#

            – Yugal Jindle
            Jan 24 '14 at 14:19













          0












          0








          0







          Maybe this is related to the clients making requests that indicate that cache should be by-passed?



          E.g., maybe Pragma: no-cache appears in the requests, and is respected by the front-facing server, resulting in a miss?






          share|improve this answer















          Maybe this is related to the clients making requests that indicate that cache should be by-passed?



          E.g., maybe Pragma: no-cache appears in the requests, and is respected by the front-facing server, resulting in a miss?







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited May 23 '17 at 12:41









          Community

          1




          1










          answered Jan 21 '14 at 21:53









          cnstcnst

          7,79863654




          7,79863654












          • Since my access method remains same every-time, this should not be the case. This would have resulted in constant miss

            – Yugal Jindle
            Jan 21 '14 at 23:06











          • What are your access methods? Do you use a browser? When you click various refresh and shift-refresh or whatever, they do send these extra no-cache headers.

            – cnst
            Jan 21 '14 at 23:10











          • I have tried all browser, curl, wget, etc. Though, I didn't checked the defaults. Shouldn't it miss everytime if its the case that you are talking about.

            – Yugal Jindle
            Jan 21 '14 at 23:33











          • Why would it miss all the time? You don't always have these extra no-cache headers flying around. Also, maybe there's some extra logic involved in cloudfront.net of when the no-cache directives are respected, and when not. If the above is not an answer, then, IMHO, the question is probably off-topic for serverfault.

            – cnst
            Jan 21 '14 at 23:40






          • 1





            See this discussion for more : forums.aws.amazon.com/thread.jspa?threadID=144286&tstart=0#

            – Yugal Jindle
            Jan 24 '14 at 14:19

















          • Since my access method remains same every-time, this should not be the case. This would have resulted in constant miss

            – Yugal Jindle
            Jan 21 '14 at 23:06











          • What are your access methods? Do you use a browser? When you click various refresh and shift-refresh or whatever, they do send these extra no-cache headers.

            – cnst
            Jan 21 '14 at 23:10











          • I have tried all browser, curl, wget, etc. Though, I didn't checked the defaults. Shouldn't it miss everytime if its the case that you are talking about.

            – Yugal Jindle
            Jan 21 '14 at 23:33











          • Why would it miss all the time? You don't always have these extra no-cache headers flying around. Also, maybe there's some extra logic involved in cloudfront.net of when the no-cache directives are respected, and when not. If the above is not an answer, then, IMHO, the question is probably off-topic for serverfault.

            – cnst
            Jan 21 '14 at 23:40






          • 1





            See this discussion for more : forums.aws.amazon.com/thread.jspa?threadID=144286&tstart=0#

            – Yugal Jindle
            Jan 24 '14 at 14:19
















          Since my access method remains same every-time, this should not be the case. This would have resulted in constant miss

          – Yugal Jindle
          Jan 21 '14 at 23:06





          Since my access method remains same every-time, this should not be the case. This would have resulted in constant miss

          – Yugal Jindle
          Jan 21 '14 at 23:06













          What are your access methods? Do you use a browser? When you click various refresh and shift-refresh or whatever, they do send these extra no-cache headers.

          – cnst
          Jan 21 '14 at 23:10





          What are your access methods? Do you use a browser? When you click various refresh and shift-refresh or whatever, they do send these extra no-cache headers.

          – cnst
          Jan 21 '14 at 23:10













          I have tried all browser, curl, wget, etc. Though, I didn't checked the defaults. Shouldn't it miss everytime if its the case that you are talking about.

          – Yugal Jindle
          Jan 21 '14 at 23:33





          I have tried all browser, curl, wget, etc. Though, I didn't checked the defaults. Shouldn't it miss everytime if its the case that you are talking about.

          – Yugal Jindle
          Jan 21 '14 at 23:33













          Why would it miss all the time? You don't always have these extra no-cache headers flying around. Also, maybe there's some extra logic involved in cloudfront.net of when the no-cache directives are respected, and when not. If the above is not an answer, then, IMHO, the question is probably off-topic for serverfault.

          – cnst
          Jan 21 '14 at 23:40





          Why would it miss all the time? You don't always have these extra no-cache headers flying around. Also, maybe there's some extra logic involved in cloudfront.net of when the no-cache directives are respected, and when not. If the above is not an answer, then, IMHO, the question is probably off-topic for serverfault.

          – cnst
          Jan 21 '14 at 23:40




          1




          1





          See this discussion for more : forums.aws.amazon.com/thread.jspa?threadID=144286&tstart=0#

          – Yugal Jindle
          Jan 24 '14 at 14:19





          See this discussion for more : forums.aws.amazon.com/thread.jspa?threadID=144286&tstart=0#

          – Yugal Jindle
          Jan 24 '14 at 14:19

















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Server Fault!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f568693%2fcloud-front-backed-with-nginx-which-proxies-to-s3-randomly-missing-already-cac%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          How to write a 12-bar blues melodyI-IV-V blues progressionHow to play the bridges in a standard blues progressionHow does Gdim7 fit in C# minor?question on a certain chord progressionMusicology of Melody12 bar blues, spread rhythm: alternative to 6th chord to avoid finger stretchChord progressions/ Root key/ MelodiesHow to put chords (POP-EDM) under a given lead vocal melody (starting from a good knowledge in music theory)Are there “rules” for improvising with the minor pentatonic scale over 12-bar shuffle?Confusion about blues scale and chords

          What if the end-user didn't have the required library?What is setup.py?What is a clean, pythonic way to have multiple constructors in Python?What does Ruby have that Python doesn't, and vice versa?What is the reason for having '//' in Python?How do I create a namespace package in Python?How to package shared objects that python modules depend on?setuptools vs. distutils: why is distutils still a thing?Navigation in Windows 10 vs code not going to virtualenv library when the same library is installed at user levelPython create package for local usePackaging a project that uses multiple python versionsWhy is permission denied on pip install except for when “--user” is included at end of command?

          Esgonzo ibérico Índice Descrición Distribución Hábitat Ameazas Notas Véxase tamén "Acerca dos nomes dos anfibios e réptiles galegos""Chalcides bedriagai"Chalcides bedriagai en Carrascal, L. M. Salvador, A. (Eds). Enciclopedia virtual de los vertebrados españoles. Museo Nacional de Ciencias Naturales, Madrid. España.Fotos