ratelimiter: Bump up to 16kb/min from 4kb/min

This commit is contained in:
Andrey Petrov 2016-08-06 16:40:27 -04:00
parent a4671ac262
commit f6de73d420

View File

@ -44,7 +44,7 @@ type inputLimiter struct {
func NewInputLimiter() rateio.Limiter { func NewInputLimiter() rateio.Limiter {
grace := time.Second * 3 grace := time.Second * 3
return &inputLimiter{ return &inputLimiter{
Amount: 200 * 4 * 5, // Assume fairly high typing rate + margin for copypasta of links + large key handshakes Amount: 2 << 14, // ~16kb, should be plenty for a high typing rate/copypasta/large key handshakes.
Frequency: time.Minute * 1, Frequency: time.Minute * 1,
readCap: 128, // Allow up to 128 bytes per read (anecdotally, 1 character = 52 bytes over ssh) readCap: 128, // Allow up to 128 bytes per read (anecdotally, 1 character = 52 bytes over ssh)
numRead: -1024 * 1024, // Start with a 1mb grace numRead: -1024 * 1024, // Start with a 1mb grace