I am trying to use mod_qos to rate limit a multi-tenant apache instance based on Host header. For the most part, the logic is working as expected. However, even though mod_qos is correctly sending a 429 response code back to the client, it is still also allowing the request to proxy_pass to the upstream. I am intending to use this tool for DDoS mitigations and thus I need it to not saturate the upstream when the client has exceeded their limit. It should just return a 429 and not proxy the request. Please let me know if anything looks wrong.
I don't see any reason why mod_proxy would forward the blocked request to the target web server. Which Apache version and which mod_qos version are you using?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I am trying to use mod_qos to rate limit a multi-tenant apache instance based on
Host
header. For the most part, the logic is working as expected. However, even though mod_qos is correctly sending a429
response code back to the client, it is still also allowing the request to proxy_pass to the upstream. I am intending to use this tool for DDoS mitigations and thus I need it to not saturate the upstream when the client has exceeded their limit. It should just return a 429 and not proxy the request. Please let me know if anything looks wrong.Thank you.
mod_qos.conf:
httpd.conf sample:
example log entry:
Client sees only a 429, but the upstream (
127.0.0.1:8001
) shows request is still forwarded up.I don't see any reason why mod_proxy would forward the blocked request to the target web server. Which Apache version and which mod_qos version are you using?