questdb / nodejs-questdb-client

QuestDB Node.js Client
35 stars 8 forks source link

Add connection pool #25

Open puzpuzpuz opened 5 months ago

puzpuzpuz commented 5 months ago

Many of our users write to QuestDB as a part of HTTP request processing. The simplest way to do that is to open a new connection on each HTTP request, but this has high overhead and also puts no limit on the number of active connections. We should implement a connection pool similar to the pg's one: https://github.com/brianc/node-postgres/blob/b03c071d2d15af259e1e008e9628191c865e58fa/packages/pg-pool/index.js