All pastes #922551 Raw Edit

Untitled

public text v1 · immutable
#922551 ·published 2008-02-28 21:28 UTC
rendered paste body
# this config needs haproxy-1.1.28 or haproxy-1.2.1

global
        log 127.0.0.1   local0
        log 127.0.0.1   local1 notice

#log loghost    local0 info
        nbproc 1
        maxconn 4096
        chroot /usr/share/haproxy
        uid 99
        gid 99
        daemon
        #debug
        #quiet

defaults
        log     global
        mode    http
        option  httplog
        option  dontlognull
        option	httpclose
        retries 3
option redispatch

        maxconn 4000
        contimeout      5000
        clitimeout      50000
        srvtimeout      50000

frontend public
        mode            http
	log		global

	# Regex for the chat host
	reqisetbe	^[^\ ]*\ /chat	chat-backend

        default_backend default-backend

backend chat-backend
        bind            ip:port
	mode		http
	balance		roundrobin
        cookie  CHATSID rewrite
        contimeout      5000
        srvtimeout      5000
	retries		2
        server  localhost 202.85.237.129:8080 cookie server1 check inter 2000 minconn 100 maxconn 200 weight 1 rise 2 fall 5

backend default-backend
        bind            ip:port
	mode		http
	balance		roundrobin
        cookie  SERVERID rewrite
        contimeout      5000
        srvtimeout      5000
	retries		2
        server  localhost 202.85.237.129:8080 cookie server1 check inter 2000 minconn 100 maxconn 200 weight 1 rise 2 fall 5
        server  vmhost 202.170.1.2:8080 cookie server2 check inter 2000 minconn 200 maxconn 3800 weight 1 rise 2 fall 5
        stats uri /stats
        stats scope .
        stats scope chat-backend