Is your 'Bare EC2' over SSL? I've used Apex Ping as well (btw it runs on Lambda), and it seems they open a new connection on each ping.
Getting 15 ms latency on a brand new TLS connection is nearly impossible over the internet. If you actually check the latency breakdown on your Ping, you'll see the TLS handshake is dominating the API Gateway -> EC2 request.
I'm all for this type of analysis, but too often it isn't apples to apples.
4 comments
[ 3.3 ms ] story [ 18.6 ms ] threadand curiosity as to how far Lambda is from being used for anything latency sensitive - but it turns out Lambda isn't the slow part - it's API Gateway.
Getting 15 ms latency on a brand new TLS connection is nearly impossible over the internet. If you actually check the latency breakdown on your Ping, you'll see the TLS handshake is dominating the API Gateway -> EC2 request.
I'm all for this type of analysis, but too often it isn't apples to apples.
My intention was merely to point out the difference between bare/raw HTTP on ec2 vs API Gateway (which is only HTTPS).
But this comparison is in fact almost useless because the world is moving to HTTPS everywhere.