summaryrefslogtreecommitdiffhomepage
path: root/src/http/modules/ngx_http_upstream_least_conn_module.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2024-11-07Upstream: re-resolvable servers.Ruslan Ermilov1-0/+12
Specifying the upstream server by a hostname together with the "resolve" parameter will make the hostname to be periodically resolved, and upstream servers added/removed as necessary. This requires a "resolver" at the "http" configuration block. The "resolver_timeout" parameter also affects when the failed DNS requests will be attempted again. Responses with NXDOMAIN will be attempted again in 10 seconds. Upstream has a configuration generation number that is incremented each time servers are added/removed to the primary/backup list. This number is remembered by the peer.init method, and if peer.get detects a change in configuration, it returns NGX_BUSY. Each server has a reference counter. It is incremented by peer.get and decremented by peer.free. When a server is removed, it is removed from the list of servers and is marked as "zombie". The memory allocated by a zombie peer is freed only when its reference count becomes zero. Co-authored-by: Roman Arutyunyan <arut@nginx.com> Co-authored-by: Sergey Kandaurov <pluknet@nginx.com> Co-authored-by: Vladimir Homutov <vl@nginx.com>
2016-09-22Upstream: max_conns.Ruslan Ermilov1-0/+9
2016-09-22Upstream: removed the quick recovery mechanism.Ruslan Ermilov1-6/+0
Its usefulness it questionable, and it interacts badly with max_conns.
2016-09-22Upstream: style.Maxim Dounin1-1/+0
2016-03-30Style.Ruslan Ermilov1-1/+1
2015-04-14Upstreams: locking.Ruslan Ermilov1-0/+10
2015-04-10Upstream: store peers as a linked list.Ruslan Ermilov1-10/+11
This is an API change.
2015-04-10Upstream: track the number of active connections to upstreams.Ruslan Ermilov1-120/+18
This also simplifies the implementation of the least_conn module.
2014-09-12Upstream: included backup peers into peer.tries.Roman Arutyunyan1-5/+0
Since peer.tries is never reset it can now be limited if required.
2013-05-21Upstream: fixed fail_timeout and max_fails > 1.Maxim Dounin1-1/+4
Due to peer->checked always set since rev. c90801720a0c (1.3.0) by round-robin and least_conn balancers (ip_hash not affected), the code in ngx_http_upstream_free_round_robin_peer() function incorrectly reset peer->fails too often. Reported by Dmitry Popov, http://mailman.nginx.org/pipermail/nginx-devel/2013-May/003720.html
2013-04-12Upstream: warn if multiple non-stackable balancers are installed.Ruslan Ermilov1-0/+5
2013-03-25Upstream: removed double-free workarounds in peer.free() methods.Ruslan Ermilov1-4/+0
2012-12-25Upstream: fixed state resetting when switching to backup servers.Valentin Bartenev1-1/+3
Based on patch by Thomas Chen (ticket #257).
2012-07-24Fixed compilation with -Wmissing-prototypes.Ruslan Ermilov1-1/+1
2012-06-04Upstream: least_conn compilation fixes.Maxim Dounin1-5/+3
Removed duplicate call of ngx_http_upstream_init_round_robin_peer() overlooked during code changes. Rewritten "return lcp->free_rr_peer(...)" as MSVC doesn't like it.
2012-06-03Upstream: least_conn balancer module.Maxim Dounin1-0/+404