From 2877f752888e48a4ce8041af3a67640253aa0865 Mon Sep 17 00:00:00 2001 From: Andrey Martyanov Date: Thu, 13 Jul 2017 13:09:28 +0300 Subject: [PATCH 1/2] Improve haproxy.cfg (#473) * Use more readable 'listen' section * Explicitely defined check options * Enable stats dashboard * Close HAProxy connections to a backend server when it's marked as down. --- haproxy.cfg | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/haproxy.cfg b/haproxy.cfg index 1ec195e3..f9d328e3 100644 --- a/haproxy.cfg +++ b/haproxy.cfg @@ -1,21 +1,25 @@ global - maxconn 100 + maxconn 100 defaults - log global - mode tcp - retries 2 - timeout client 30m - timeout connect 4s - timeout server 30m - timeout check 5s + log global + mode tcp + retries 2 + timeout client 30m + timeout connect 4s + timeout server 30m + timeout check 5s -frontend ft_postgresql - bind *:5000 - default_backend bk_db - -backend bk_db - option httpchk +listen stats + mode http + bind *:7000 + stats enable + stats uri / +listen batman + bind *:5000 + option httpchk + http-check expect status 200 + default-server inter 3s fall 3 rise 2 on-marked-down shutdown-sessions server postgresql_127.0.0.1_5432 127.0.0.1:5432 maxconn 100 check port 8008 server postgresql_127.0.0.1_5433 127.0.0.1:5433 maxconn 100 check port 8009 From 33d3cc433db6843c2dd9e7cbc76c8879adbe2834 Mon Sep 17 00:00:00 2001 From: Andrey Martyanov Date: Thu, 13 Jul 2017 13:11:02 +0300 Subject: [PATCH 2/2] Update python-etcd dependency (#472) * Update python-etcd dependency to use acceptable version range. --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index aa41f1df..5aeb8568 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,7 @@ PyYAML requests six >= 1.7 kazoo==2.2.1 -python-etcd==0.4.3 +python-etcd>=0.4.3,<0.5 python-consul==0.7.0 click>=4.1 prettytable>=0.7