Meaning of using connection pooling

Source: Internet
Author: User
Tags connection pooling

I always say this: Not all applications have to use a link pool, the general light of the connection pool will reduce efficiency, how to link, completely look at your system bottlenecks.

A common link process, because connection generally use local methods, these initialization is very consuming system resources. Link initialization, execute SQL statement, close link in an ordinary connection the total resource allocation should be 65,10,25, not so precise, Just to show that the actual execution of the language in a single link consumes very little resources.

If your server has a single link for every 5 minutes on average, you can use only this common link, because the whole connection process is only 0.0 seconds away, you don't have to let the connection pool consume resources for the remaining 4.9 seconds, but if there are 10 links per second, then the initial resources consumed by the common connection are very high. Use a connection pool to show its advantages.

So what is the way to connect, completely according to your application, but also to carry out a real concurrency simulation test. Do not see what the book says in a good way to believe that the real framework of a platform is an art rather than just a technology, Try to find the best combination in a variety of comprehensive tests. Many traps are not what technology can find. For example, you look at your JVM and you have a lot of free resources, but the system has crashed. Because like the connection initialization this resource consumption in the local method, the JVM is not reflected, but in the same physical memory, There are many such traps, and it is important to experience and test!

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.