Mercurial > hg > nginx-quic
comparison src/http/modules/ngx_http_upstream_ip_hash_module.c @ 6705:29bf0dbc0a77
Upstream: max_conns.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Thu, 22 Sep 2016 19:32:47 +0300 |
parents | f01ab2dbcfdc |
children | ed599ea6c1f1 |
comparison
equal
deleted
inserted
replaced
6704:a44ba757851d | 6705:29bf0dbc0a77 |
---|---|
210 && now - peer->checked <= peer->fail_timeout) | 210 && now - peer->checked <= peer->fail_timeout) |
211 { | 211 { |
212 goto next; | 212 goto next; |
213 } | 213 } |
214 | 214 |
215 if (peer->max_conns && peer->conns >= peer->max_conns) { | |
216 goto next; | |
217 } | |
218 | |
215 break; | 219 break; |
216 | 220 |
217 next: | 221 next: |
218 | 222 |
219 if (++iphp->tries > 20) { | 223 if (++iphp->tries > 20) { |
257 | 261 |
258 uscf->peer.init_upstream = ngx_http_upstream_init_ip_hash; | 262 uscf->peer.init_upstream = ngx_http_upstream_init_ip_hash; |
259 | 263 |
260 uscf->flags = NGX_HTTP_UPSTREAM_CREATE | 264 uscf->flags = NGX_HTTP_UPSTREAM_CREATE |
261 |NGX_HTTP_UPSTREAM_WEIGHT | 265 |NGX_HTTP_UPSTREAM_WEIGHT |
266 |NGX_HTTP_UPSTREAM_MAX_CONNS | |
262 |NGX_HTTP_UPSTREAM_MAX_FAILS | 267 |NGX_HTTP_UPSTREAM_MAX_FAILS |
263 |NGX_HTTP_UPSTREAM_FAIL_TIMEOUT | 268 |NGX_HTTP_UPSTREAM_FAIL_TIMEOUT |
264 |NGX_HTTP_UPSTREAM_DOWN; | 269 |NGX_HTTP_UPSTREAM_DOWN; |
265 | 270 |
266 return NGX_CONF_OK; | 271 return NGX_CONF_OK; |