When the client and Redis server are connected, what happens when the ephemeral TCP port is not sufficient?

Source: Internet
Author: User
Tags redis server
  1. The port on the server is always limited, if the Redis server is allocating a zero port in case of large concurrency

2.im service in the server is how to allocate the connection port, a large number of connections, if the temporary port is not enough, whether the other connection is not connected, or the first allocation of a false port, and so on when the implementation of the redistribution

Reply content:

  1. The port on the server is always limited, if the Redis server is allocating a zero port in case of large concurrency

2.im service in the server is how to allocate the connection port, a large number of connections, if the temporary port is not enough, whether the other connection is not connected, or the first allocation of a false port, and so on when the implementation of the redistribution

Redis Socket.

This is the case, but in general the single command of Redis takes a short time, with few clients being able to take up the connection without releasing it (the connection pool is an exception, but good), while Redis itself can limit the number of client connections, the default is 10000, and the port range is 1024~ 32768, the number is sufficient, while a single process can open the number of files is also limited, the basic will not exceed the number of ports.
Personally feel that more than the number of ports is still very small, but if this problem occurs in the TCP Connect () error, is a kernel error, the client can not connect to the server at all, so this time the service side can not be allocated false port this processing it.

Provides an article: http://blog.csdn.net/guowake/article/details/6615728

  • Related Article

    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.