X-Git-Url: http://juplo.de/gitweb/?a=blobdiff_plain;f=haproxy.cfg;h=d78a358a294cd6d137a5d4b8934f9a5b77f6c19a;hb=9eee3e78a1592e3b78cbdfca658a1019e9b635a8;hp=0dd9ac52e71ba17ee6ef8796a71347c582aea134;hpb=3799ee0bd52a72b668f640430873ec1e2d819b43;p=demos%2Fkafka%2Fchat diff --git a/haproxy.cfg b/haproxy.cfg index 0dd9ac52..d78a358a 100644 --- a/haproxy.cfg +++ b/haproxy.cfg @@ -3,7 +3,7 @@ defaults mode http timeout client 10s timeout connect 5s - timeout server 10s + timeout server 10m timeout http-request 10s log global @@ -19,8 +19,14 @@ frontend stats frontend frontend bind :8400 + default_backend random use_backend %[req.hdr(X-Shard),map(/usr/local/etc/haproxy/sharding.map)] +backend random + server b1 backend-1:8080 check + server b2 backend-2:8080 check + server b3 backend-3:8080 check + backend backend_1 server b1 backend-1:8080 check