Menu

Question about concurrent requests and error management

2021-04-19
2021-04-22
  • Richard Thibault

    Hello,

    I know that my underlying server can handle 10 queries at the same time, but I don't wan't to generate errors to my users : I would prefer to stack queries that are above these 10 queries.
    Is it possible to use mod_qos to do that ?

    Thank you for your answer.
    Best regards.

     
  • Pascal Buchbinder

    You can use QS_SrvSerialize to achieve this when combining it with QS_EventRequestLimit.

    Example:

    QS_SrvSerialize       on
    
    # queue size is 500
    QS_EventRequestLimit  LimitLocation 500
    # max. 20 concurrent
    SetEnvIfPlus          REQUEST_URI /serialize SerialLimtCfg=19
    # enable counter
    SetEnvIfPlus          REQUEST_URI /serialize LimitLocation=on
    <Location /serialize>
      # serialize when currency counter exceeds 19
      QS_SetEnvIfCmp      QS_EventRequestLimit_LimitLocation_Counter gt SerialLimtCfg QS_SrvSerialize=1
    </Location>
    
     

    Last edit: Pascal Buchbinder 2021-04-22
    • Pascal Buchbinder

      Update: I've edited the example (first line was the wrong directive).

       
  • Richard Thibault

    Fantastic !
    I would not have found the solution on my own, because I didn't know SerialLimtCfg and QS_EventRequestLimit_LimitLocation_Counter !
    Thank you !

     

    Last edit: Richard Thibault 2021-04-20
  • Richard Thibault

    I just have a question to precise the use of the serialization : is the serialization quue global or per Location ?
    If it's per Location, it means that the variable SerialLimtCfg can be defined per Location ?

     
    • Pascal Buchbinder

      There is only one single queue for QS_SrvSerialize.

       

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.