From 01c6543c27900764de2d68e65aebd51ea546bc88 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 13 Sep 2016 11:47:11 -0400 Subject: half the fill rate This decreases the possible maximumStorageRate by half, down from 10 gb/month to 5 gb/month. Which is probably a tolerable amount for many servers; that's 16 months to fill up a terabyte disk. --- HTTP/RateLimit.hs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'HTTP') 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 -- cgit v1.2.3