3 ms·
I measured the actual latency over the weekend [0] [1] Bare ec2: 15ms Lambda via API Gateway: 276ms [0]: http://prerender.cloud/lambda-latency http://prerend
by jotto 10y ago
I measured the actual latency over the weekend [0] [1]
Bare ec2: 15ms
Lambda via API Gateway: 276ms
[0]: http://prerender.cloud/lambda-latency http://prerender.cloud/lambda-latency
[1]: https://news.ycombinator.com/item?id=12678011 https://news.ycombinator.com/item?id=12678011
- jomamaxx 10y agoThanks for the data points. I understand that Lambdas are 'relatively quick' when they are 'hot' - which is my crude metaphor for 'up and running'. The issue is, if the Lambda has not been in use for some time (seconds, minutes?), then the 'first call' can have quite a bit of latency - often up to 5 seconds - which killed it for us. There is no way we could reasonably deploy a service wherein customer would have to wait an additional 5 seconds for a reaction in most use cases. So close, yet so far. This was about 18 months ago. If you have some data that addresses this specific artifact - then that would be great. Possibly things have changed in 18 months. And I'm not a hater, to us AWS is the best thing since sliced bread.
- jotto 10y agoActually I was making the point that they are not "relatively quick" even when hot: close to 300ms, almost entirely due to the API Gateway. (I even measured API Gateway on top of bare ec2 and the same penalty applies). Lambda itself is fairly quick (~75ms), but API Gateway needs some work.
- jomamaxx 10y agoYeah, I tend to agree, I just didn't want to be a total jerkoff on the thread. 250ms we can live with for many things, but not 5x. But yes - it should be under 50ms at all times I think for people to start taking it seriously.
- brianwawok 10y agoThe 5 second cold request thing is what GAE had 5 years ago. Eventually they gave up trying to make startup faster and allowed a paid plan to stay always hot. Which was good, but then also moving you much closer to a managed server (vs a pure pay as you use thing)
- x_foo_x 10y agoNo way you're getting 15 ms on a TLS connection over the internet. I've set up similar pings with API Gateway and API Gateway -> Lambda, and it seems with the APIGW the TLS connection is the most expensive part. On an established connection I've seen 10 ms overhead which is not great but worth the value in some cases.