serverless mongodb cold start
Unanswered
Waterman posted this in #help-forum
WatermanOP
Hello, is it possible to run my mongoose connect just when I enter my page so I don't have to connect once I want to fetch live data from my serverless database, is the correct approach to this just awaiting my function mongooseconnect() on the first page?
1 Reply
Serverless instances are ephemeral and short-lived, so connection pooling doesn’t work as self-hosted platforms. besides Vercel Edge runtime doesn’t support TCP layer connection, Vercel provides Websocket, which connects DB side connection pooling.