neutron/neutron/common
Kevin Benton 0ffab0930c Add exponential back-off RPC client
This adds an exponential backoff mechanism for timeout values
on any RPC calls in Neutron that don't explicitly request a timeout
value. This will prevent the clients from DDoSing the server by
giving up on requests and retrying them before they are fulfilled.

Each RPC call method in each namespace gets its own timeout value since
some calls are expected to be much more expensive than others and we
don't want to modify the timeouts of cheap calls.

The backoff currently has no reduction mechanism under the assumption
that timeouts not legitimately caused by heavy system load
(i.e. messages completely dropped by AMQP) are rare enough that the
cost of shrinking the timeout back down and potentially causing
another server timeout isn't worth it. The timeout does have a ceiling
of 10 times the configured default timeout value.

Whenever a timeout exception occurs, the client will also sleep for a
random value between 0 and the configured default timeout value to
introduce a splay across all of the agents that may be trying to
communicate with the server.

This patch is intended to be uninvasive for candidacy to be
back-ported. A larger refactor of delivering data to the agents
is being discussed in I3af200ad84483e6e1fe619d516ff20bc87041f7c.

Closes-Bug: #1554332
Change-Id: I923e415c1b8e9a431be89221c78c14f39c42c80f
(cherry picked from commit 3e668b6a37)
2016-05-06 19:02:08 -07:00
..
__init__.py Update License Headers to replace Nicira with VMware 2014-02-27 08:11:15 +00:00
config.py Add option for nova endpoint type 2016-03-23 09:35:13 +00:00
constants.py Merge "SG protocol validation to allow numbers or names" into stable/liberty 2016-04-01 15:15:45 +00:00
eventlet_utils.py Add eventlet monkey_patch helper 2015-03-24 08:44:00 -07:00
exceptions.py Merge "Add the missing arg of RetryRequest exception in _lock_subnetpool" into stable/liberty 2015-12-01 01:43:39 +00:00
ipv6_utils.py DB, IPAM & RPC changes for IPv6 Prefix Delegation 2015-08-05 12:22:22 +01:00
log.py Use oslo_log.helpers.log_method_call 2015-07-17 07:34:07 +00:00
rpc.py Add exponential back-off RPC client 2016-05-06 19:02:08 -07:00
test_lib.py Revert "Removed test_lib module" 2015-06-29 08:27:41 +00:00
topics.py Add rpc agent api and callbacks to resources_rpc 2015-08-08 10:27:12 +02:00
utils.py DVR: optimize check_ports_exist_on_l3_agent() 2016-01-29 16:50:34 +03:00