-
Notifications
You must be signed in to change notification settings - Fork 0
concept: connectionLess
David Liu edited this page May 14, 2025
·
19 revisions
Challenge of Serverless: Database Connections
For example, with PlanetScale/Supabase/Fauna, you can consider them "connectionless" - connecting pooling isn't an issue, as database queries are made over HTTP! They provide a database as an API. -- A planetscale community discussion
The data revolution along with serverless app revolution, is ConnectionLess
- aka. Data API
-
PlanetScale
-
The main advantage of our database-js driver is that it can be used in serverless environments that don't allow traditional database connections.
-
- Supabase
- NeonDB
- Deprecated: MongoDB Atlas Data API
- Azure Cosmos
- upstash
Add-ons
- A list of software that turns your database into a REST/GraphQL API
-
serverless-mysql- It still requires you to call
await mysql.end()to release connection -
client-side solution: unexpected termination of client still leave server-side zombie connection.
- It still requires you to call
-
RESTHeart
- a Java backend server that provides REST, GraphQL, and WebSocket APIs
- only support MongoDB as data storage.
2 tiers connection limit
- When a database reaches the soft-limit we start to terminate the idle connections. We continue to accept new connection requests until the hard-limit is reached. If the database reaches the hard limit then we start rejecting new connections.
- Similar to AWS Lambda approach