aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2016-11-15 13:27:36 +0200
committerLoïc Hoguin <[email protected]>2016-11-15 13:29:30 +0200
commit9d20868fea27da833cad1bcd6da7e93fb2809bea (patch)
tree1adc172f34cf22e9c81abcdece714867fad46ce0
parent5c6cedf9926c3106f558113524f91a8539eef337 (diff)
downloadranch-9d20868fea27da833cad1bcd6da7e93fb2809bea.tar.gz
ranch-9d20868fea27da833cad1bcd6da7e93fb2809bea.tar.bz2
ranch-9d20868fea27da833cad1bcd6da7e93fb2809bea.zip
Clarify max_connections + NbAcceptors + backlog in the guide
-rw-r--r--doc/src/guide/listeners.asciidoc10
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/src/guide/listeners.asciidoc b/doc/src/guide/listeners.asciidoc
index a776a58..7a5bdb2 100644
--- a/doc/src/guide/listeners.asciidoc
+++ b/doc/src/guide/listeners.asciidoc
@@ -174,6 +174,16 @@ You can disable this limit by setting its value to the atom `infinity`.
echo_protocol, []
).
+The maximum number of connections is a soft limit. In practice, it
+can reach `max_connections` + the number of acceptors.
+
+When the maximum number of connections is reached, Ranch will stop
+accepting connections. This will not result in further connections
+being rejected, as the kernel option allows queueing incoming
+connections. The size of this queue is determined by the `backlog`
+option and defaults to 1024. Ranch does not know about the number
+of connections that are in the backlog.
+
You may not always want connections to be counted when checking for
`max_connections`. For example you might have a protocol where both
short-lived and long-lived connections are possible. If the long-lived