Solved

How to Load Balance of IIS Server by Apache httpd

Posted on 2012-04-10
14
900 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
  • 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
 
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
Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

 

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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Linux Scripting 3 97
Which Linux flavors will this run on? 6 76
Python variable _ manually assigned 9 63
installing LSI MegaRAID Storage Manager on CentOS 7 22 76
Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
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.
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…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

912 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now