Home > database >  The database with the connection pool, really necessary?
The database with the connection pool, really necessary?

Time:10-26

Today saw a lot of posts about the connection pool, the nature of the connection pool is a program that keeps multiple database connections, benefit is
1, fast connection, doubt: I wrote the program directly connect the database can be slower than even the program?
2, to prevent high concurrent database connections overrun error, doubt: connection pool also has the maximum number of connections, and must be less than or equal to the number of database connections, the wrong don't have to complain?
3, the above solution, such as connection pool can be used again after connecting transfinite queue scheme suspended connection, until some resources vacated, doubt: I wrote the program can also connect error waiting until it can be connected in a loop,
4, the big question: if the connection pool is really good, why mysql doesn't have a connection pooling mechanism, it is not hard to again?
  • Related