KB Article #180427

Throttling filter is not reliable under load when using a distributed cache

Problem

The Throttling filter does not reliably rate-limit requests under load when backed by a distributed ehCache.


Resolution

ehCache does not provide the necessary synchronization controls to implement this use case properly and so this configuration should not be used. An enhancement was added in 7.6.2 and later versions to allow for smooth rate limiting backed by Cassandra, and this should be used instead. Note that throttling high volumes of traffic will put load on Cassandra.


In 7.7, there are now two modes: smooth rate limiting & floating time window. The floating time window option exists only for backward compatibility and is the same problematic mode from older versions that does not work with a distributed ehCache. It is only useful with a local cache, which implies that you have to divide the limit across servers that do not coordinate. While it allows you to select a distributed cache in the UI, this will not be reliable and this should never be used.