Investigate move to edge function
Closed this issue · 0 comments
foolo commented
Investigate if api/batch_update
should be an edge function instead of serverless, see
https://www.prisma.io/blog/database-access-on-the-edge-8F0t1s1BqOJE
For prisma instancing in edge mode, https://www.prisma.io/docs/orm/more/help-and-troubleshooting/help-articles/nextjs-prisma-client-dev-practices is probably also relevant
https://vercel.com/docs/functions/serverless-functions/runtimes#edge
Pricing is based on compute time – You're charged for time processing any requests and not for your function is fetching data. This is ideal for querying databases or AI services that may have longer request times