summaryrefslogtreecommitdiffhomepage
path: root/HTTP/RateLimit.hs
diff options
context:
space:
mode:
Diffstat (limited to 'HTTP/RateLimit.hs')
-rw-r--r--HTTP/RateLimit.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/HTTP/RateLimit.hs b/HTTP/RateLimit.hs
index e88d617..d8b3dc1 100644
--- a/HTTP/RateLimit.hs
+++ b/HTTP/RateLimit.hs
@@ -91,13 +91,14 @@ bloomMaxSize = 1000000
-- | Size of the bucket. This allows a burst of accesses after an idle
-- period, which is especially useful when retrieving keys that were
-- split into multiple chunks. However, setting this too high lets clients
--- cheaply store lots of data, so keep the objectSize in mind.
+-- cheaply store lots of data on a server that has been idle for a while,
+-- which could be an attractive way to abuse keysafe servers.
burstSize :: Word64
-burstSize = 4 -- allow 4 objects to be stored/retrieved w/o proof of work
+burstSize = 4 -- 256 kb immediate storage
-- | Rate that the bucket is filled.
fillRate :: Word64
-fillRate = 60000000 -- 1 token per minute
+fillRate = 2 * 60 * 1000000 -- 1 token ever other minute
-- | How much data could be stored, in bytes per second, assuming all
-- buckets in the rate limiter are kept drained, and all requests are