Menu

RFE: directive to limit requestspersecond

jkbzh
2009-09-04
2013-05-23
  • jkbzh

    jkbzh - 2009-09-04

    Hi, among other things, we would like to use mod_qos to limit the number of requests made per second to the server from a given IP@, independently of the resource being requested. In order to configure qos to do so, I had to add many kludges:
    [[
    QS_ClientEventBlockCount 40
    QS_SetEnvIf   !DUMMY_VAR  !DUMMY_BAR   QS_Event=yes
    QS_ClientEventPerSecLimit 40
    ]]

    The above is a long and complex detour and not ideal for controlling the rps on the server. I'm uneasy at doing so as it adds extra context and processing which we are not really going to exploit.

    Couldn't it be possible to have a global variable that configures the maximum number of requests per sec on the server from a given IP@? I mean something in one line such as:
    [[
    QS_ClientReqPerSecLimit 40
    ]]

    Maybe it was a design decision?

    Many thanks!

    -jose

     
    • Pascal Buchbinder

      IMHO, the "event per second" is much more flexible than a QS_ClientReqPerSecLimit directive and we have to be canny about the number of counters we maintain for each client IP.

      # count every request:
      SetEnvIf Request_URI / QS_Event=yes
      # limit:
      QS_ClientEventPerSecLimit 40

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.