summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorTim Burke <tim.burke@gmail.com>2020-06-18 11:48:14 -0700
committerAlistair Coles <alistairncoles@gmail.com>2022-01-26 18:15:09 +0000
commit8c6ccb5fd41864155a043856ff9240e84999e4bf (patch)
treeb8e4e6f89f727f6655629ff798e2cf3b7a66150d /etc
parent8ef530d795df7f0300e761933c916546427a79fe (diff)
downloadswift-8c6ccb5fd41864155a043856ff9240e84999e4bf.tar.gz
proxy: Add a chance to skip memcache when looking for shard ranges
By having some small portion of calls skip cache and go straight to disk, we can ensure the cache is always kept fresh and never expires (at least, for active containers). Previously, when shard ranges fell out of cache there would frequently be a thundering herd that could overwhelm the container server, leading to 503s served to clients or an increase in async pendings. Include metrics for hit/miss/skip rates. Change-Id: I6d74719fb41665f787375a08184c1969c86ce2cf Related-Bug: #1883324
Diffstat (limited to 'etc')
-rw-r--r--etc/proxy-server.conf-sample9
1 files changed, 9 insertions, 0 deletions
diff --git a/etc/proxy-server.conf-sample b/etc/proxy-server.conf-sample
index de51c7bcc..b89f8e6c4 100644
--- a/etc/proxy-server.conf-sample
+++ b/etc/proxy-server.conf-sample
@@ -144,6 +144,15 @@ use = egg:swift#proxy
# so this value should be set less than recheck_updating_shard_ranges.
# recheck_listing_shard_ranges = 600
#
+# For particularly active containers, having information age out of cache can
+# be quite painful: suddenly thousands of requests per second all miss and
+# have to go to disk. By (rarely) going direct to disk regardless of whether
+# data is present in memcache, we can periodically refresh the data in memcache
+# without causing a thundering herd. Values around 0.0 - 0.1 (i.e., one in
+# every thousand requests skips cache, or fewer) are recommended.
+# container_updating_shard_ranges_skip_cache_pct = 0.0
+# container_listing_shard_ranges_skip_cache_pct = 0.0
+#
# object_chunk_size = 65536
# client_chunk_size = 65536
#