LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-23-2012, 04:01 AM   #1
uk.engr
Member
 
Registered: Apr 2012
Posts: 131

Rep: Reputation: Disabled
Load Balancing in Apache Server


Assalam o Alaikum.

I am new to Load Balancing. If I create two Apache servers having two virtual hosts on each now how can I setup Load Balancing server between these two. I need step by step guideline. Thanks!
 
Old 05-23-2012, 06:10 AM   #2
austinium
Member
 
Registered: Nov 2007
Location: India
Distribution: Debian Stable, Debian Testing
Posts: 219

Rep: Reputation: 27
Have a look here:
http://httpd.apache.org/docs/2.2/mod..._balancer.html
 
Old 05-24-2012, 01:49 AM   #3
uk.engr
Member
 
Registered: Apr 2012
Posts: 131

Original Poster
Rep: Reputation: Disabled
yes it is helpful. I have also studied from some other webs and I made first try for load balancing server after googling and reading stuffs on internet. What I did in VBOX: Is this task completed??

-Web server 1: 192.168.1.109
-Web server 2: 192.168.1.179
-Load balancer Server: 192.168.1.111

Web server 1 & 2 just containing index.html in /var/www/html having contents server 1 and server 2 respectively. Load balancer Server containing following lines in httpd.conf at last:

<VirtualHost *:80>
ProxyRequests off

ServerName domain.com

<Proxy balancer://mycluster>
# WebHead1
BalancerMember http://192.168.1.109:80
# WebHead2
BalancerMember http://10.176.42.179:80

# Security "technically we aren't blocking
# anyone but this the place to make those
# chages
Order Deny,Allow
Deny from none
Allow from all

# Load Balancer Settings
# We will be configuring a simple Round
# Robin style load balancer. This means
# that all webheads take an equal share of
# of the load.
ProxySet lbmethod=byrequests # may be bytraffic or bybusyness

</Proxy>

# balancer-manager
# This tool is built into the mod_proxy_balancer
# module and will allow you to do some simple
# modifications to the balanced group via a gui
# web interface.
<Location /balancer-manager>
SetHandler balancer-manager

# I recommend locking this one down to your
# your office
Order deny,allow
Allow from all
</Location>

# Point of Balance
# This setting will allow to explicitly name the
# the location in the site that we want to be
# balanced, in this example we will balance "/"
# or everything in the site.
ProxyPass /balancer-manager !
ProxyPass / balancer://mycluster/

</VirtualHost>

When we write in browser "domain.com" it switches between these two web servers (server 1 and server 2) for every refresh. Is this task Ok? This work for all 3 algorithms bybusyness, byrequests and bybusyness. Is this all about load balancing in Apache server?
 
Old 05-24-2012, 03:26 PM   #4
xonogenic
Member
 
Registered: Feb 2006
Posts: 30

Rep: Reputation: 2
I think its probably safe to assume you didn't read the link posted by austinium. Your question is addressed in the first couple paragraphs as Load Balancer Stickiness.

*Edit*

In regards to your question about if this is a problem or not, it probably isn't while the pages are static, but if you introduce sessions or anything like that, it will be an issue.

Last edited by xonogenic; 05-24-2012 at 03:28 PM.
 
  


Reply



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
Load Balancing - ipvsadm with apache (mod_proxy) to another apache not working romeo_tango Linux - Server 1 01-12-2012 03:21 AM
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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:44 PM.

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