# Global Load Balancing using Ha Proxy

**URL:** <https://discourse.haproxy.org/t/global-load-balancing-using-ha-proxy/1212>\
**Category:** Help!\
**Created:** [May 8, 2017, 1:37pm UTC](https://discourse.haproxy.org/t/global-load-balancing-using-ha-proxy/1212 "2017-05-08T13:37:36Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![suryakant86](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@suryakant86](https://discourse.haproxy.org/u/suryakant86)\
**Post date:** [May 8, 2017, 1:37pm UTC](https://discourse.haproxy.org/t/global-load-balancing-using-ha-proxy/1212/1 "2017-05-08T13:37:36Z")

</div>

Hi all,

I am new to this group and also to the technology. Please pardon my behavioural ignorance…

Can someone please let me know if we can do a global load balancing ( cross datacenter ) using HaProxy.  
If yes: Can you share a simple configuration example or guide me to the documentation where i can refer and create one.  
if no : Then why ??

I am using : HA-Proxy version 1.5.4 2014/09/02  
Requirement:

one Haproxy : Standalone  
Backend: 2Linux Servers  
Load balancing Method: Round Robin

Thanks in Advance !!!

---

<div class="post-metadata">

**Author:** ![tiagocruz](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.haproxy.org/tiagocruz/32/193_2.png) [@tiagocruz](https://discourse.haproxy.org/u/tiagocruz)\
**Post date:** [May 8, 2017, 3:25pm UTC](https://discourse.haproxy.org/t/global-load-balancing-using-ha-proxy/1212/2 "2017-05-08T15:25:07Z")

</div>

Hello,!

You, you can!

Some like this:

```auto
[...]
frontend front
  bind *:80
  mode http
  default_backend dc
  [...]

backend dc
  mode http
  balance roundrobin
  server dc1 200.1.1.1:80 check port 80 inter 5s
  server dc2 200.2.2.2:80 check port 80 inter 5s
  [...]

```

---

<div class="post-metadata">

**Author:** ![suryakant86](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@suryakant86](https://discourse.haproxy.org/u/suryakant86)\
**Post date:** [May 9, 2017, 4:54am UTC](https://discourse.haproxy.org/t/global-load-balancing-using-ha-proxy/1212/3 "2017-05-09T04:54:55Z")

</div>

Great Thanks a lot !!! Tiagocruz.

But now in case i want to change the backend servers load balancing method and say want to redirect the users based on there geographic location, can we do that ??

Regards  
Surya

---

<div class="post-metadata">

**Author:** ![tiagocruz](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.haproxy.org/tiagocruz/32/193_2.png) [@tiagocruz](https://discourse.haproxy.org/u/tiagocruz)\
**Post date:** [May 9, 2017, 1:57pm UTC](https://discourse.haproxy.org/t/global-load-balancing-using-ha-proxy/1212/4 "2017-05-09T13:57:46Z")

</div>

Hello suryakant86!

I know that you can do it using 3º part DNS (Cloudflare, AWS) or using Varnish. With HAProxy, to be honest, I don’t know. Let’s wait for another answer!

Regards

---

<div class="post-metadata">

**Author:** ![suryakant86](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@suryakant86](https://discourse.haproxy.org/u/suryakant86)\
**Post date:** [June 13, 2017, 5:37am UTC](https://discourse.haproxy.org/t/global-load-balancing-using-ha-proxy/1212/5 "2017-06-13T05:37:59Z")

</div>

Thanks a Lot tiagocruz…any one who can help me in setting up a Global Load Balancing like feature on Haproxy ??

---

<div class="post-metadata">

**Author:** ![lukastribus](https://avatars.discourse-cdn.com/v4/letter/l/7ea924/32.png) [@lukastribus](https://discourse.haproxy.org/u/lukastribus)\
**Post date:** [June 13, 2017, 11:37am UTC](https://discourse.haproxy.org/t/global-load-balancing-using-ha-proxy/1212/6 "2017-06-13T11:37:38Z")

</div>

This is a little more complex than copying and pasting some configurations.

I suggest you hire someone or get commercial support from [haproxy.com](http://haproxy.com).
