I want to make a simple code to load balance my 2 vps.
I want to make a load balancer for vps, not for the apache webserver or mysql.
And I want to use the third small vps to load balance my 2 vps, and I will add more in the future.
Can you guys point me the basic how load balancer work?
Is it just forwarding the tcp connection?
Any link is really appreciated.
I want to make a simple code to load balance my 2 vps. I
Share
The easiest way would be a round-robin DNS database.
Server:
The DNS-record would look like this:
Whenever a user wants to resolve the hostname example.com the DNS server gives you the full list of addresses and your resolver chooses one.
First DNS answer would be 1.1.1.1 … second userDNS request would get a 2.2.2.2