The role of database connection pool C3p0, druid

Database connection pool study notes (a): Introduce the principle of common connection pool + Introduction

  1. Data source:
    database connection pool is responsible for the distribution, management and release of database connections, which allows an application to reuse an existing database connection, rather than re-establish a
  2. Why use a database connection pool
    database connection is a critical resource is limited and expensive, which is in a multi-user web application was especially prominent. A database connection object corresponds to one physical database connections, each operation to open a physical connection, are used up to close the connection, resulting in poor performance of such systems. Database connection pool solution is based on when the application starts sufficient database connection, and say these are connected to form a connection pool (simply say: put the database connection object is a lot of semi-finished products in a "pool" inside), by the application program dynamically to apply to the connection pool, use and release . For connections in the pool is more than the number of connections concurrent requests , should be queued in the request queue . The application and utilization of connections in the pool may dynamically increase or decrease the number of connections in the pool. Connection pooling as much as possible to reuse the memory consumption of resources, significant savings in memory and improved server efficiency serve to support more customer service. By using a connection pool, the program will greatly enhance the operational efficiency at the same time, we can monitor the number of database connections through its own management mechanism, usage and other information.
    druid's wiki
Published 93 original articles · won praise 2 · Views 1077

Guess you like

Origin blog.csdn.net/qq_43641886/article/details/104370380