javahttp服务器的系统默认积压值对应的值是多少?

What is the corresponding value of the system default backlog value at java http server?

https://docs.oracle.com/javase/8/docs/jre/api/net/httpserver/spec/com/sun/net/httpserver/HttpServer.html

backlog - 套接字积压。如果此值小于或等于零,则使用系统默认值。

系统默认值对应的值是多少?

它依赖于操作系统。对于某些操作系统,它是一个可以由系统管理员配置的设置。

例如,man 2 listen for Linux says:

Since Linux 5.4, the default in this file is 4096; in earlier kernels, the default value is 128. In kernels before 2.4.25, this limit was a hard coded value, SOMAXCONN, with the value 128.

相比之下,在 Windows 上 backlog 参数的 description 表示:

The maximum length of the queue of pending connections. If set to SOMAXCONN, the underlying service provider responsible for sockets will set the backlog to a maximum reasonable value.