load balancing
Hi all,
I need to load balance between 2 webserver what is the most fastest way of doing this? With iptables? if yes wich line's do i need to use i have a RH 7.2 with iptables running already doing al network traffic
cheers
Sander
currently i'm using this line
iptable -t nat -A PREROUTING -d X.X.X.X -p tcp --dport http -j DNAT --to-dest 192.168.0.100-192.168.0.111
this this the job but the if i use the same client it always uses 100 for ex.
but we need to do some preformance test with 3 client's so everytime a client
does a reqeust to the http server i want to get it for a different server.
anybody ?
thanks
Sander
Quoted 10 lines · Sander Sneekes
Hi all,
I need to load balance between 2 webserver what is the most fastest way of doing this? With iptables? if yes wich line's do i need to use i have a RH 7.2 with iptables running already doing al network traffic
cheers
Sander
Im going to be working on one of these later this year it's my understanding that you would want to use the nth patch and the state table and SNAT to accoplish this.
From the nth patch.
------------------------
2) Unique rule for every packet. This is an easy and quick method to produce load-balancing for both inbound and outbound. example:
iptables -t nat -A POSTROUTING -o eth0 -m nth --counter 7
--every 3 --packet 0 -j SNAT --to-source 10.0.0.5
iptables -t nat -A POSTROUTING -o eth0 -m nth --counter 7
--every 3 --packet 1 -j SNAT --to-source 10.0.0.6
iptables -t nat -A POSTROUTING -o eth0 -m nth --counter 7
--every 3 --packet 2 -j SNAT --to-source 10.0.0.7
This example evenly splits connections between the three SNAT addresses.
By using the mangle table and iproute2, you can setup complex load-balanced routing.
------------------------
Here's a site with good infos on the patches available.
http://www.netfilter.org/documentation/HOWTO//netfilter-extensions-HOWTO.html
Hope this helps.
Quoted 29 lines · Sander Sneekes
currently i'm using this line
iptable -t nat -A PREROUTING -d X.X.X.X -p tcp --dport http -j DNAT --to-dest 192.168.0.100-192.168.0.111
this this the job but the if i use the same client it always uses 100 for ex.
but we need to do some preformance test with 3 client's so everytime a client
does a reqeust to the http server i want to get it for a different server.anybody ?
thanks
SanderQuoted 10 lines · Sander Sneekes
Hi all,
I need to load balance between 2 webserver what is the most fastest way of doing this? With iptables? if yes wich line's do i need to use i have a RH 7.2 with iptables running already doing al network traffic
cheers
Sander
Signature · 3 lines
Daniel Fairchild - Chief Security Engineer | [email protected] The distance between nothing and infinity is always the same no matter how close you get to nothing.
yepz thank daniel got the stuff working
also will the a deeper look to iproute
thx sander
Quoted 57 lines · Daniel F. Chief Security Engineer -
Im going to be working on one of these later this year it's my understanding that you would want to use the nth patch and the state table and SNAT to accoplish this.
From the nth patch.
------------------------
2) Unique rule for every packet. This is an easy and quick method to produce load-balancing for both inbound and outbound. example:iptables -t nat -A POSTROUTING -o eth0 -m nth --counter 7--every 3 --packet 0 -j SNAT --to-source 10.0.0.5
iptables -t nat -A POSTROUTING -o eth0 -m nth --counter 7
--every 3 --packet 1 -j SNAT --to-source 10.0.0.6
iptables -t nat -A POSTROUTING -o eth0 -m nth --counter 7
--every 3 --packet 2 -j SNAT --to-source 10.0.0.7
This example evenly splits connections between the three SNAT addresses.By using the mangle table and iproute2, you can setup complex load-balanced routing.
------------------------Here's a site with good infos on the patches available.
http://www.netfilter.org/documentation/HOWTO//netfilter-extensions-HOWTO.htmlHope this helps.
Quoted 29 lines · Sander Sneekes
currently i'm using this line
iptable -t nat -A PREROUTING -d X.X.X.X -p tcp --dport http -j DNAT --to-dest 192.168.0.100-192.168.0.111
this this the job but the if i use the same client it always uses 100 for ex.
but we need to do some preformance test with 3 client's so everytime a client
does a reqeust to the http server i want to get it for a different server.anybody ?
thanks
SanderQuoted 10 lines · Sander Sneekes
Hi all,
I need to load balance between 2 webserver what is the most fastest way of doing this? With iptables? if yes wich line's do i need to use i have a RH 7.2 with iptables running already doing al network traffic
cheers
Sander