Vercel fluid, recommended connection strategy from Node.js?
Our team has adopted Vercel fluid compute. We are now in the process of migrating from MongoDB to Neon.
What is the recommended way to connect to Neon from a Node.js application running in serverless fluid functions?
I have found https://github.com/neondatabase/serverless - but is this package optimal for fluid? I would expect TCP to be faster and a better fit?
Also, where in the Neon web-application can I see open tickets?
Thanks 😎
GitHub
GitHub - neondatabase/serverless: Connect to Neon PostgreSQL from s...
Connect to Neon PostgreSQL from serverless/worker/edge functions - neondatabase/serverless
2 Replies
xenial-black•5mo ago
@alexbjorlig
- For Node.js with Neon on Vercel, you'd want to stick to use fetch requests (default of Neon's serverless driver). An example can be found here. If in case you have long running transactions, I'd just create an endpoint for that talks over WS but rest, on HTTP.
- What do you mean by open tickets?
stormy-goldOP•4mo ago
Ok, we will try to switch to the sreverless driver today.
Regarding tickets, I mean open support tickets with Neon?