# Load balancer like HAproxy?

**URL:** <https://community.traefik.io/t/load-balancer-like-haproxy/4302>\
**Category:** Traefik v2\
**Tags:** tcp\
**Created:** [February 8, 2020, 9:51pm UTC](https://community.traefik.io/t/load-balancer-like-haproxy/4302 "2020-02-08T21:51:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![oai](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/oai/32/1560_2.png) [@oai](https://community.traefik.io/u/oai)\
**Post date:** [February 8, 2020, 9:51pm UTC](https://community.traefik.io/t/load-balancer-like-haproxy/4302/1 "2020-02-08T21:51:36Z")

</div>

Hello,

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:

```auto
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 🙂

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

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

backend rabbitmq_backend
  balance roundrobin
  mode tcp
  server rabbit01 0.0.0.0:5673 maxconn 4000 check
  server rabbit02 0.0.0.0:5674 maxconn 4000 check

```

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

Cheers
