Multi-node Connection Pool Design Ideas

Source: Internet
Author: User

If we do not write network communication applications, we believe that there is less contact with the connection pool. In fact, we often use the connection pool function, especially when using ado.net to access the database. the main function of the connection pool is to reuse n connections, instead of creating a connection every time you use it. By reducing connection creation, you can achieve a better network throughput.

The connection pool used in ado.net is for a single server, but in some cases the application is relatively complex, the logic is distributed on several servers, and the web distribution calls these logical server applications.

In this case, if the connection pool is only for a single server, it will be much more troublesome for the Web to maintain the connection pool of different servers. For example, if a node has an exception, we also need to discard abnormal node rounds. After the server returns to normal, we also need to consider a series of issues such as node back-to-queue at the call layer. to handle the preceding problems conveniently, add a multi-node connection pool in beetle to handle this situation.

When a node socket encounters a network exception, it can be determined that there is a problem with the cited node. During the round robin process, the pool determines whether to discard node Round Robin Based on the node status. you can check the node after the specified interval for the node recovery pool. If the node can be connected normally, the node is restored.

The above are general design ideas,CodeThis is only part of the process. If you have any experience or interest in this field, you can leave your comments and ideas empty.

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.