Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0006090 [Resin] minor always 09-07-17 11:45 09-08-17 13:11
Reporter stbu View Status public  
Assigned To
Priority normal Resolution no change required  
Status closed   Product Version 4.0.50
Summary 0006090: Throttle Filter configuration with max-total-requests + timeout setting
Description I have a question regarding the Throttle Filter in Resin 4.0.50.
Based on the documentation (http://www.caucho.com/resin-4.0/admin/filters.xtp#ThrottleFilter) [^] I did the following configuration:

  <filter filter-name="throttle"
        filter-class="com.caucho.filters.ThrottleFilter">
    <init>
      <max-total-requests>10</max-total-requests>
      <timeout>60s</timeout>
    </init>
  </filter>

  <filter-mapping url-pattern="/*" filter-name="throttle"/>


The Caucho documentation describes these two parameters as follows:

max-total-requests => maximum number of requests allowed per IP within timeout
timeout => interval for max-total-requests

So I would expect that requests from certain IP address are handled like this:

[17-09-02 18:01:00,890] Request allowed (0000001 in last 60s)
[17-09-02 18:01:00,944] Request allowed (0000002 in last 60s)
[17-09-02 18:01:00,994] Request allowed (0000003 in last 60s)
[17-09-02 18:01:01,039] Request allowed (0000004 in last 60s)
[17-09-02 18:01:01,092] Request allowed (0000005 in last 60s)
[17-09-02 18:01:01,162] Request allowed (0000006 in last 60s)
[17-09-02 18:01:01,212] Request allowed (0000007 in last 60s)
[17-09-02 18:01:01,264] Request allowed (0000008 in last 60s)
[17-09-02 18:01:01,306] Request allowed (0000009 in last 60s)
[17-09-02 18:01:01,347] Request allowed (0000010 in last 60s)
[17-09-02 18:01:01,398] Should be disallowed. Responding with 503 as there have been already 10 requests within the last 60 seconds.
[17-09-02 18:01:01,440] Should be disallowed. Responding with 503 as there have been already 10 requests within the last 60 seconds.


But all requests (even more than listed here) are processed without seeing any throttling effect at all.

Is my understanding of the ThrottleFilter using above configuration wrong or is this a bug?
Additional Information
Attached Files

- Relationships

- Notes
(0006789)
ferg
09-08-17 13:11

The throttle is for a different model: concurrent requests.

The total-max-requests is a limit for the servlet for a maximum concurrent requests, regardless of IP.

The timeout is for the Java Semaphore that limits the requests.

So, while the behavior in the bug report is a logical kind of throttling, it's not the throttling that ThrottleFilter is doing.
 

- Issue History
Date Modified Username Field Change
09-07-17 11:45 stbu New Issue
09-07-17 11:45 stbu Issue Monitored: stbu
09-08-17 13:11 ferg Note Added: 0006789
09-08-17 13:11 ferg Status new => closed
09-08-17 13:11 ferg Resolution open => no change required


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
40 total queries executed.
36 unique queries executed.
Powered by Mantis Bugtracker