Scaling Vercel Function instances & tRPC
On the "Functions" tab in my project I have
api/trpc/[trpc]
. Would this scale independently of any other edge function I'd create in api
?
For example, if I wanted to create an edge function to handle OpenAI calls and I knew it would possibly have longer latency would it scale to x instances independent of the "monolith" tRPC function which is just CRUD?4 Replies
Solution
each api call spawns a lambda either way
just running as a nextjs api route is good enough
Awesome, so even though all routes appear as
api/trpc/[trpc]
in Vercel Functions, theyre still spawning their own instances, thanks again!aws lambdas at their core, just spawn more lambdas for the vertical scaling