) Image metaphor for database connection pools

Source: Internet
Author: User
The connection pool is a leasing company that stores products across the country in your community.

You don't have to go to your own manufacturer to use things. You just need to rent it from the leasing company. If you have used it, remember to go back. The tenant's warehouse is limited!
If there are too many people to rent, you have to add a warehouse.
If there are too many idle products in the warehouse for a long time, you have to narrow down the warehouse.

Advantages,
1. You can quickly get what you need.
2. All items can be reused.
3 manufacturers can reduce transportation costs

Corresponding connection pool
You need to connect to the database without having to get it from the database. You can rent it from the connection pool. After you have used it, remember to go back. Because the connection pool has the maximum allowed connection limit!
If you have too many users and need more database connections at the same time, you have to increase the maximum number of connections.
If there are too many connections to the idle database for a long time, you need to reduce the maximum number of connections or the allowed number of idle and initial connections.

Advantages,
1. You can quickly get the connection you need.
2. All database connections can be reused.
3 can reduce the burden on the database. Creating a new database connection consumes a lot of system resources.

Tip:
What else will happen if you forget to lease something? Because there is no available connection in the connection pool, you can only apply for more connections,
If the maximum number of connections is exceeded, or the maximum number of connections allowed by the database, the system waits and the system fails to run.

Source: Old zizhu quotations» image metaphor for database connection pools

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.