Iptables acting as a load balancer
Hello folks,
I'm investigating on the possibility to adopt an
iptables-enabled box to balance the incoming traffic toward a server farm.
The fundamental question is:
Q1: Does iptables allow a state-balancing? Or it simple span the packets on the range of IPs? (I further guess: Has it any reasonable sense?)
Q2: What happens in the case a target IPs doesn't respond yet? In other words Is iptables able to recognize an host failure?
Q3: Provided my needs, and supposing I'll receive negative answers, does exists some free/gpled solution feasible to me
Q4: Provided iptables fit positively to Q1 and Q2, does anyone experimented the solution? Any feedback to the regard?
I would thanks in advance all the repliers.
k.r.
*g
:\ Giovanni Costagliola
_______________________
Here I am
A young man
A crashing computer program
-- Orchestra by Servant
Quoted 2 lines · Giovanni Costagliola
Q1: Does iptables allow a state-balancing? Or it simple span the packets on the range of IPs? (I further guess: Has it any reasonable sense?)
iptables does not have any reasonable sense for load balancing. It is not what it is designed for.
Quoted 2 lines
Q2: What happens in the case a target IPs doesn't respond yet? In other words Is iptables able to recognize an host failure?
Not the job of iptables, but there is plenty of other software doing this.
Quoted 2 lines
Q3: Provided my needs, and supposing I'll receive negative answers, does exists some free/gpled solution feasible to me
For the low-level load balancing look into Linux Virtual Server / IPVS. Standard part of the Linux kernel. For the host monitoring see LVS/IPVS related software (there is several good options).
Quoted 2 lines
Q4: Provided iptables fit positively to Q1 and Q2, does anyone experimented the solution? Any feedback to the regard?
Have played with implementing NAT based load balancing ontop of netfilter NAT. It is technically doable but is missing some small pieces of accounting to make it work in a nice manner.
Regards
Henrik