Page MenuHomePhabricator

Reimplement various rate-limiting mechanisms in Thumbor
Closed, ResolvedPublic

Description

  • 429ing when a broken thumbnail is requested more than 4 times in 5 minutes (uses a DC-local cache)
  • Use PoolCounter for throttling normal and expensive thumbnails
  • Implement rate limiter to avoid a given IP DDOSing us with unique uncached requests

Event Timeline

Gilles raised the priority of this task from Medium to High.Nov 15 2016, 12:31 PM

I think it'd make sense to have similar rate-limit capabilities to avoid overload. Implementation-wise I'm not sure though, is pool counter reserved for mediawiki usage only?

Thumbor can probably talk to PoolCounter.

As for the failure counter, it's based on a cache, a DC-local memcache I presume. Thumbor could talk to that too.

Gilles added a subscriber: Krinkle.

@Krinkle reminded me of the (presumably per-IP) rate limiter for uncached thumbnails. I need to figure out at what level that's implemented.

Gilles renamed this task from Investigate whether we need a repeat failure guard and/or a poolcounter-like behavior in Thumbor to Reimplement various rate-limiting mechanisms in Thumbor.Nov 18 2016, 4:41 PM
Gilles closed this task as Resolved.
Gilles updated the task description. (Show Details)

Closing this parent task, the child tasks are enough.