The meaning of the Java netty option (channeloption.so_backlog,1024)

Source: Internet
Author: User

Channeloption.so_backlog, 1024x768

The backlog is used to construct a service-side socket ServerSocket object that identifies the maximum length of a queue that is used to temporarily hold a request that has completed three handshakes when the server requests a processing thread full. If you do not set or set a value that is less than 1,java, the default value of 50 will be used.


Channeloption.so_keepalive, True


Whether to enable the heartbeat keepalive mechanism. This mechanism is activated when the TCP sockets on both sides establish a connection (that is, all enter the established state) and there is no data transfer on the upper layer for two hours or so.


Channeloption.tcp_nodelay, True


In the TCP/IP protocol, no matter how much data is sent, always precede the data with the protocol header, and the other side receives the data, also need to send an ACK to indicate confirmation. To make the best use of network bandwidth, TCP always wants to send enough data as large as possible. This involves an algorithm called Nagle, which is designed to send large chunks of data as much as possible to avoid flooding the network with many small chunks of data.

Tcp_nodelay is used to enable or about the Nagle algorithm. If high real-time is required, send the data as soon as it is sent, set this option to true to turn off the Nagle algorithm, and if you want to reduce the number of sends to reduce network interaction, set to False, etc., and then send the cumulative size. The default is False.


This article is from the "11828641" blog, please be sure to keep this source http://11838641.blog.51cto.com/11828641/1864664

The meaning of the Java netty option (channeloption.so_backlog,1024)

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.