Re: [exim] ratelimit and short timescales

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Tony Finch
Dátum:  
Címzett: Jeremy Harris
CC: exim-users @ exim. org
Tárgy: Re: [exim] ratelimit and short timescales
On Thu, 11 Aug 2005, Jeremy Harris wrote:
>
> What's the time resolution of ratelimit? Is a time of five seconds
> resonable, or not really supported by the implementation?


Internally it uses gettimeofday() which represents times to microsecond
precision, though the OS's underlying timer probably only ticks at 100 Hz.
The rate calculations are performed using a variant of the exponentially
weighted moving average in double precision floating point arithmetic (see
the comments in the code for the details of the model). So there shouldn't
be problems with accuracy for long or short intervals or high or low
rates.

It should work quite well to restrict quick bursts of connections.

Tony.
--
<fanf@???> <dot@???> http://dotat.at/ ${sg{\N${sg{\
N\}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}\
\N}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}