Lambda@Edge and AWS EC2 latency comparison
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
Currently, I have built an application on EC2 instances in multiple regions. The problems are when one instance per region need to patch/maintain, and we need more effort to handle if something fails.
I decide to use Lambda@Edge instead of EC2 and question is:
- Lambda@Edge is better than these EC2 instances?
- Need to make sure that Lambda@Edge would be reachable with the same latency or better than EC2. Have any official docs to prove this?
Thanks
amazon-web-services amazon-ec2 aws-lambda aws-lambda-edge
add a comment |
Currently, I have built an application on EC2 instances in multiple regions. The problems are when one instance per region need to patch/maintain, and we need more effort to handle if something fails.
I decide to use Lambda@Edge instead of EC2 and question is:
- Lambda@Edge is better than these EC2 instances?
- Need to make sure that Lambda@Edge would be reachable with the same latency or better than EC2. Have any official docs to prove this?
Thanks
amazon-web-services amazon-ec2 aws-lambda aws-lambda-edge
add a comment |
Currently, I have built an application on EC2 instances in multiple regions. The problems are when one instance per region need to patch/maintain, and we need more effort to handle if something fails.
I decide to use Lambda@Edge instead of EC2 and question is:
- Lambda@Edge is better than these EC2 instances?
- Need to make sure that Lambda@Edge would be reachable with the same latency or better than EC2. Have any official docs to prove this?
Thanks
amazon-web-services amazon-ec2 aws-lambda aws-lambda-edge
Currently, I have built an application on EC2 instances in multiple regions. The problems are when one instance per region need to patch/maintain, and we need more effort to handle if something fails.
I decide to use Lambda@Edge instead of EC2 and question is:
- Lambda@Edge is better than these EC2 instances?
- Need to make sure that Lambda@Edge would be reachable with the same latency or better than EC2. Have any official docs to prove this?
Thanks
amazon-web-services amazon-ec2 aws-lambda aws-lambda-edge
amazon-web-services amazon-ec2 aws-lambda aws-lambda-edge
asked Nov 14 '18 at 4:07
Manh NguyenManh Nguyen
82
82
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
If the issue you're facing is one of patching and maintenance of instances then yes, Lambda or Lambda@Edge will absolutely remove that issue.
If the issue is latency and you want to keep your instances you could create an Amazon Cloudfront Distribution that would go in front of your instances and serve cached content to your users - that might be the easiest way to start out.
Lambda@Edge would have the same latency as Cloudfront. Lambda functions that are deployed to CloudFront edge locations have a couple of limitations.
Thanks. But have any related docs to describes it? Ex: 1. <30ms request processing time 2. <10 ms latency from worldwide users
– Manh Nguyen
Nov 14 '18 at 6:51
@ManhNguyen you can't really guarantee latency since the client plays a part in that. I don't think any CDN can guarantee latency like that. I really doubt you'll get <10ms latency worldwide. You can see the page here as an example of CDN endpoint latency: s3-accelerate-speedtest.s3-accelerate.amazonaws.com/en/… In terms of request processing time yes <30ms to pass it off to your lambda function but the time after that depends on how long your function takes. Serving directly from the cache instead of invoking a lambda will certainly complete in <30ms.
– Randall Hunt
Nov 14 '18 at 9:59
you can see a quick test here: cloudharmony.com/speedtest-for-aws:cloudfront
– Randall Hunt
Nov 14 '18 at 10:02
add a comment |
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',
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%2fstackoverflow.com%2fquestions%2f53293064%2flambdaedge-and-aws-ec2-latency-comparison%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
If the issue you're facing is one of patching and maintenance of instances then yes, Lambda or Lambda@Edge will absolutely remove that issue.
If the issue is latency and you want to keep your instances you could create an Amazon Cloudfront Distribution that would go in front of your instances and serve cached content to your users - that might be the easiest way to start out.
Lambda@Edge would have the same latency as Cloudfront. Lambda functions that are deployed to CloudFront edge locations have a couple of limitations.
Thanks. But have any related docs to describes it? Ex: 1. <30ms request processing time 2. <10 ms latency from worldwide users
– Manh Nguyen
Nov 14 '18 at 6:51
@ManhNguyen you can't really guarantee latency since the client plays a part in that. I don't think any CDN can guarantee latency like that. I really doubt you'll get <10ms latency worldwide. You can see the page here as an example of CDN endpoint latency: s3-accelerate-speedtest.s3-accelerate.amazonaws.com/en/… In terms of request processing time yes <30ms to pass it off to your lambda function but the time after that depends on how long your function takes. Serving directly from the cache instead of invoking a lambda will certainly complete in <30ms.
– Randall Hunt
Nov 14 '18 at 9:59
you can see a quick test here: cloudharmony.com/speedtest-for-aws:cloudfront
– Randall Hunt
Nov 14 '18 at 10:02
add a comment |
If the issue you're facing is one of patching and maintenance of instances then yes, Lambda or Lambda@Edge will absolutely remove that issue.
If the issue is latency and you want to keep your instances you could create an Amazon Cloudfront Distribution that would go in front of your instances and serve cached content to your users - that might be the easiest way to start out.
Lambda@Edge would have the same latency as Cloudfront. Lambda functions that are deployed to CloudFront edge locations have a couple of limitations.
Thanks. But have any related docs to describes it? Ex: 1. <30ms request processing time 2. <10 ms latency from worldwide users
– Manh Nguyen
Nov 14 '18 at 6:51
@ManhNguyen you can't really guarantee latency since the client plays a part in that. I don't think any CDN can guarantee latency like that. I really doubt you'll get <10ms latency worldwide. You can see the page here as an example of CDN endpoint latency: s3-accelerate-speedtest.s3-accelerate.amazonaws.com/en/… In terms of request processing time yes <30ms to pass it off to your lambda function but the time after that depends on how long your function takes. Serving directly from the cache instead of invoking a lambda will certainly complete in <30ms.
– Randall Hunt
Nov 14 '18 at 9:59
you can see a quick test here: cloudharmony.com/speedtest-for-aws:cloudfront
– Randall Hunt
Nov 14 '18 at 10:02
add a comment |
If the issue you're facing is one of patching and maintenance of instances then yes, Lambda or Lambda@Edge will absolutely remove that issue.
If the issue is latency and you want to keep your instances you could create an Amazon Cloudfront Distribution that would go in front of your instances and serve cached content to your users - that might be the easiest way to start out.
Lambda@Edge would have the same latency as Cloudfront. Lambda functions that are deployed to CloudFront edge locations have a couple of limitations.
If the issue you're facing is one of patching and maintenance of instances then yes, Lambda or Lambda@Edge will absolutely remove that issue.
If the issue is latency and you want to keep your instances you could create an Amazon Cloudfront Distribution that would go in front of your instances and serve cached content to your users - that might be the easiest way to start out.
Lambda@Edge would have the same latency as Cloudfront. Lambda functions that are deployed to CloudFront edge locations have a couple of limitations.
edited Nov 21 '18 at 7:13
answered Nov 14 '18 at 5:55
Randall HuntRandall Hunt
7,38942437
7,38942437
Thanks. But have any related docs to describes it? Ex: 1. <30ms request processing time 2. <10 ms latency from worldwide users
– Manh Nguyen
Nov 14 '18 at 6:51
@ManhNguyen you can't really guarantee latency since the client plays a part in that. I don't think any CDN can guarantee latency like that. I really doubt you'll get <10ms latency worldwide. You can see the page here as an example of CDN endpoint latency: s3-accelerate-speedtest.s3-accelerate.amazonaws.com/en/… In terms of request processing time yes <30ms to pass it off to your lambda function but the time after that depends on how long your function takes. Serving directly from the cache instead of invoking a lambda will certainly complete in <30ms.
– Randall Hunt
Nov 14 '18 at 9:59
you can see a quick test here: cloudharmony.com/speedtest-for-aws:cloudfront
– Randall Hunt
Nov 14 '18 at 10:02
add a comment |
Thanks. But have any related docs to describes it? Ex: 1. <30ms request processing time 2. <10 ms latency from worldwide users
– Manh Nguyen
Nov 14 '18 at 6:51
@ManhNguyen you can't really guarantee latency since the client plays a part in that. I don't think any CDN can guarantee latency like that. I really doubt you'll get <10ms latency worldwide. You can see the page here as an example of CDN endpoint latency: s3-accelerate-speedtest.s3-accelerate.amazonaws.com/en/… In terms of request processing time yes <30ms to pass it off to your lambda function but the time after that depends on how long your function takes. Serving directly from the cache instead of invoking a lambda will certainly complete in <30ms.
– Randall Hunt
Nov 14 '18 at 9:59
you can see a quick test here: cloudharmony.com/speedtest-for-aws:cloudfront
– Randall Hunt
Nov 14 '18 at 10:02
Thanks. But have any related docs to describes it? Ex: 1. <30ms request processing time 2. <10 ms latency from worldwide users
– Manh Nguyen
Nov 14 '18 at 6:51
Thanks. But have any related docs to describes it? Ex: 1. <30ms request processing time 2. <10 ms latency from worldwide users
– Manh Nguyen
Nov 14 '18 at 6:51
@ManhNguyen you can't really guarantee latency since the client plays a part in that. I don't think any CDN can guarantee latency like that. I really doubt you'll get <10ms latency worldwide. You can see the page here as an example of CDN endpoint latency: s3-accelerate-speedtest.s3-accelerate.amazonaws.com/en/… In terms of request processing time yes <30ms to pass it off to your lambda function but the time after that depends on how long your function takes. Serving directly from the cache instead of invoking a lambda will certainly complete in <30ms.
– Randall Hunt
Nov 14 '18 at 9:59
@ManhNguyen you can't really guarantee latency since the client plays a part in that. I don't think any CDN can guarantee latency like that. I really doubt you'll get <10ms latency worldwide. You can see the page here as an example of CDN endpoint latency: s3-accelerate-speedtest.s3-accelerate.amazonaws.com/en/… In terms of request processing time yes <30ms to pass it off to your lambda function but the time after that depends on how long your function takes. Serving directly from the cache instead of invoking a lambda will certainly complete in <30ms.
– Randall Hunt
Nov 14 '18 at 9:59
you can see a quick test here: cloudharmony.com/speedtest-for-aws:cloudfront
– Randall Hunt
Nov 14 '18 at 10:02
you can see a quick test here: cloudharmony.com/speedtest-for-aws:cloudfront
– Randall Hunt
Nov 14 '18 at 10:02
add a comment |
Thanks for contributing an answer to Stack Overflow!
- 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%2fstackoverflow.com%2fquestions%2f53293064%2flambdaedge-and-aws-ec2-latency-comparison%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