Home > Storage > ObjectScale and ECS > Product Documentation > ECS with HAProxy Load Balancer > Global load balancing
When there are two or more geographically dispersed ECS sites supporting the same namespace(s), a mechanism to load balance across the nodes between sites is recommended especially in three or more sites where it becomes key for taking advantage of ECS storage efficiency achieved via ECS XOR feature.
Another advantage is when one site is unavailable; requests will automatically be forwarded to surviving site(s) providing disaster recovery and high availability. Global load balancing can be achieved by either using DNS, network routing (i.e., OSPF: Open Shortest Path First, BGP: Border Gateway Protocol, etc.), a global server load balancer (GLSB) or combination of these techniques. The following figure provides an example of client requests being sent to a Domain Name System (DNS) which have an entry for a global load balancing mechanism or HAProxy load balancer which also can be setup to be redundant. The global load balancing techniques used would forward requests to a pool of HAProxy load balancers that will forward requests to a pool of ECS nodes within a replication group.
When considering a global load balancing mechanism, it is important to understand that ECS reads check the owner of the object to validate if it has the latest copy locally. If data is not local in the site cache or the site is not the owner of object, then it would need to retrieve the data from site that owns the object. Thus, when architecting a global load balancing solution, it is advised to send or direct the read requests to the owning site if possible. This may depend on the workflow and application.