aboutsummaryrefslogtreecommitdiff
path: root/src/stream/ngx_stream_upstream_hash_module.c
Commit message (Collapse)AuthorAge
* Upstream: re-resolvable servers.Ruslan Ermilov2024-11-07
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Upstream hash: fall back to round-robin if hash key is empty.Niklas Keller2019-05-23
|
* Upstream: improved peer selection concurrency for hash and ip_hash.Ruslan Ermilov2018-06-14
|
* Upstream hash: reordered peer checks.Maxim Dounin2017-10-05
| | | | | | This slightly reduces cost of selecting a peer if all or almost all peers failed, see ticket #1030. There should be no measureable difference with other workloads.
* Upstream hash: limited number of tries in consistent case.Maxim Dounin2017-10-05
| | | | | | | | While this may result in non-ideal distribution of requests if nginx won't be able to select a server in a reasonable number of attempts, this still looks better than severe performance degradation observed if there is no limit and there are many points configured (ticket #1030). This is also in line with what we do for other hash balancing methods.
* Upstream: max_conns.Ruslan Ermilov2016-09-22
|
* Upstream: style.Maxim Dounin2016-09-22
|
* Upstream hash: fixed missing upstream name initialization.Vladimir Homutov2016-09-16
|
* Stream: style.Vladimir Homutov2016-07-12
|
* Stream: got rid of pseudo variables.Vladimir Homutov2016-06-29
| | | | Stream limit_conn, upstream_hash and proxy modules now use complex values.
* Stream: added preconfiguration step.Vladimir Homutov2016-06-15
|
* Stream: added postconfiguration method to stream modules.Vladimir Homutov2015-06-09
|
* Upstream hash: consistency across little/big endianness.Sergey Kandaurov2015-05-18
|
* Upstream: simplified ip_hash and hash peer selection code.Ruslan Ermilov2015-04-21
| | | | | Now that peers are stored as a list, the weighted and unweighted cases became nearly identical.
* Stream: port from NGINX+.Ruslan Ermilov2015-04-20