[CONJS-81] Improved Pooling Created: 2019-06-06  Updated: 2019-10-11  Resolved: 2019-10-11

Status: Closed
Project: MariaDB Connector/node.js
Component/s: pool
Affects Version/s: None
Fix Version/s: N/A

Type: Task Priority: Major
Reporter: John Assignee: Diego Dupin
Resolution: Won't Do Votes: 0
Labels: backlog


 Description   

Read that knex.js and supposedly other DB drivers are switching over to tarn.js for their resource pooling.
https://www.npmjs.com/package/tarn (Notice the surge in weekly downloads)

Could this potentially be more beneficial for pooling?



 Comments   
Comment by Diego Dupin [ 2019-10-11 ]

nice project and well written.

Pool offer the same functionalities ( which is nice, mysql and mysql2 doesn't ! ).
But there is no option not in internal pool, and internal pool has some additional benefits :

  • reliability: when a connection is released, transaction state is checked ( completely reset even )
  • efficiency: validation is on or off. default internal pool won't validate connection if used a few millisecond before, and that change drastically the time of one query. ( and a marginal thing : query will create a double promise when a single one if enough)

So not this time, but the comparison is always nice (and coding style is better, give me some ideas for improving design)

Generated at Thu Feb 08 03:22:37 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.