Doing some profiling and curious what latencies ot...
# random
t
Doing some profiling and curious what latencies other people are seeing. If you have a second can you hit this endpoint: https://2270mgssc9.execute-api.us-east-2.amazonaws.com/debug/scrap Let me know how fast it loads + where you're located. I'm seeing 50-60ms from NY
a
From Mumbai, India
@Ross Coundon what’s this tool that analyses the request process?
r
Just postman
Just hover over the response time
a
oh, okay. Haven’t checked postman in a while. 😅
s
From UK London:
t
woah what's that tool
s
https://github.com/nakabonne/ali It seems super good, been using for around 1 month
t
nice ty
o
From Palo Alto, CA
t
Confirming through this that API gateway is slower than I want 😞
s
Is this a HTTP API or an edge optimized rest API?
t
HTTP Api
s
Would be curious to see how a REST edge compares. Though, I think latency might be the same, you just get better bandwidth by hopping on the AWS network at the nearest point of presence 🤔
t
From NYC I'm getting 45ms on average. Which isn't terrible but for something simple like this I'd love to see sub 20ms. Also recently learned DynamoDB reads are an order of magnitude slower than I expected so that's adding a lot
s
from Chicago
t
damn I'd think chicago to ohio would be faster
s
subsequent calls are in the range of 23-32ms
42ms, 26ms, 28ms, 40ms, 27ms, 105ms(!)
t
got it, more reasonable
a
The problem is TCP and SSL handshake. This is one of the primary reasons why I’m looking into ECS with Fargate. It might be more expensive but that’s a price I’m ready to pay for uber performance.
t
What would your setup be exactly? Fargate invoking lambdas? Or just doing everything in a fargate container
Been thinking about experimenting with this as well: https://github.com/markusahlstrand/cloudworker-proxy#lambda
a
Everything in a ecs + fargate container triggered by ELB + AppMesh. I might even replicate the architecture in multiple regions and add Cloudfront in front of the ELB to proxy requests to the nearest region.
Yes, I remember you or someone sharing this here. It’s an interesting way to replace the API Gateway.
t
I was seeing < 20ms with ECS talking to postgres for a basic query
Seems impossible to get close to that with apig + lambda + dynamo
a
yeah, the connection needs to be created every time, that’s the problem.
m
From Brisbane, Australia
o
Yeah I started experimenting with serving graphql over websockets with APIG last year to see if that would fix it, came across this blog post and library for it this morning
t
I just moved away from doing everything over ws back to rest to use apigateway 😅
But I use jsonapi which I can convert to ws reqs fairly easily, interesting workaround
g
From Auckland, New Zealand