How does connection limit works on the serverless driver?
hello, I am wondering when using the neon serverless driver, does it share the same connection limit with the "default connection limit", or Neon has an additional layer of pooling on top of it to automatically handle it?
3 Replies
fascinating-indigo•2y ago
.I do not believe that the serverless driver has pooling. It uses HTTP underneath
unwilling-turquoise•2y ago
i think it depends on the connection URL you have provided to the driver. if it's with -pooler in the URL, then no connection limit.
conscious-sapphire•2y ago
^ and the pooled endpoint has the following settings:
So while the max connections is 10k, it's still possible to cap out a single user as
default_pool_size will limit to 64 connections per user per database.
Bear in mind that max_connections is set by your minimum CU size (or base size if you are not scaling).
For example a .25CU will have 100 max connections, which you can cap out with 2 accounts through the pooler.
It's ~100 per GB of RAM.
So, if you want to burst a bunch of connections:
* Set your base size appropriately
* Use multiple accounts with the pooler.