comparison src/http/v2/ngx_http_v2.h @ 7569:80359395b345

HTTP/2: traffic-based flood detection. With this patch, all traffic over an HTTP/2 connection is counted in the h2c->total_bytes field, and payload traffic is counted in the h2c->payload_bytes field. As long as total traffic is many times larger than payload traffic, we consider this to be a flood.
author Maxim Dounin <mdounin@mdounin.ru>
date Wed, 18 Sep 2019 20:28:12 +0300
parents 45415228990b
children c5840ca2063d
comparison
equal deleted inserted replaced
7568:2e61e4b6bcd9 7569:80359395b345
116 116
117 117
118 struct ngx_http_v2_connection_s { 118 struct ngx_http_v2_connection_s {
119 ngx_connection_t *connection; 119 ngx_connection_t *connection;
120 ngx_http_connection_t *http_connection; 120 ngx_http_connection_t *http_connection;
121
122 off_t total_bytes;
123 off_t payload_bytes;
121 124
122 ngx_uint_t processing; 125 ngx_uint_t processing;
123 ngx_uint_t frames; 126 ngx_uint_t frames;
124 ngx_uint_t idle; 127 ngx_uint_t idle;
125 ngx_uint_t priority_limit; 128 ngx_uint_t priority_limit;