prisma latency on the edge
Hi guys, I saw the latest video from theo about the latency of using an orm like prima vs other types without the crap of query binding with rust ecc that slow down the performance. BUT in this case he talked about an edge runtime, what about a static region for the server and also for the DB? The req time would also be that slow?
8 Replies
I’m asking this question because I have to build an e-commerce site and 99% of the clients are from the same region so I don't know if it's worth it to use another orm relearn something
Or it could be somewhat acceptable
Lambdas and edge are two different "products" per se
Edge is a fast, and very limited runtime, to execute code/request as fast as possible
So you are very limited on that, and Prisma as a whole makes it very hard
Without taking consideration about tcp connections and such
Lambdas issues is downloading, executing, plus possible cold starts
If you have a constant running application, Prisma tax is cheaper
If you really want to do something on the edge, the best way possible, do not use Prisma as a tool for making queries
You can use Prisma for migrations + types and kysely for making que queries as example
Ok thx 🙂
Did u try Drizzle ?
i was trying to
but the prisma combo is not supported yet
i should redo the architecture of the zod schemas (since the get generated from prisma) for the trpc procedures
does prisma proxy or prisma accelerate help with the queryies pentalty and time?
I have to read some articles about it
Btw prisma accelarate is not free and it’s in early access, and we are talking about cache not real time data
What about using the same region for the db and the server
The latency would be less
And considerable ‘usable’
You can test and see if it is good enough for you