Let's say I have the following configuration of frontends and backends in HAproxy:
frontend F1
default_backend B1
frontend F2
default_backend B2
frontend F3
default_backend B3
frontend F_1_2
default_backed B1 B2 # How to do this?
backend B1
server serverB1_1 S:1001
server serverB1_2 S:1002
backend B2
server serverB2_1 S:1003
server serverB2_2 S:1004
backend B3
server serverB3_1 S:1001 # Reusing serverB1_1
server serverB3_2 S:1003 # Reusing serverB2_1
I have two questions from the above configuration:
- How do I use both B1 and B2 for F3?
- How do I reuse the serverB1_1 and serverB2_1 in backend B3 instead of redefining it?