Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 01-11-2012, 04:30 AM   #1
Registered: Nov 2006
Distribution: Mint
Posts: 148

Rep: Reputation: 15
Load Balancing - ipvsadm with apache (mod_proxy) to another apache not working


I have these kind of configuration :

user -> firewall -> Server 0 (Apache with mod_proxy) -> loadbalancer

loadbalancer -- Server 1
                Server 2

Server 0 real IP : ; Virtual IP
Server 1 IP : ; local loopback lo:0 IP
Server 2 IP : ; local loopback lo:0 IP
I have already succeeded in load balancing process. I created some test.php files in Server 1 will show "1" and in Server 2 if the page being hit will display "2" in the browser. Since I used round-robin algorithm, it will display "1" and "2" alternately.

But today, when I checked the page, it only showed "1" everytime I refresh the browser and realize that it actually bypass the loadbalancer and directly hit the Server 1 from the apache server 0 (in server 1 apache's log, the traffic come from the server 0 real IP).

If I somehow turned the local loopback in server 1, it will display error 503 (service currently unavailable).

So I wonder whats wrong with my configuration? Why it won't recognized the load balancer IP properly?

Please advise. Thanks.

Last edited by romeo_tango; 01-11-2012 at 04:42 AM.
Old 01-12-2012, 03:21 AM   #2
Registered: Nov 2006
Distribution: Mint
Posts: 148

Original Poster
Rep: Reputation: 15
Hmm after a few checking, I noticed that the problem occured because :
- the mac address from local loopback in server 1 override the mac address in arp tables in the Server 0.
- that way, all request to the is directly forwarded to Server 1 and not the loadbalancer.

- I then delete the arp entry and create a static one in the arptables of Server 0 so that all the request will be forwarded to the load balancer again and the server now back to normal.

Anyone know what might cause the overridden?

The problem is already been solved, it just that I don't know why it could happen in the first place.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Conceptual details about apache load balancing ganesh_gore Linux - Server 0 06-22-2010 03:49 AM
Web Server Load Balancing using ldirectord and Apache romeo_tango Linux - Server 1 02-17-2010 03:46 AM
i need help for load balancing setting apache web server gnu_gcc Linux - Server 2 06-23-2008 03:06 PM
Load Balancing software for apache coolguy_iiit Linux - General 3 08-06-2006 01:31 PM
Apache Modules [load balancing] smart clustering ziox Linux - Networking 0 04-05-2006 10:10 PM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:53 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration