How can I make tRPC+NextJs APIs faster? (db and functions region is already same)

Ppranjal4/6/2023
Hi, I have migrated my website backend (https://clubofcoders.com) from NestJs + Prisma + Cloud Run to tRPC + Prisma + NextJs serverless functions. But I am not quite happy with the performance (screenshot is attached).

The requests are taking up to five sec on first loads and 2/3 secs. afterward; I am using the same region for serverless functions and the database (planetscale). Hosted on vercel.

Any ideas I can improve this?
UUUnknown User4/12/2023
2 Messages Not Public
Sign In & Join Server To View
Llukutis4/13/2023
I can also say that Vercel has been surprisingly less performant than hosting it myself on digital ocean
UUUnknown User4/13/2023
Message Not Public
Sign In & Join Server To View
Ppranjal4/17/2023
I have figured this out, now I have deployed it on aws using a server less server. Fargate and stuff, using a service flight control hq, they have built a platform where we can deploy our applications without worrying about all aws complex stuff.

Now website is 10 times faster 🚀