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?
amazon-web-services websocket amazon-cloudfront cdn
add a comment |
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?
amazon-web-services websocket amazon-cloudfront cdn
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
add a comment |
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?
amazon-web-services websocket amazon-cloudfront cdn
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
amazon-web-services websocket amazon-cloudfront cdn
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
add a comment |
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
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
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%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
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
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