https://bz.apache.org/bugzilla/show_bug.cgi?id=69355

--- Comment #2 from Igal Sapir <isa...@apache.org> ---
(In reply to Chen Jp from comment #0)
> Currently, RateLimitFitler implements a roughly rate limit algorithm,
> provides closely but not exactly equality with user's configuration. For
> example, configuration of 100 Requests per 60 seconds, has the real values
> of 109 Requests per 65 seconds.

That approximation allows for fast binary division / multiplication using bit
shifting while maintaining the configured ratio: 109 / 65 ~= 100 / 60 = 1.67

Favoring efficiency and high throughput over accuracy was a design goal as
discussed in the Dev Mailing List prior to implementing the RateLimitFilter.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to