Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

So my HAProxy configuration is similar to this.

listen webaustin 0.0.0.0:80
    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 10.10.10.101:80 maxconn 600 check fall 10
    server web2 10.10.10.102:80 maxconn 600 check fall 10
    server web3 10.10.10.103:80 maxconn 600 check fall 10
    server web4 10.10.10.104:80 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?

share|improve this question

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 client 600s
        timeout server 600s

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)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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