CloudFront: update 10 KB of data each 2-3 seconds











up vote
0
down vote

favorite












I'm not sure if CloudFront is a right choice for this purpose, so correct me please if I'm wrong.



I want to broadcast some information to all website users each 2-3 seconds. So instead of introducing websockets, I decided to cache 10 KB at CloudFront, and perform short-polling from web client each 2-3 seconds.



CloudFront should request data from HTTP server. Suppose HTTP server response latency is 200ms, and CloudFront get rps equal to 500. Cache get outdated, and during that 200ms that CloudFront need to refreh data from server - it will receive 500 * 0.2 = 100 requests. What is the behaviour of CloudFront when it receive 100 requests at the point where data are outdated but server hasn't respond yet?










share|improve this question
























  • This is a good question, but I believe testing is required in order to verify what CloudFront will do. If the viewers are coming in from via different edges, or at perhaps from edges that use different regional caches from each other, CloudFront will make multiple requests to your server -- one for each client -- but CloudFront does document multiple requests for the same object as a special case. Unclear is what level of traffic counts as a "spike."
    – Michael - sqlbot
    Nov 22 at 2:38










  • Note also that CloudFront just announced support for proxying websockets back to your origin. It doesn't do any multiplexing, or anything, so it won't help you, here, but I thought it might be worth mentioning.
    – Michael - sqlbot
    Nov 22 at 2:58















up vote
0
down vote

favorite












I'm not sure if CloudFront is a right choice for this purpose, so correct me please if I'm wrong.



I want to broadcast some information to all website users each 2-3 seconds. So instead of introducing websockets, I decided to cache 10 KB at CloudFront, and perform short-polling from web client each 2-3 seconds.



CloudFront should request data from HTTP server. Suppose HTTP server response latency is 200ms, and CloudFront get rps equal to 500. Cache get outdated, and during that 200ms that CloudFront need to refreh data from server - it will receive 500 * 0.2 = 100 requests. What is the behaviour of CloudFront when it receive 100 requests at the point where data are outdated but server hasn't respond yet?










share|improve this question
























  • This is a good question, but I believe testing is required in order to verify what CloudFront will do. If the viewers are coming in from via different edges, or at perhaps from edges that use different regional caches from each other, CloudFront will make multiple requests to your server -- one for each client -- but CloudFront does document multiple requests for the same object as a special case. Unclear is what level of traffic counts as a "spike."
    – Michael - sqlbot
    Nov 22 at 2:38










  • Note also that CloudFront just announced support for proxying websockets back to your origin. It doesn't do any multiplexing, or anything, so it won't help you, here, but I thought it might be worth mentioning.
    – Michael - sqlbot
    Nov 22 at 2:58













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I'm not sure if CloudFront is a right choice for this purpose, so correct me please if I'm wrong.



I want to broadcast some information to all website users each 2-3 seconds. So instead of introducing websockets, I decided to cache 10 KB at CloudFront, and perform short-polling from web client each 2-3 seconds.



CloudFront should request data from HTTP server. Suppose HTTP server response latency is 200ms, and CloudFront get rps equal to 500. Cache get outdated, and during that 200ms that CloudFront need to refreh data from server - it will receive 500 * 0.2 = 100 requests. What is the behaviour of CloudFront when it receive 100 requests at the point where data are outdated but server hasn't respond yet?










share|improve this question















I'm not sure if CloudFront is a right choice for this purpose, so correct me please if I'm wrong.



I want to broadcast some information to all website users each 2-3 seconds. So instead of introducing websockets, I decided to cache 10 KB at CloudFront, and perform short-polling from web client each 2-3 seconds.



CloudFront should request data from HTTP server. Suppose HTTP server response latency is 200ms, and CloudFront get rps equal to 500. Cache get outdated, and during that 200ms that CloudFront need to refreh data from server - it will receive 500 * 0.2 = 100 requests. What is the behaviour of CloudFront when it receive 100 requests at the point where data are outdated but server hasn't respond yet?







amazon-web-services websocket amazon-cloudfront cdn






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 21 at 21:20

























asked Nov 21 at 21:03









VB_

18.3k2279159




18.3k2279159












  • This is a good question, but I believe testing is required in order to verify what CloudFront will do. If the viewers are coming in from via different edges, or at perhaps from edges that use different regional caches from each other, CloudFront will make multiple requests to your server -- one for each client -- but CloudFront does document multiple requests for the same object as a special case. Unclear is what level of traffic counts as a "spike."
    – Michael - sqlbot
    Nov 22 at 2:38










  • Note also that CloudFront just announced support for proxying websockets back to your origin. It doesn't do any multiplexing, or anything, so it won't help you, here, but I thought it might be worth mentioning.
    – Michael - sqlbot
    Nov 22 at 2:58


















  • This is a good question, but I believe testing is required in order to verify what CloudFront will do. If the viewers are coming in from via different edges, or at perhaps from edges that use different regional caches from each other, CloudFront will make multiple requests to your server -- one for each client -- but CloudFront does document multiple requests for the same object as a special case. Unclear is what level of traffic counts as a "spike."
    – Michael - sqlbot
    Nov 22 at 2:38










  • Note also that CloudFront just announced support for proxying websockets back to your origin. It doesn't do any multiplexing, or anything, so it won't help you, here, but I thought it might be worth mentioning.
    – Michael - sqlbot
    Nov 22 at 2:58
















This is a good question, but I believe testing is required in order to verify what CloudFront will do. If the viewers are coming in from via different edges, or at perhaps from edges that use different regional caches from each other, CloudFront will make multiple requests to your server -- one for each client -- but CloudFront does document multiple requests for the same object as a special case. Unclear is what level of traffic counts as a "spike."
– Michael - sqlbot
Nov 22 at 2:38




This is a good question, but I believe testing is required in order to verify what CloudFront will do. If the viewers are coming in from via different edges, or at perhaps from edges that use different regional caches from each other, CloudFront will make multiple requests to your server -- one for each client -- but CloudFront does document multiple requests for the same object as a special case. Unclear is what level of traffic counts as a "spike."
– Michael - sqlbot
Nov 22 at 2:38












Note also that CloudFront just announced support for proxying websockets back to your origin. It doesn't do any multiplexing, or anything, so it won't help you, here, but I thought it might be worth mentioning.
– Michael - sqlbot
Nov 22 at 2:58




Note also that CloudFront just announced support for proxying websockets back to your origin. It doesn't do any multiplexing, or anything, so it won't help you, here, but I thought it might be worth mentioning.
– Michael - sqlbot
Nov 22 at 2:58

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
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',
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%2fstackoverflow.com%2fquestions%2f53420443%2fcloudfront-update-10-kb-of-data-each-2-3-seconds%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53420443%2fcloudfront-update-10-kb-of-data-each-2-3-seconds%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

Catalogne

Violoncelliste

Héron pourpré