You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/api/net.md
+15-2Lines changed: 15 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -603,12 +603,25 @@ changes:
603
603
604
604
* {integer}
605
605
606
-
Set this property to reject connections when the server's connection count gets
607
-
high.
606
+
When the number of connections reaches the `server.maxConnections` threshold:
607
+
608
+
1. If the process is not running in cluster mode, Node.js will close the connection.
609
+
610
+
2. If the process is running in cluster mode, Node.js will, by default, route the connection to another worker process. To close the connection instead, set \[`server.dropMaxConnection`]\[] to `true`.
608
611
609
612
It is not recommended to use this option once a socket has been sent to a child
610
613
with [`child_process.fork()`][].
611
614
615
+
### `server.dropMaxConnection`
616
+
617
+
<!-- YAML
618
+
added: REPLACEME
619
+
-->
620
+
621
+
* {boolean}
622
+
623
+
Set this property to `true` to begin closing connections once the number of connections reaches the \[`server.maxConnections`]\[] threshold. This setting is only effective in cluster mode.
0 commit comments