Hi,

I am trying to achieve the following : when a response from the application server contains a header named "X-test", send the following requests from the client IP to another backend for 5 minutes. The goal is to send clients who abuse the servers to a slower queue.

Here is what I got so far :

In the frontend:
    stick-table type ip size 100k expire 5m store gpc1
    tcp-request content track-sc1 src
    use_backend slow if { sc1_get_gpc1 gt 0 }

In the backend:
    acl mark_as_high_usage sc1_inc_gpc1 gt 0
    ??? if res.hdr_cnt(X-test) mark_as_high_usage

Does this look good so far ?
I am wondering what to use in place of the ???, because no action is to be taken in the backend, this serves only as a way to use the ACL and mark the IP using gpc1 so that the frontend sends its further connections to another backend.

Thanks in advance.

Sylvain Faivre.



Reply via email to