snowflake-connector-nodejs
snowflake-connector-nodejs copied to clipboard
Connection Pool for snowflake connection
I tried to look up but I didn't find any good resource that with info on how to build a connection pool using snowflake nodejs driver. Any pointer are appreciated
Also is there a way to reduce the connection live time
+1 To this question. Nodejs driver connection latency is really abysmal. Seeing 5-8 seconds for a connection, and under 1 second for the query. A connection pool would help, and not terribly hard to build, but reducing the connection latency would go a long way to improving the usability.
Wondering if there are any updates on connection pools with the nodejs driver?
Is there any update w.r.t to connection pools with the nodejs driver. Is this feature going to come in upcoming releases?
Agreed, this would be extremely useful for us.
Though it would be nice to have built in support for connection pooling, you should be able to set up your own connection pool that works with the snowflake nodejs driver fairly easily using https://www.npmjs.com/package/generic-pool
I've written a small article on this. Please clap if you find it helpful! Creating a connection pool for Snowflake
For those looking for this feature, check out: snowflake-pool
It's a wrapper that creates a connection pool using generic-pool under the covers. I went ahead and published it as an NPM package for those who are interested. It also makes use of the snowflake-promise API which I find a bit more elegant than the promise-based SDK.
@Naruto248 Please have a look and see if it would be useful for you as well. Also, if you wanted to make any contributions, just let me know. Happy to include your experience here as well.
I just found out that connection pooling has been natively supported by snowflake-sdk
: https://github.com/snowflakedb/snowflake-connector-nodejs/pull/186. I haven't found any public documentation for this feature though.
Update: found this doc section https://docs.snowflake.com/en/user-guide/nodejs-driver-use.html#creating-a-connection-pool
I just found out that connection pooling has been natively supported by
snowflake-sdk
: #186. I haven't found any public documentation for this feature though. Update: found this doc section https://docs.snowflake.com/en/user-guide/nodejs-driver-use.html#creating-a-connection-pool
Seems like it uses a callback interface!?! What year is this? Snowflake never ceases to amaze.
connection pool support released with v1.6.3, thank you for your patience