LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Vserver and LVS: possibe? (https://www.linuxquestions.org/questions/linux-server-73/vserver-and-lvs-possibe-506440/)

slurpyx23 12-01-2006 01:24 AM

Vserver and LVS: possibe?
 
i've been trying and playing around with Vserver.. :study:

Now my next step is to.. do a VSERVER with Load Balancing (ipvsadm)... and run APACHE on the nodes... more :study:


VARIABLES:

* Kernel: vserver-sources

* Kernel to support Load Balancing
i already enabled the following on the kernel:
IP: Virtual Server Configuration --->
<M> IP virtual server support (EXPERIMENTAL)
[ ] IP virtual server debugging
(12) IPVS connection table size (the Nth power of 2)
--- IPVS transport protocol load balancing support[*] TCP load balancing support[*] UDP load balancing support

* Enabled IP forwarding. net.ipv4.ip_forward = 1


* MAIN VSERVER NAME: gentoo
IP (PUBLIC) eth0: xxx.xxx.xxx.xxx
IP (PRIVATE) eth1: 192.168.2.1
- LVS NAT
ipvsadm -A -t xxx.xxx.xxx.xxx:80
ipvsadm -a -t xxx.xxx.xxx.xxx:80 -r 192.168.2.2:80 -m
ipvsadm -a -t xxx.xxx.xxx.xxx:80 -r 192.168.2.3:80 -m

VSERVER NODE1 NAME: node1
IP (PUBLIC) eth0: NONE
IP (PRIVATE) eth1: 192.168.2.2
SERVICE INSTALLED: apache2

VSERVER NODE2 NAME: node2
IP (PUBLIC) eth0: NONE
IP (PRIVATE) eth1: 192.168.2.3
SERVICE INSTALLED: apache2


* I tried laod balancing windows using gentoo as a load balancer and windows running IIS as node. and it works...
(the only thing that i did was.. to point the gateway of the nodes private ip to the ip of the load balancers private ip..)

* i tried reading vserver docs.. on howto specifically point the vservers gateway to the private ip of the load balancer.. but with no luck. :(



anyone tried this setup.. ? is it even possibe?


basically i am trying to load balance NODE1 and NODE2.

Vserver and LVS? possibe?

slurpyx23 12-01-2006 09:07 PM

Put things on a drawing:

This is what i have done:


1 BIG BOX
+-----------------------------------------------------+

vhost: node1
ip-e0: null
ip-e1: 192.168.2.4 HOST: MASTER
ip-e0: xxx.xxx.xxx.xxx ---------------------- WWW
ip-e1: 192.168.1.1

vhost: node2
ip-e0: null
ip-e1: 192.168.2.3

+-----------------------------------------------------+


* ip forwarding is enabled on the nodes:
echo 1 >/proc/sys/net/ipv4/ip_forward

* i can ping the 192.168.1.* network

* ipvsadm

Code:


IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port          Forward Weight ActiveConn InActConn
TCP  xxx.xxx.xxx.xxx:http wlc
  -> 192.168.2.3:http            Local  1      0          0
  -> 192.168.2.2:http            Local  1      0          0

* telnet
telnet xxx.xxx.xxx.xxx 80
Trying xxx.xxx.xxx.xxx...
telnet: connect to address xxx.xxx.xxx.xxx: Connection refused


* Is there a way to make this work? via ip tables, routing.. etc.. ?? this thing is starting to confuse me.. :D


All times are GMT -5. The time now is 04:52 PM.