Why is my rails app faster than t3?

for serving up some basic json it seems to be at least double in speed

there are large differences in infra, im more just curious which parts specifically make t3 app slower for a basic json endpoint

basically using the same DB instance i retrieve a user info endpoint

differences are mainly this i guess as follows

rails:
runs on powerful ec2 instance
runs standard activerecord query
ruby
~30->40ms
us-east AWS

t3 stack:
prisma
vercel serverless
js/ts
cold start about ~140ms
settles in around ~70ms-> 90ms
wherever vercel serverless functions run

does infra really make that much of a difference? or is it something else? location maybe?
Was this page helpful?