Results 1 to 5 of 5
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- Apr 2011
how to configure linux for load balancing
Suppose I have 3 machine each one is running ftp daemon(example), and have an application daemon which is monitoring load and can communicate with remaining servers. now for every new connection I can check load of each server and I want to redirect that socket connect request to least loaded server. that load balancer daemon should be able to do this at runtime without breaking any existing communication.
This should work seamlessly with any application. How I can achieve it using any combination of
Advance routing, VLAN, iptables ...... LINUX.
I have similar situation but for all/any traffic (not just ftp)
I have 1 domain and 3 servers and use round robin DNS for load balancing (more precisely load distribution)
on a daily average the load distribution is approximately +/- 5-10 % with is more than enough accuracy for me.
since the load distribution requires NO additional software at all, and is easily adjusted using your own NS, you may give more or less traffic to any one server if one of the servers has additional load of any other kind such as MySQL etc.
round robin DNS assumes that you have your own NS ( at least master ).
Using DNS as a load balancer is not the smartest way of doing this. DNS does not know when a server goes down and in your case if one server goes down 1/3 of your clients will not be able to connect until you update your DNS records. Another worry is the TTL of your records as they will be held by the clients until they are flushed or expire so even if you do catch it fast enough your clients may still have to wait.
If you are looking at load balancing then take a look at this project: LVS
Using something like this will keep clients from not being able to connect when a server goes down because it is aware of the servers state.
It all is a matter of $
if you have a multi million $ online business, bank, airline or similar site, then all your a.m. points surely are correct.
normal sites like mine run on round robin with high traffic and in the past 5 or so years of running my site on root servers I never had any downtime. I chose high end server HW and one of the finest server hosting company in Europe.
If ever there is a DDoS on a server farm, then even true load balancing won't help either. In the past 5 yrs such happened about 3 times for a few minutes in earlier years-
round robin as load distribution with a traffic sometimes in excess of 1TB per months still is highly accurate enough to do the job for me.
besides the many million $ online sites, there are millions of normal sites, even with free content, and for all those round robin is all they need.
I am a one man operation from site/server admin (remote from the other side of the planet) to content creation to my actual daily work. I love to keep my overhead as small as possible, install additional SW only if really needed. I never ever were near a situation to even consider a move away from round robin toward true load balancing.
investments in efforts, time, resources or $ have to be in a healthy relationship to revenue. there are millions of "normal" site/server owners who easily and successfully can run a site with round robin without causing any risk or damage to the planet or life or livelihood.
Sounds like you are trying to make it seem expensive to justify what you are doing. When in reality you have everything you need to run a load balancer. Have you looked at LVS? It has built in load balance. You would just need to reconfigure your setup to work as a cluster.