Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Question about Event Request limiting

Adam V.
2013-07-16
2013-08-23
  • Adam V.
    Adam V.
    2013-07-16

    Hey guys,

    I was wondering about the difference between these two controls:

    QS_EventRequestLimit

    and

    QS_ClientEventRequestLimit

    With the former option, I am able to specify this multiple times, once each for a specific variable I set, meaning something like this should be possible:

    define specific requests to unique variables
    SetEnvIf Request_URI /wordpress QS_WordP
    SetEnvIf Request_URI /joomla QS_Joomla

    and set limits on those accordingly
    QS_EventLimitCount QS_WordP 5 10
    QS_EventLimitCount QS_Joomla 15 20

    However, the “QS_EventRequestLimit” control is a global one, so if I have more than 5 total connections to “/wordpress”, then all visitors will get blocked out until the next 10 second window starts.

    Now, if I wanted to do this on a per-client basis, rather than for everyone, it seems that I would only be able to set one control for these unique circumstances, rather than having different controls for each. As I understand the documentation, I would only be able to do something to this effect:

    define specific requests to unique variables
    SetEnvIf Request_URI /wordpress QS_Limit
    SetEnvIf Request_URI /joomla QS_Limit

    and set limits on those accordingly
    QS_ClientEventLimitCount 5 10

    My question is, why am I not able to set per-client limits using my own defined variables, as I am on a global basis (using “QS_EventLimitCount”)? Why isn't something like this possible?

    define specific requests to unique variables
    SetEnvIf Request_URI /wordpress QS_WordP
    SetEnvIf Request_URI /joomla QS_Joomla

    and set limits on those accordingly
    QS_ClientEventLimitCount QS_WordP 5 10
    QS_ClientEventLimitCount QS_Joomla 15 20

    Is there a way to do this like I am asking for that I am not seeing? Or are we simply limited to using single built-in variables for each individual control mechanism?

     
  • Your observations are correct. QS_EventRequestLimit is used to limit the number of specified events per server (one counter per defined event variable). The QS_ClientEventRequestLimit is a per client source IP counter limiting the number of QS_Limit events (one counter per client).

     
  • mod_qos 10.17: QS_ClientEventLimitCount supports now custom variables (unlimited number of counter per client).