<feed xmlns='http://www.w3.org/2005/Atom'>
<title>nginx.git/src/http/modules/ngx_http_upstream_hash_module.c, branch release-1.28.2</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 hash: fall back to round-robin if hash key is empty.</title>
<updated>2019-05-23T13:49:22+00:00</updated>
<author>
<name>Niklas Keller</name>
<email>me@kelunik.com</email>
</author>
<published>2019-05-23T13:49:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=c18658e9fec66b2564a3dcc9a24d401d77a0d986'/>
<id>c18658e9fec66b2564a3dcc9a24d401d77a0d986</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Upstream: improved peer selection concurrency for hash and ip_hash.</title>
<updated>2018-06-14T04:03:50+00:00</updated>
<author>
<name>Ruslan Ermilov</name>
<email>ru@nginx.com</email>
</author>
<published>2018-06-14T04:03:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=2eab9efbe4050ab471cfa3ed778d751454fcd87d'/>
<id>2eab9efbe4050ab471cfa3ed778d751454fcd87d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Upstream hash: reordered peer checks.</title>
<updated>2017-10-05T14:43:05+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2017-10-05T14:43:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=53d655f89407af017cd193fd4d8d82118c9c2c80'/>
<id>53d655f89407af017cd193fd4d8d82118c9c2c80</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>Upstream hash: limited number of tries in consistent case.</title>
<updated>2017-10-05T14:42:59+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2017-10-05T14:42:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=a10ec2db91b448029968025d23155e9c383f522d'/>
<id>a10ec2db91b448029968025d23155e9c383f522d</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</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: 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>Upstream hash: fixed missing upstream name initialization.</title>
<updated>2016-09-16T12:13:24+00:00</updated>
<author>
<name>Vladimir Homutov</name>
<email>vl@nginx.com</email>
</author>
<published>2016-09-16T12:13:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=f8a9d528df92c7634088e575e5c3d63a1d4ab8ea'/>
<id>f8a9d528df92c7634088e575e5c3d63a1d4ab8ea</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Upstream hash: consistency across little/big endianness.</title>
<updated>2015-05-18T13:05:44+00:00</updated>
<author>
<name>Sergey Kandaurov</name>
<email>pluknet@nginx.com</email>
</author>
<published>2015-05-18T13:05:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=3670726bd31eb7309abf77246ee7306d0205f382'/>
<id>3670726bd31eb7309abf77246ee7306d0205f382</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Upstream: simplified ip_hash and hash peer selection code.</title>
<updated>2015-04-21T16:09:04+00:00</updated>
<author>
<name>Ruslan Ermilov</name>
<email>ru@nginx.com</email>
</author>
<published>2015-04-21T16:09:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=673941f81dfc724f9d98d1d1c0e50c8e08e3e327'/>
<id>673941f81dfc724f9d98d1d1c0e50c8e08e3e327</id>
<content type='text'>
Now that peers are stored as a list, the weighted and unweighted
cases became nearly identical.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that peers are stored as a list, the weighted and unweighted
cases became nearly identical.
</pre>
</div>
</content>
</entry>
</feed>
