projects
/
demos
/
kafka
/
chat
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3799ee0
)
feat: Added a default backend, that picks the server randomly
author
Kai Moritz
<kai@juplo.de>
Sun, 15 Jan 2023 18:16:09 +0000
(19:16 +0100)
committer
Kai Moritz
<kai@juplo.de>
Sun, 15 Jan 2023 18:16:09 +0000
(19:16 +0100)
haproxy.cfg
patch
|
blob
|
history
diff --git
a/haproxy.cfg
b/haproxy.cfg
index
0dd9ac5
..
2177daa
100644
(file)
--- a/
haproxy.cfg
+++ b/
haproxy.cfg
@@
-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