Menu

Max Conn Per IP with 4xx response instead of connection drop

Falco
2016-11-30
2018-02-01
  • Falco

    Falco - 2016-11-30

    I want to create a HTTP file Server based on mod_qos.

    For some download manager I need to anwser a request over connection limit with 4xx status. If I do just use QS_SrvMaxConnPerIP I got not answer at all. I did create a little workarround with QS_ClientEventRequestLimit 0 and an conditional EventRequest creation. Is there a better way to create a connection limit with http response? I'm not sure about the performance of my solution.

    Let me give you an basic example which I did use for my local configuration test.
    Testdetails: max 2 User and 1 Connection per IP

      QS_ClientEventRequestLimit 0
      QS_ErrorPage /error.html
      QS_ErrorResponseCode 429
    
      # max connections per client + 1
      QS_SrvMaxConnPerIP 2
      #reject max connections per IP + 1
      SetEnvIf QS_IPConn [2-9] QS_EventRequest
      #reject max clients + 1
      SetEnvIf QS_SrvConn [3-9] QS_EventRequest
    
      # maximum number of active TCP connections maxclients + 2 slots for error responses
      QS_SrvMaxConn 4 
    

    Did I miss a feature or have it to be like this?

    Kind Regards
    Falco

     
  • Pascal Buchbinder

    I think you should try to use the QS_ClientEventRequestLimit directive to limit the concurrent requests coming from the same IP

     

    Last edit: Pascal Buchbinder 2018-02-06

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.