[MEDIUM] implement "rate-limit sessions" for the frontend
The new "rate-limit sessions" statement sets a limit on the number of
new connections per second on the frontend. As it is extremely accurate
(about 0.1%), it is efficient at limiting resource abuse or DoS.
diff --git a/include/types/proxy.h b/include/types/proxy.h
index 87b6f14..432b27b 100644
--- a/include/types/proxy.h
+++ b/include/types/proxy.h
@@ -226,6 +226,7 @@
unsigned int cum_feconn, cum_beconn; /* cumulated number of processed sessions */
unsigned int cum_lbconn; /* cumulated number of sessions processed by load balancing */
unsigned int maxconn; /* max # of active sessions on the frontend */
+ unsigned int fe_maxsps; /* max # of new sessions per second on the frontend */
unsigned int fullconn; /* #conns on backend above which servers are used at full load */
struct in_addr except_net, except_mask; /* don't x-forward-for for this address. FIXME: should support IPv6 */
char *fwdfor_hdr_name; /* header to use - default: "x-forwarded-for" */