I wish to set up an load balancer via direct routing switching technique.I installed ipvsadm via
$ sudo apt-get install ipvsadm
Setup
Virtual IP is 172.17.10.173 subnet mask 255.255.240.0
linux director IP is 172.17.6.111
Real Server1 is 172.17.2.210
Real Server2 is 172.17.14.11
I have followed the instructions given on this page for Direct Routing except for the settings in /etc/sysctl.conf in real server because I have not installed any patch.
I am having problems in connecting to VIP.
curl 172.17.10.173
does not give any response.
Have you also configured heartbeat, or have you simply configured ipvsadm at this point? Can you run the command
which will list your current configuration, Could you add this to your post.
The most common mistake with using DR is that people incorrectly configure the loop back adapters on their real servers.
running the command
will show the current connections that ipvs has received.
Try attempting a connection to your VIP and then run the afore mentioned command. You are firstly looking for a connection from your test client to your real server. Then note the connection state (the bit on the end) is it Established, or is it SYN_RECV? If its SYN_RECV, the device with ipvsadm installed has not recieved a syn_recv packet from the real server which suggests a problem with your loop back adapter.
Also, where are you running the CURL command from is it on a separate client on your network?