?
Solved

How to Load Balance of IIS Server by Apache httpd

Posted on 2012-04-10
14
Medium Priority
?
1,076 Views
Last Modified: 2012-05-08
Hello All,

I Need help for configure Load balancing for my  Server, I have 3 IIS Server which is working on Windows 2008 Server, I want to distrubute Load from Apache because I think I can gain more than 10000 visitors, I want to use Apache on Frontend & All IIS Server on Backend as per attached Topology,


Can anyone help me for this type of configuration,
Apache-Load-Balance.jpg
0
Comment
Question by:Nilesh Havire
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 6
14 Comments
 
LVL 17

Accepted Solution

by:
Anuroopsundd earned 1336 total points
ID: 37831023
0
 
LVL 17

Assisted Solution

by:Anuroopsundd
Anuroopsundd earned 1336 total points
ID: 37831026
0
 

Author Comment

by:Nilesh Havire
ID: 37831119
Hi,

I am trying as per above link, but I am getting error (The request operation has failed) after changing httpd.conf in Apache below is my configuration, can you please help me

<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>
<VirtualHost 192.168.1.5:8888>
        ServerName www.yourcompany.com
      ServerAlias yourcompany.com

        DocumentRoot C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs

        ProxyRequests Off

        <Proxy *>
          Order deny,allow
          Allow from all
        </Proxy>

        ProxyPass / balancer://mycluster/ lbmethod=byrequests
      stickysession=BALANCEID nofailover=ON
      ProxyPassReverse / balancer://mycluster/

      BalancerMember http://OrangeCity-2:81/ route=node1
      BalancerMember http://OrangeCity-2:82 route=node2
          ProxySet lbmethod=byrequests
        </Proxy>

        <Location /balancer-manager>
          SetHandler balancer-manager
        </Location>

        <Directory "C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs">
         AllowOverride AuthConfig
      </Directory>


</VirtualHost>
0
Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

 
LVL 17

Expert Comment

by:Anuroopsundd
ID: 37831153
when you restart apache from command prompt can you provide the error...
0
 

Author Comment

by:Nilesh Havire
ID: 37831168
Getting below error in log file

Warning: DocumentRoot [C:/Library/WebServer/Documents] does not exist
httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.5 for ServerName
[Wed Apr 11 10:15:58 2012] [notice] Child 1620: Child process is running
[Wed Apr 11 10:15:58 2012] [notice] Child 1620: Acquired the start mutex.
[Wed Apr 11 10:15:58 2012] [notice] Child 1620: Starting 64 worker threads.
[Wed Apr 11 10:15:58 2012] [notice] Child 1620: Starting thread to listen on port 8888.
[Wed Apr 11 10:17:12 2012] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Wed Apr 11 10:17:12 2012] [notice] Child 1620: Exit event signaled. Child process is ending.
[Wed Apr 11 10:17:13 2012] [notice] Child 1620: Released the start mutex
[Wed Apr 11 10:17:14 2012] [notice] Child 1620: All worker threads have exited.
[Wed Apr 11 10:17:14 2012] [notice] Child 1620: Child process is exiting
[Wed Apr 11 10:17:14 2012] [notice] Parent: Child process exited successfully.
Warning: DocumentRoot [C:/Library/WebServer/Documents] does not exist
httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.5 for ServerName
[Wed Apr 11 10:17:43 2012] [notice] Apache/2.2.22 (Win32) configured -- resuming normal operations
[Wed Apr 11 10:17:43 2012] [notice] Server built: Jan 28 2012 11:16:39
[Wed Apr 11 10:17:43 2012] [notice] Parent: Created child process 3544
Warning: DocumentRoot [C:/Library/WebServer/Documents] does not exist
httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.5 for ServerName
Warning: DocumentRoot [C:/Library/WebServer/Documents] does not exist
httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.5 for ServerName
[Wed Apr 11 10:17:43 2012] [notice] Child 3544: Child process is running
[Wed Apr 11 10:17:43 2012] [notice] Child 3544: Acquired the start mutex.
[Wed Apr 11 10:17:43 2012] [notice] Child 3544: Starting 64 worker threads.
[Wed Apr 11 10:17:43 2012] [notice] Child 3544: Starting thread to listen on port 8888.
[Wed Apr 11 10:26:07 2012] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Wed Apr 11 10:26:07 2012] [notice] Child 3544: Exit event signaled. Child process is ending.
[Wed Apr 11 10:26:08 2012] [notice] Child 3544: Released the start mutex
[Wed Apr 11 10:26:09 2012] [notice] Child 3544: All worker threads have exited.
[Wed Apr 11 10:26:09 2012] [notice] Child 3544: Child process is exiting
[Wed Apr 11 10:26:09 2012] [notice] Parent: Child process exited successfully.
0
 
LVL 17

Expert Comment

by:Anuroopsundd
ID: 37831180
1. can you check if somethig else is also running on port 8888
     netstat -an
2. can you change
ServerName www.yourcompany.com
to
ServerName yourcompany.com
0
 
LVL 17

Expert Comment

by:Anuroopsundd
ID: 37831181
else try
ServerName localhost

and check if it runs..

you will require to restart apache.. after making changes...
0
 

Author Comment

by:Nilesh Havire
ID: 37831208
Same Issue yet after did localhost,  8888 is port no. of Apache
0
 
LVL 17

Expert Comment

by:Anuroopsundd
ID: 37831214
0
 
LVL 17

Expert Comment

by:Anuroopsundd
ID: 37831216
0
 

Author Comment

by:Nilesh Havire
ID: 37831268
After doing some changes Now Apache service is running and  it's  going to IIS can you please check my httpd.conf file

<VirtualHost *:80>
    ServerName foobar
    DocumentRoot "/var/empty"

    <Proxy balancer://idp-cluster>
        BalancerMember http://192.168.1.3:81 
      BalancerMember http://192.168.1.4:80
      BalancerMember http://192.168.1.5:81
    </Proxy>

    ProxyPass /balancer !
    ProxyPass / balancer://idp-cluster/
    ProxyPassReverse / http://192.168.1.2
    ProxyPassReverse / http://192.168.1.2
   
    <Location /balancer>
        SetHandler balancer-manager
        Order Deny,Allow
        Deny from all
        Allow from 10.
    </Location>
</VirtualHost>


But it's going only to http://192.168.1.3:81  is there any extra config for distribution as per load I means 192.168.1.3 server is Good Hardware so I want to send more request here
0
 

Author Comment

by:Nilesh Havire
ID: 37837176
Hello Please Help Me

I have done this configuration but When accessing either of the IIS servers directly (bypassing the load balancer) there is no problem, but when accessed over the load balancer, errors occur. The symptoms vary from NullPointerExceptions to javascript errors. So far I have not been able to tell what causes the difference in the resulting errors.


Can you please help me
0
 
LVL 26

Assisted Solution

by:arober11
arober11 earned 664 total points
ID: 37848834
Hi

Guessing your errors are down to a lack of stickiness, in your latest config. Basically your IIS servers may only be getting a third of the data they are expecting from a client, so you need a few tweaks to ensure all requests from one client (Browser) hit a single back end server. So  you'll want to add a:  ProxySet stickysession=JSESSIONID  directive before your </proxy> line.

Another obvious issue are the ProxyPassReverse entries, replace your existing entries with a single:

 ProxyPassReverse / balancer://idp-cluster/

On the testing front you'll need multiple clients (browsers) as the stickiness will ensure you keep on hitting the same instance from your any Browser.
0
 

Author Comment

by:Nilesh Havire
ID: 37854169
When accessing either of the IIS servers directly (bypassing the load balancer) there is no problem, but when accessed over the load balancer, errors occur.  Some time user unable to login, as per my ASP.net developer he said me event cant be fired when accessed over the load balancer, looks like all traffice not passed, How I will check Log for getting exact issue
0

Featured Post

Simple, centralized multimedia control

Watch and learn to see how ATEN provided an easy and effective way for three jointly-owned pubs to control the 60 televisions located across their three venues utilizing the ATEN Control System, Modular Matrix Switch and HDBaseT extenders.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month15 days, 4 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question