diff options
author | feistel <6742251-feistel@users.noreply.gitlab.com> | 2021-12-01 02:12:15 +0300 |
---|---|---|
committer | feistel <6742251-feistel@users.noreply.gitlab.com> | 2021-12-01 02:12:15 +0300 |
commit | 17c333c2a8de78c08dd070431652cc844fcc7b57 (patch) | |
tree | 740e9d1331a0a3adf9ba7515f7bb5ddc8d67c3d2 /app.go | |
parent | aa91e391469b832a925ebe81cdf575b1ea59c2ad (diff) |
chore: update method names
Diffstat (limited to 'app.go')
-rw-r--r-- | app.go | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -267,6 +267,9 @@ func (a *theApp) buildHandlerPipeline() (http.Handler, error) { if a.config.RateLimit.SourceIPLimitPerSecond > 0 { rl := ratelimiter.New( lru.New("source_ip", + // based on an avg ~4,000 unique IPs per minute + // https://log.gprd.gitlab.net/app/lens#/edit/f7110d00-2013-11ec-8c8e-ed83b5469915?_g=h@e78830b + lru.WithMaxSize(5000), lru.WithCachedEntriesMetric(metrics.RateLimitSourceIPCachedEntries), lru.WithCachedRequestsMetric(metrics.RateLimitSourceIPCacheRequests), ), |