Config for clustering

hi everyone
i planing to use clustering for my websites . my goal is give my clients best ping in 2 countries .
so i rent 2 dedicated servers in each country and i will setup Cpanel,Mysql and galera for databases .
im new to haproxy !
i think i should setup haproxy and geodns together to redirect every client to near server !
just need help on how to setup haproxy and config it for this project .

thanks all

I suggest you start by reading the Stater Guide here:
https://cbonte.github.io/haproxy-dconv/1.8/intro.html

And read about the specifics in the configuration guide:
https://cbonte.github.io/haproxy-dconv/1.8/configuration.html

If you have an specific question, just ask. Asking us to do the design for you is not what this forum is for though.

If you have a geodns based solutation already in place, great, just configure it to DNS load-balance to the closest haproxy instance.

1 Like

Thanks for your answer
i read all of the links you give
i already setup haproxy and it works well but i dont know how should i config it to route clients based on their Ip address !
i try load balancing source algorithm
how should i tell the haproxy to redirect uk clients to uk server ?
and us clients to us server ?

thanks for your help

Let’s see if I got this right:

You don’t have any geodns provider at all, you just put it in the first post because you think that would be something you’d need to work with. You also do not have any idea on how this solution should actually look like, not even high level.

I’m sorry, this forum is not a free design consultation for DIY-CDN’s.

Get a real CDN service like Cloudflare or Akamai or hire someone who can work out a proper design for you.

2 Likes