summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2022-08-30 07:18:57 +0000
committerGerrit Code Review <review@openstack.org>2022-08-30 07:18:57 +0000
commit24acc6e56b25a4c53fcbe451a3a7c3d71d8c5beb (patch)
tree3d956727bafef9504b6a3e08b6ca897aa1ff9491 /etc
parent3e86c7e46f506f7a8ebe7d3a690bd612dcda545a (diff)
parentccaf49a00cea1990027eb699bff8f10c664b2c9a (diff)
downloadswift-24acc6e56b25a4c53fcbe451a3a7c3d71d8c5beb.tar.gz
Merge "Add backend rate limiting middleware"
Diffstat (limited to 'etc')
-rw-r--r--etc/account-server.conf-sample14
-rw-r--r--etc/container-server.conf-sample14
-rw-r--r--etc/object-server.conf-sample14
3 files changed, 39 insertions, 3 deletions
diff --git a/etc/account-server.conf-sample b/etc/account-server.conf-sample
index ef274cbfd..ade806819 100644
--- a/etc/account-server.conf-sample
+++ b/etc/account-server.conf-sample
@@ -80,7 +80,7 @@ bind_port = 6202
# ionice_priority =
[pipeline:main]
-pipeline = healthcheck recon account-server
+pipeline = healthcheck recon backend_ratelimit account-server
[app:account-server]
use = egg:swift#account
@@ -128,6 +128,18 @@ use = egg:swift#healthcheck
use = egg:swift#recon
# recon_cache_path = /var/cache/swift
+[filter:backend_ratelimit]
+use = egg:swift#backend_ratelimit
+# Set the maximum rate of requests per second per device per worker. Beyond
+# this rate the server will return 529 responses and emit a 'backend.ratelimit'
+# statsd metric without logging. The default value of zero causes no
+# rate-limiting to be applied.
+# requests_per_device_per_second = 0.0
+#
+# Set the number of seconds of unused rate-limiting allowance that can
+# accumulate and be used to allow a subsequent burst of requests.
+# requests_per_device_rate_buffer = 1.0
+
[account-replicator]
# You can override the default log routing for this app here (don't use set!):
# log_name = account-replicator
diff --git a/etc/container-server.conf-sample b/etc/container-server.conf-sample
index 93887f60a..7184c1fb2 100644
--- a/etc/container-server.conf-sample
+++ b/etc/container-server.conf-sample
@@ -86,7 +86,7 @@ bind_port = 6201
# ionice_priority =
[pipeline:main]
-pipeline = healthcheck recon container-server
+pipeline = healthcheck recon backend_ratelimit container-server
[app:container-server]
use = egg:swift#container
@@ -138,6 +138,18 @@ use = egg:swift#healthcheck
use = egg:swift#recon
#recon_cache_path = /var/cache/swift
+[filter:backend_ratelimit]
+use = egg:swift#backend_ratelimit
+# Set the maximum rate of requests per second per device per worker. Beyond
+# this rate the server will return 529 responses and emit a 'backend.ratelimit'
+# statsd metric without logging. The default value of zero causes no
+# rate-limiting to be applied.
+# requests_per_device_per_second = 0.0
+#
+# Set the number of seconds of unused rate-limiting allowance that can
+# accumulate and be used to allow a subsequent burst of requests.
+# requests_per_device_rate_buffer = 1.0
+
[container-replicator]
# You can override the default log routing for this app here (don't use set!):
# log_name = container-replicator
diff --git a/etc/object-server.conf-sample b/etc/object-server.conf-sample
index ee8e58104..fd516f780 100644
--- a/etc/object-server.conf-sample
+++ b/etc/object-server.conf-sample
@@ -117,7 +117,7 @@ bind_port = 6200
# ionice_priority =
[pipeline:main]
-pipeline = healthcheck recon object-server
+pipeline = healthcheck recon backend_ratelimit object-server
[app:object-server]
use = egg:swift#object
@@ -237,6 +237,18 @@ use = egg:swift#recon
#recon_cache_path = /var/cache/swift
#recon_lock_path = /var/lock
+[filter:backend_ratelimit]
+use = egg:swift#backend_ratelimit
+# Set the maximum rate of requests per second per device per worker. Beyond
+# this rate the server will return 529 responses and emit a 'backend.ratelimit'
+# statsd metric without logging. The default value of zero causes no
+# rate-limiting to be applied.
+# requests_per_device_per_second = 0.0
+#
+# Set the number of seconds of unused rate-limiting allowance that can
+# accumulate and be used to allow a subsequent burst of requests.
+# requests_per_device_rate_buffer = 1.0
+
[object-replicator]
# You can override the default log routing for this app here (don't use set!):
# log_name = object-replicator