changing all rate_limit to ratelimit
This commit is contained in:
@@ -470,16 +470,6 @@ error_suppression_interval 60 Time in seconds that must
|
||||
no longer error limited
|
||||
error_suppression_limit 10 Error count to consider a
|
||||
node error limited
|
||||
rate_limit 20000.0 Max container level ops per
|
||||
second
|
||||
account_rate_limit 200.0 Max account level ops per
|
||||
second
|
||||
rate_limit_account_whitelist Comma separated list of
|
||||
account name hashes to not
|
||||
rate limit
|
||||
rate_limit_account_blacklist Comma separated list of
|
||||
account name hashes to block
|
||||
completely
|
||||
============================ =============== =============================
|
||||
|
||||
[auth]
|
||||
|
||||
@@ -25,7 +25,7 @@ Overview:
|
||||
overview_auth
|
||||
overview_replication
|
||||
overview_stats
|
||||
rate_limiting
|
||||
ratelimit
|
||||
|
||||
Development:
|
||||
|
||||
|
||||
@@ -1,67 +0,0 @@
|
||||
=============
|
||||
Rate Limiting
|
||||
=============
|
||||
|
||||
Rate limiting in swift is implemented as a pluggable middleware. Rate
|
||||
limiting is performed on requests that result in database writes to the
|
||||
account and container sqlite dbs. It uses memcached and is dependant on
|
||||
the proxy servers having highly synchronized time. The rate limits are
|
||||
limited by the accuracy of the proxy server clocks.
|
||||
|
||||
--------------
|
||||
Configuration
|
||||
--------------
|
||||
|
||||
All configuration is optional. If no account or container limits are provided
|
||||
there will be no rate limiting. Configuration available:
|
||||
|
||||
====================== ========= =============================================
|
||||
Option Default Description
|
||||
---------------------- --------- ---------------------------------------------
|
||||
clock_accuracy 1000 Represents how accurate the proxy servers'
|
||||
system clocks are with each other. 1000 means
|
||||
that all the proxies' clock are accurate to
|
||||
each other within 1 millisecond. No
|
||||
ratelimit should be higher than the clock
|
||||
accuracy.
|
||||
max_sleep_time_seconds 60 App will immediately return a 498 response
|
||||
if the necessary sleep time ever exceeds
|
||||
the given max_sleep_time_seconds.
|
||||
account_ratelimit 0 If set, will limit all requests to
|
||||
/account_name and PUTs to
|
||||
/account_name/container_name. Number is in
|
||||
requests per second
|
||||
account_whitelist '' Comma separated lists of account names that
|
||||
will not be rate limited.
|
||||
account_blacklist '' Comma separated lists of account names that
|
||||
will not be allowed. Returns a 497 response.
|
||||
container_limit_size '' When set with container_limit_x = r:
|
||||
for containers of size x, limit requests per
|
||||
second to r. Will limit GET and HEAD
|
||||
requests to /account_name/container_name and
|
||||
PUTs and DELETEs to
|
||||
/account_name/container_name/object_name
|
||||
====================== ========= =============================================
|
||||
|
||||
The container rate limits are linearly interpolated from the values given. A
|
||||
sample container rate limiting could be:
|
||||
|
||||
container_limit_100 = 100
|
||||
|
||||
container_limit_200 = 50
|
||||
|
||||
container_limit_500 = 20
|
||||
|
||||
This would result in
|
||||
|
||||
================ ============
|
||||
Container Size Rate Limit
|
||||
---------------- ------------
|
||||
0-99 No limiting
|
||||
100 100
|
||||
150 75
|
||||
500 20
|
||||
1000 20
|
||||
================ ============
|
||||
|
||||
|
||||
67
doc/source/ratelimit.rst
Normal file
67
doc/source/ratelimit.rst
Normal file
@@ -0,0 +1,67 @@
|
||||
=============
|
||||
Rate Limiting
|
||||
=============
|
||||
|
||||
Rate limiting in swift is implemented as a pluggable middleware. Rate
|
||||
limiting is performed on requests that result in database writes to the
|
||||
account and container sqlite dbs. It uses memcached and is dependant on
|
||||
the proxy servers having highly synchronized time. The rate limits are
|
||||
limited by the accuracy of the proxy server clocks.
|
||||
|
||||
--------------
|
||||
Configuration
|
||||
--------------
|
||||
|
||||
All configuration is optional. If no account or container limits are provided
|
||||
there will be no rate limiting. Configuration available:
|
||||
|
||||
======================== ========= ===========================================
|
||||
Option Default Description
|
||||
---------------------- --------- -------------------------------------------
|
||||
clock_accuracy 1000 Represents how accurate the proxy servers'
|
||||
system clocks are with each other. 1000
|
||||
means that all the proxies' clock are
|
||||
accurate to each other within 1
|
||||
millisecond. No ratelimit should be
|
||||
higher than the clock accuracy.
|
||||
max_sleep_time_seconds 60 App will immediately return a 498 response
|
||||
if the necessary sleep time ever exceeds
|
||||
the given max_sleep_time_seconds.
|
||||
account_ratelimit 0 If set, will limit all requests to
|
||||
/account_name and PUTs to
|
||||
/account_name/container_name. Number is in
|
||||
requests per second
|
||||
account_whitelist '' Comma separated lists of account names that
|
||||
will not be rate limited.
|
||||
account_blacklist '' Comma separated lists of account names that
|
||||
will not be allowed. Returns a 497 response.
|
||||
container_ratelimit_size '' When set with container_limit_x = r:
|
||||
for containers of size x, limit requests
|
||||
per second to r. Will limit GET and HEAD
|
||||
requests to /account_name/container_name and
|
||||
PUTs and DELETEs to
|
||||
/account_name/container_name/object_name
|
||||
======================== ========= ===========================================
|
||||
|
||||
The container rate limits are linearly interpolated from the values given. A
|
||||
sample container rate limiting could be:
|
||||
|
||||
container_ratelimit_100 = 100
|
||||
|
||||
container_ratelimit_200 = 50
|
||||
|
||||
container_ratelimit_500 = 20
|
||||
|
||||
This would result in
|
||||
|
||||
================ ============
|
||||
Container Size Rate Limit
|
||||
---------------- ------------
|
||||
0-99 No limiting
|
||||
100 100
|
||||
150 75
|
||||
500 20
|
||||
1000 20
|
||||
================ ============
|
||||
|
||||
|
||||
Reference in New Issue
Block a user