So my HAProxy configuration is similar to this.

listen webaustin
    mode http
    timeout connect 12000
    timeout server 60000
    timeout queue 120000
    balance roundrobin
    option httpchk GET /index.html
    log global
    option httplog
    option dontlog-normal
    server web1 maxconn 600 check fall 10
    server web2 maxconn 600 check fall 10
    server web3 maxconn 600 check fall 10
    server web4 maxconn 600 check fall 10

Which works pretty well for our systems, Four backend webservers, one frontend webserver, timeouts set to be reasonable.

My problem is, I have one URL, which i need to be vastly longer timeout. Its a very heavy task that takes a long time on the backend.

Is there anyway to change the timeout variables for a single URL?

1 Answer 1


create a single frontend to 2 backends

frontend webserver
        bind :80
        option forwardfor
        acl bk_slow url_dir /slow_uri/
        use_backend slow-pool if bk_slow
        default_backend default-pool

backend default-pool
        balance ...
        option httpchk ...
        server ...

backend slow-pool
        balance ...
        option httpchk ...
        server ...
        timeout server 600s
timeout client 600s is not necessary as it is a backend and haproxy warns about it.

I think url_dir is the best option for this, but you may want to check path_sub/reg or url_sub/reg (http://code.google.com/p/haproxy-docs/wiki/MatchingLayer7)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.