Menu

QS_ClientEventRequestLimit Notworking, Need Helping!

Will Ng
2022-04-15
2022-04-15
  • Will Ng

    Will Ng - 2022-04-15

    Hello,

    I'm a novice web developer.
    I'm trying to to use mod_qos to limit the concurrent downloads/ segment downloads per visitor for my video streaming project to prevent IDM or download accelerator from hogging my vps' resources.
    The project is running on Apache 2.4.29/ Ubuntu 18.04 LTS, mod_qos v.11.44-1build1.
    Videos played by calling fuction in "videoplayback.php"

    The uri looks like this: /videoplayback/?sid=abcdef12345xyz
    Here is my config in virtual host.

    <IfModule qos_module> 
            SetEnvIf Request_URI ^/videoplayback/\?.*$ QS_EventRequest
            QS_ClientIpFromHeader X-Forwarded-For
            QS_ClientEventRequestLimit 2 #Two concurrent download threads/user
            SetEnvIf Request_URI ^/videoplayback/\?.*$ QS_Event
            QS_ClientIpFromHeader X-Forwarded-For
            QS_ClientEventPerSecLimit 1
    </IfModule>
    

    It turns out not working. May there's something wrong with the config? Idk.

    If you could give a suggestion, it'd be very appreciated.
    Thanks.

     

    Last edit: Will Ng 2022-04-15
    • Pascal Buchbinder

      1) RequestURI: this is the path portion of the request URL only (/videoplayback/) which means that your regular expression does not match.
      2) Noticed that you configured QS_ClientIpFromHeader twice (doesn't cause any problems but I wonder if you use this directive by intention)
      3) You might also check if you want to use QS_ClientSerialize.

      regards, Pascal

       

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.