MEDIUM: servers: Split the connections into idle, safe, and available.
Revamp the server connection lists. We know have 3 lists :
- idle_conns, which contains idling connections
- safe_conns, which contains idling connections that are safe to use even
for the first request
- available_conns, which contains connections that are not idling, but can
still accept new streams (those are HTTP/2 or fastcgi, and are always
considered safe).
diff --git a/include/types/server.h b/include/types/server.h
index 0257f58..c29fd18 100644
--- a/include/types/server.h
+++ b/include/types/server.h
@@ -222,9 +222,9 @@
struct eb_root pendconns; /* pending connections */
struct list actconns; /* active connections */
- struct list *idle_conns; /* sharable idle connections attached or not to a stream interface */
- struct list *safe_conns; /* safe idle connections attached to stream interfaces, shared */
- struct mt_list *idle_orphan_conns; /* Orphan connections idling */
+ struct mt_list *idle_conns; /* sharable idle connections*/
+ struct mt_list *safe_conns; /* safe idle connections */
+ struct list *available_conns; /* Connection in used, but with still new streams available */
unsigned int pool_purge_delay; /* Delay before starting to purge the idle conns pool */
unsigned int max_idle_conns; /* Max number of connection allowed in the orphan connections list */
unsigned int curr_idle_conns; /* Current number of orphan idling connections */