<feed xmlns='http://www.w3.org/2005/Atom'>
<title>nginx.git/src/http/modules/ngx_http_upstream_least_conn_module.c, branch release-1.28.3</title>
<subtitle>nginx</subtitle>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/'/>
<entry>
<title>Upstream: re-resolvable servers.</title>
<updated>2024-11-07T15:57:42+00:00</updated>
<author>
<name>Ruslan Ermilov</name>
<email>ru@nginx.com</email>
</author>
<published>2014-02-15T11:12:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=db6870e06dde7ab249e9a41a0e0a76219f82dd8c'/>
<id>db6870e06dde7ab249e9a41a0e0a76219f82dd8c</id>
<content type='text'>
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 &lt;arut@nginx.com&gt;
Co-authored-by: Sergey Kandaurov &lt;pluknet@nginx.com&gt;
Co-authored-by: Vladimir Homutov &lt;vl@nginx.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;arut@nginx.com&gt;
Co-authored-by: Sergey Kandaurov &lt;pluknet@nginx.com&gt;
Co-authored-by: Vladimir Homutov &lt;vl@nginx.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Upstream: max_conns.</title>
<updated>2016-09-22T16:32:47+00:00</updated>
<author>
<name>Ruslan Ermilov</name>
<email>ru@nginx.com</email>
</author>
<published>2016-09-22T16:32:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=f674f32c09c9938d5f2b19509166e5c5e28a9e3c'/>
<id>f674f32c09c9938d5f2b19509166e5c5e28a9e3c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Upstream: removed the quick recovery mechanism.</title>
<updated>2016-09-22T16:32:45+00:00</updated>
<author>
<name>Ruslan Ermilov</name>
<email>ru@nginx.com</email>
</author>
<published>2016-09-22T16:32:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=fd9e74f656b3a7683424304da3bc859988407acf'/>
<id>fd9e74f656b3a7683424304da3bc859988407acf</id>
<content type='text'>
Its usefulness it questionable, and it interacts badly with max_conns.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Its usefulness it questionable, and it interacts badly with max_conns.
</pre>
</div>
</content>
</entry>
<entry>
<title>Upstream: style.</title>
<updated>2016-09-22T16:31:08+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2016-09-22T16:31:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=017cf96c9b3d29f6a95423d22cdea63587c3d67e'/>
<id>017cf96c9b3d29f6a95423d22cdea63587c3d67e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Style.</title>
<updated>2016-03-30T08:52:16+00:00</updated>
<author>
<name>Ruslan Ermilov</name>
<email>ru@nginx.com</email>
</author>
<published>2016-03-30T08:52:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=7ad57da59821294255610545b2b5ce07e74124a5'/>
<id>7ad57da59821294255610545b2b5ce07e74124a5</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Upstreams: locking.</title>
<updated>2015-04-14T16:01:23+00:00</updated>
<author>
<name>Ruslan Ermilov</name>
<email>ru@nginx.com</email>
</author>
<published>2015-04-14T16:01:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=b0b7b5a356c7dedf4a1867e94d8a36cbb6dc3da1'/>
<id>b0b7b5a356c7dedf4a1867e94d8a36cbb6dc3da1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Upstream: store peers as a linked list.</title>
<updated>2015-04-10T11:48:36+00:00</updated>
<author>
<name>Ruslan Ermilov</name>
<email>ru@nginx.com</email>
</author>
<published>2015-04-10T11:48:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=4d53631022f4c01878310298a9508cc7ee073012'/>
<id>4d53631022f4c01878310298a9508cc7ee073012</id>
<content type='text'>
This is an API change.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is an API change.
</pre>
</div>
</content>
</entry>
<entry>
<title>Upstream: track the number of active connections to upstreams.</title>
<updated>2015-04-10T10:16:23+00:00</updated>
<author>
<name>Ruslan Ermilov</name>
<email>ru@nginx.com</email>
</author>
<published>2015-04-10T10:16:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=18fa775b1060a663e15473161c795992926e60e1'/>
<id>18fa775b1060a663e15473161c795992926e60e1</id>
<content type='text'>
This also simplifies the implementation of the least_conn module.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This also simplifies the implementation of the least_conn module.
</pre>
</div>
</content>
</entry>
<entry>
<title>Upstream: included backup peers into peer.tries.</title>
<updated>2014-09-12T14:50:46+00:00</updated>
<author>
<name>Roman Arutyunyan</name>
<email>arut@nginx.com</email>
</author>
<published>2014-09-12T14:50:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=cfc3db1972f1eb96accaf4c04095912e176aecd3'/>
<id>cfc3db1972f1eb96accaf4c04095912e176aecd3</id>
<content type='text'>
Since peer.tries is never reset it can now be limited if required.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since peer.tries is never reset it can now be limited if required.
</pre>
</div>
</content>
</entry>
<entry>
<title>Upstream: fixed fail_timeout and max_fails &gt; 1.</title>
<updated>2013-05-21T17:47:50+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2013-05-21T17:47:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=a1ab0dde4a34494214b0ad77f3a84bb18e72e08e'/>
<id>a1ab0dde4a34494214b0ad77f3a84bb18e72e08e</id>
<content type='text'>
Due to peer-&gt;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-&gt;fails too often.

Reported by Dmitry Popov,
http://mailman.nginx.org/pipermail/nginx-devel/2013-May/003720.html
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Due to peer-&gt;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-&gt;fails too often.

Reported by Dmitry Popov,
http://mailman.nginx.org/pipermail/nginx-devel/2013-May/003720.html
</pre>
</div>
</content>
</entry>
</feed>
