locked
Are my Web Front Ends Load Balancing RRS feed

  • Question

  • Load balancing was supposed to be set up between the two web front ends via an F5. When I do a ping of the url I get the same IP address everytime. What does this mean? How do I know if my front ends are load balancing and how can I check this without taking a front end down.
    • Moved by Mike Walsh FIN Tuesday, March 16, 2010 1:43 PM admin q (From:SharePoint - General Question and Answers and Discussion (pre-SharePoint 2010))
    Tuesday, March 16, 2010 1:24 PM

Answers

  • You do not need to edit default.master on PROD. You can add test.html on every WFE server in C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS with a server name iside and call this page from URL  http://server/_layouts/test.html


    Oleg
    Tuesday, March 16, 2010 2:39 PM
  • One thing I would check right up front is that the IP address you're getting back from the PING is the IP address of the F5's load-balanced virtual IP address (VIP). If its the IP address for one of your WFEs, then you're probably not load-balanced. But if its not an IP address directly bound to your WFEs, that's a good sign.

    The biggest problem w/ load-balanced WFEs is knowing which server you're getting your content from whenever you load a page from the farm. There's a couple of tricks you can try to get that sorted out:
    • At %SYSTEM DRIVE%\Windows\system32\drivers\etc on your client computer there is a file called "hosts" (it doesn't have any extension). Open it with a text editor, and you should see a text file with a lot of descriptive info, followed by some IP addresses and URL (which are commented out). At the end of the file, add a new line, first entering the IP address of the WFE you want to try loading first, then a tab, then the URL you're using to access the SharePoint site at and save the file. This will hard code the URL to always be mapped to that IP address, rather than the one you get from your DNS server. Close any open browsers, then reopen them and load the SharePoint site. This will be coming directly from the IP address you listed in the Hosts file, rather than what your DNS server is telling it. You can repeat this for each server in the farm, to verify that each member of the VIP pool is properly responding. I use this, b/c trying to hit the IP addresses directly often fails due to issues w/ AAMs. Make sure to remove the line, or comment it out, if you don't want to use it once you're done with your test.
    • If you want to know which server is being selected by the VIP, there's a simple way to do it, although I would recommend doing it cautiously b/c its technically not supported: Locate the default.master file in the 12 Hive on each WFE, and make a copy of it for backup purposes. Then (this is the unsupported part, you should always be careful about manually modifying files in the 12 Hive, but this is fairly low-impact. Don't use this approach for UI customization or user-facing changes to SharePoint's files) modify the current default.master page on each server to add an HTML comment to the file indicating which server the file is being hosted on. Save the change, then flush the cache of your client browser and reload the site. Select the View Source option once the page loads, and search for the server name comment to determine which server the VIP selected for the content. Refresh your cache and reload the page again (you may have to do this a few times, depending on how your VIP's load-balancing rules are configured) to see what servers come through.
    John
    MCTS: WSS v3, MOSS 2007, and SCOM 2007

    Now Available on Amazon - The SharePoint 2007 Disaster Recovery Guide.
    Tuesday, March 16, 2010 2:16 PM

All replies

  • Just check your IIS logs. In case if NLB works fine you will able see activity on all WFE servers.


    Oleg

    Tuesday, March 16, 2010 2:13 PM
  • One thing I would check right up front is that the IP address you're getting back from the PING is the IP address of the F5's load-balanced virtual IP address (VIP). If its the IP address for one of your WFEs, then you're probably not load-balanced. But if its not an IP address directly bound to your WFEs, that's a good sign.

    The biggest problem w/ load-balanced WFEs is knowing which server you're getting your content from whenever you load a page from the farm. There's a couple of tricks you can try to get that sorted out:
    • At %SYSTEM DRIVE%\Windows\system32\drivers\etc on your client computer there is a file called "hosts" (it doesn't have any extension). Open it with a text editor, and you should see a text file with a lot of descriptive info, followed by some IP addresses and URL (which are commented out). At the end of the file, add a new line, first entering the IP address of the WFE you want to try loading first, then a tab, then the URL you're using to access the SharePoint site at and save the file. This will hard code the URL to always be mapped to that IP address, rather than the one you get from your DNS server. Close any open browsers, then reopen them and load the SharePoint site. This will be coming directly from the IP address you listed in the Hosts file, rather than what your DNS server is telling it. You can repeat this for each server in the farm, to verify that each member of the VIP pool is properly responding. I use this, b/c trying to hit the IP addresses directly often fails due to issues w/ AAMs. Make sure to remove the line, or comment it out, if you don't want to use it once you're done with your test.
    • If you want to know which server is being selected by the VIP, there's a simple way to do it, although I would recommend doing it cautiously b/c its technically not supported: Locate the default.master file in the 12 Hive on each WFE, and make a copy of it for backup purposes. Then (this is the unsupported part, you should always be careful about manually modifying files in the 12 Hive, but this is fairly low-impact. Don't use this approach for UI customization or user-facing changes to SharePoint's files) modify the current default.master page on each server to add an HTML comment to the file indicating which server the file is being hosted on. Save the change, then flush the cache of your client browser and reload the site. Select the View Source option once the page loads, and search for the server name comment to determine which server the VIP selected for the content. Refresh your cache and reload the page again (you may have to do this a few times, depending on how your VIP's load-balancing rules are configured) to see what servers come through.
    John
    MCTS: WSS v3, MOSS 2007, and SCOM 2007

    Now Available on Amazon - The SharePoint 2007 Disaster Recovery Guide.
    Tuesday, March 16, 2010 2:16 PM
  • You do not need to edit default.master on PROD. You can add test.html on every WFE server in C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS with a server name iside and call this page from URL  http://server/_layouts/test.html


    Oleg
    Tuesday, March 16, 2010 2:39 PM
  • We had the same issue and found a very simple solution. Edit an existing graphic file used by MOSS (we used helpicon.gif). We simply changed the bg color slightly on one of our WFEs using a photo editor.
    Graphics used by MOSS are generally found in the 12 hive at "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\IMAGES"


    Note that image caching may be an issue, so please flush.
    Tuesday, March 16, 2010 3:25 PM