Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use mysql pooling #11

Open
sushitommy opened this issue Aug 6, 2015 · 1 comment
Open

How to use mysql pooling #11

sushitommy opened this issue Aug 6, 2015 · 1 comment

Comments

@sushitommy
Copy link

What's the best way to use the node-mysql pooling functionality with LiveMysql?

@seeekr
Copy link

seeekr commented Apr 11, 2016

From what I understand you don't want to mess with how LiveMysql sets up its own MySQL connections. If you're connecting to MySQL outside of LiveMysql, then just use pooling as you normally would. LiveMysql itself really does not need pooling, otherwise I'm sure the author would already be making use of that (trivially employable) feature. The reason it may not need pooling might be that it knows in advance how many connections it is going to need and that value never changes depending on load or anything else (3 connections, if I understand correctly). And so if it handles loss of connection and reconnect properly, then no pooling is necessary.
Connection pooling is something you want if you need to use connections frequently for a short period of time and then put them back. If you keep using them forever, basically, then pooling itself will provide no benefit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants