Solved

How to Load Balance of IIS Server by Apache httpd

Posted on 2012-04-10
14
1,026 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 334 total points
ID: 37831023
0
 
LVL 17

Assisted Solution

by:Anuroopsundd
Anuroopsundd earned 334 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
How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

 
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 166 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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

728 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