summaryrefslogtreecommitdiffhomepage
path: root/src/stream/ngx_stream_upstream.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2024-11-07Upstream: per-upstream resolver.Vladimir Homutov1-0/+52
The "resolver" and "resolver_timeout" directives can now be specified directly in the "upstream" block.
2024-11-07Upstream: construct upstream peers from DNS SRV records.Dmitry Volyntsev1-1/+44
2024-11-07Upstream: re-resolvable servers.Ruslan Ermilov1-0/+58
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>
2018-11-21Upstream: revised upstream response time variables.Vladimir Homutov1-9/+7
Variables now do not depend on presence of the HTTP status code in response. If the corresponding event occurred, variables contain time between request creation and the event, and "-" otherwise. Previously, intermediate value of the $upstream_response_time variable held unix timestamp.
2017-08-01Variables: macros for null variables.Ruslan Ermilov1-1/+1
No functional changes.
2016-09-22Upstream: max_conns.Ruslan Ermilov1-1/+19
2016-09-20Fixed log levels of configuration parsing errors.Valentin Bartenev1-2/+2
All the errors that prevent loading configuration must be printed on the "emerg" log level. Previously, nginx might silently fail to load configuration in some cases as the default log level is "error".
2016-09-02Stream: upstream response time variables.Vladimir Homutov1-0/+81
The $upstream_connect_time, $upstream_first_byte_time and $upstream_session_time variables keep corresponding times.
2016-09-02Stream: $upstream_bytes_sent and $upstream_bytes_received.Vladimir Homutov1-0/+63
2016-09-02Stream: the $upstream_addr variable.Vladimir Homutov1-1/+91
Keeps the full address of the upstream server. If several servers were contacted during proxying, their addresses are separated by commas, e.g. "192.168.1.1:80, 192.168.1.2:80".
2016-07-12Stream: style.Vladimir Homutov1-1/+1
2016-06-15Stream: added preconfiguration step.Vladimir Homutov1-0/+1
2016-03-23Stream: detect port absence in proxy_pass with IP literal.Roman Arutyunyan1-1/+1
This is a clone of http commit 26c127bab5ef.
2016-02-04Dynamic modules: changed ngx_modules to cycle->modules.Maxim Dounin1-4/+4
2015-06-09Stream: added postconfiguration method to stream modules.Vladimir Homutov1-0/+2
2015-04-20Stream: port from NGINX+.Ruslan Ermilov1-0/+462