K
K
kiloper2016-04-06 18:08:21
MySQL
kiloper, 2016-04-06 18:08:21

What is MySQL NodeJS Connection Pooling?

Hello, how is the connection pool to the Mysql database in NodeJS different from a simple connection?
var connection = mysql.createConnection(connectionString);
from
varpool = mysql.createPool(...);

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vitaly Vitrenko, 2016-04-06
@Vestail

I don’t know how it is in NodeJS, but in general the connection pool is just a cache. Instead of each race connecting and disconnecting from the database, they make several connections at once and throw them into the pool (for example, it can be some kind of synchronized queue). If necessary, the thread pulls a connection from the pool, performs some operations with the database, and throws it back. Thus, we get a performance boost.

S
superivankorolev, 2016-04-06
@superivankorolev

Restores the connection when it is broken and they say nested queries do not work)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question