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;
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 )
<<<<<<<< Sample S3 headers >>>>>>>>>>
<<<<<<<< Sample Nginx -> S3 headers (Added Cache-Control) >>>>>>>>>>
<<<<<<<< Sample Cloudfront -> Nginx -> S3 headers >>>>>>>>>>
What I am currently working with (Attempt 1) -- (Hits cloudfront as expected everytime)

** Cloudfront Settings **:
- Respects
GETparams to support urls like (http://cdn.example.com/abc.jpg?v=1) - Cache
TTLset 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
add a comment |
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 )
<<<<<<<< Sample S3 headers >>>>>>>>>>
<<<<<<<< Sample Nginx -> S3 headers (Added Cache-Control) >>>>>>>>>>
<<<<<<<< Sample Cloudfront -> Nginx -> S3 headers >>>>>>>>>>
What I am currently working with (Attempt 1) -- (Hits cloudfront as expected everytime)

** Cloudfront Settings **:
- Respects
GETparams to support urls like (http://cdn.example.com/abc.jpg?v=1) - Cache
TTLset 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
add a comment |
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 )
<<<<<<<< Sample S3 headers >>>>>>>>>>
<<<<<<<< Sample Nginx -> S3 headers (Added Cache-Control) >>>>>>>>>>
<<<<<<<< Sample Cloudfront -> Nginx -> S3 headers >>>>>>>>>>
What I am currently working with (Attempt 1) -- (Hits cloudfront as expected everytime)

** Cloudfront Settings **:
- Respects
GETparams to support urls like (http://cdn.example.com/abc.jpg?v=1) - Cache
TTLset 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
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 )
<<<<<<<< Sample S3 headers >>>>>>>>>>
<<<<<<<< Sample Nginx -> S3 headers (Added Cache-Control) >>>>>>>>>>
<<<<<<<< Sample Cloudfront -> Nginx -> S3 headers >>>>>>>>>>
What I am currently working with (Attempt 1) -- (Hits cloudfront as expected everytime)

** Cloudfront Settings **:
- Respects
GETparams to support urls like (http://cdn.example.com/abc.jpg?v=1) - Cache
TTLset 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
nginx amazon-ec2 amazon-web-services amazon-s3 amazon-cloudfront
asked Jan 21 '14 at 6:33
Yugal JindleYugal Jindle
1216
1216
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
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?
Since my access method remains same every-time, this should not be the case. This would have resulted in constantmiss
– 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 allbrowser,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
|
show 3 more comments
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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?
Since my access method remains same every-time, this should not be the case. This would have resulted in constantmiss
– 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 allbrowser,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
|
show 3 more comments
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?
Since my access method remains same every-time, this should not be the case. This would have resulted in constantmiss
– 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 allbrowser,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
|
show 3 more comments
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?
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?
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 constantmiss
– 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 allbrowser,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
|
show 3 more comments
Since my access method remains same every-time, this should not be the case. This would have resulted in constantmiss
– 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 allbrowser,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
|
show 3 more comments
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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