Load balancer like HAproxy?


I have been testing Traefik about few days and i really cannot understand how load balancer works.
Basically, i want to try out something like this:

Incoming traffic on port ip:5675 (data center 3) will goes to 
ip:5673 (data center 1)
ip:5674 (data center 2)

And if 1 of these goes offline, it will redirect traffic to the one that is online. these 3 data centers are not in same city

I am not sure if this traefik v2 can do this. I also tried HAproxy and it took me 10min to get what i want but with traefik, 2-3days and still not clue. I have never used HAproxy and Traefik :slight_smile:

I do have seen tutorials where ppl use docker to simulate whoami, but can traefik do something like this? Here is a sample config from HAproxy

listen rabbitmq_frontend
  bind *:5675
  mode tcp
  default_backend rabbitmq_backend
  option tcplog

backend rabbitmq_backend
  balance roundrobin
  mode tcp
  server rabbit01 maxconn 4000 check
  server rabbit02 maxconn 4000 check

here is my setup: 1 docker for treafik, 1 docker for rabbitmq , 1 docker for another rabbitmq