WEB208 IIS 6: Effective Management of Web Farms Scott Forsyth Director of IT ORCS Web, Inc. About Scott Forsyth Director of Technology, ORCS Web, Inc. http://weblogs.asp.net/OWScott http://www.orcsweb.com ORCS Web Hosts Many Community Websites http://www.asp.net http://www.aspalliance.com http://www.dotnet247.com http://channel9.msdn.com http://blogs.msdn.com Many Others Microsoft MVP, ASPInsider MCTS – SQL Server 2005 Purpose What Exploring the layers of a Web farm Front-end Load Balancers IIS Configuration Replication Content Store Options Tips and Tricks Demos will build a Web farm front to back Who IT Implementer – Setting it up Architect – Seeing the big picture Developer – How to get on the admin’s good side General Web Farm Diagram Clustering vs. Load Balancing Two Camps For High Availability Solutions Clustering Load Balancing Microsoft Cluster Server Microsoft NLB, or third party Stateful Stateless Strong Awareness of other parts Loose Awareness of other parts Microsoft SQL Server/Microsoft Exchange Server IIS/Terminal Services/RRAS Front End Load Balancers Types of Load Balancers RRDNS – “Poor Man’s Load Balancer” Inexpensive and easy to configure Doesn’t “balance”, only distributes Doesn’t support user affinity Doesn’t account for failed servers Good for fronting smaller Web farm clusters Third-party Load Balancing Solution Cisco LocalDirector, Foundry Networks Server Iron, etc. Most powerful and feature rich of the options Can be fully redundant Windows Network Load Balancer (NLB) Building the Front End - NLB Scott Forsyth ORCS Web, Inc. Network Load Balancing Overview All Nodes listen on virtual IP Uses an efficient algorithm to balance the load Benefits Included with all versions of Microsoft Windows Server 2003 Exceptionally easy to configure Supports Affinity/Stickiness – Class C Optional Consider AOL and other large ISPs Considerations Load Calculations only based on network Nothing out of the box to test Application Layer 7 Limited to 32 servers Unicast / Multicast Web Nodes – IIS Replication Manually From the GUI Scripting ADSI / WMI / Batch files IISCnfg.vbs Copy – 100% but few seconds of downtime Merge – all but deletes – no downtime Modified Version – no password in scripting file AD vs. Local users and groups Clean up machine specific references including IIS_WPG App Center 2000 COM+ Replication IIS Replication Using IISCnfg.vbs Scott Forsyth ORCS Web, Inc. Content Storage Local Content Diagram Content Storage Local Content Pros Complete isolation between servers Rarely disk bottlenecks Easy to scale out Cons Can’t support sites with writable content to disk More total disk space required Content Storage Remote Content Server Diagram Content Storage NAS/SAN Remote Content Pros Allows writing to disk from code – watch for locking though Changes to disk or code are immediate Less copies of data, less expensive disk requirements Cons Potential Disk IO bottlenecks Heavy network dependency – NAS Larger upfront costs (but good long term ROI)- SAN NAS Considerations http://support.microsoft.com/default.aspx?scid=kb;en-us;Q221790 C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\caspol -m -ag 1 -url "file://\\server.orcsweb.com\*" FullTrust -exclusive on Security on Share and NTFS permissions Content Replication Distributed File Systems Replication (DFS) – R2 Remote differential compression (RDC) Bandwidth throttling from 16Kbps to 256Mbps + full Conflict and Deleted folder – “last writer wins” Robocopy From Windows Server 2003 Resource Kit Tools Configurable, flexible Can replicate security settings Example command: robocopy.exe "D:\domains\orcsweb.com" "\\66.129.120.199\orcsweb.com$" /LOG:d:\admin\orcsweb_com_log.txt /E /W:5 /Z /PURGE App Center 2000 Configuring a NAS Server Using DFS Scott Forsyth ORCS Web, Inc. Web Nodes ASP.NET Considerations ViewState / forms authentication / webresource.axd <machineKey \> set to common value <machineKey validationKey='9D077E8E3B20D24AE0394764CDC6BEBA625374441B C010234CE6491152E91266367832BB573672245FF3F12924E2B89477 BDA89D2BCB917E578B99E710F721B2' decryptionKey='AF56C7ACEBB6A05A3AC198A70D615A246C2283B80 361E4C4' validation='SHA1'/> http://www.eggheadcafe.com/articles/GenerateMachineKey/GenerateMa chineKey.aspx http://www.orcsweb.com/articles/ASPNETMachineKey.aspx Caching For performance read-only – no change required If caching integrity is required – needs extra considerations Session State InProc Default, a no-go on a Web farm ASP.NET State Server Reasonably fast and easy to configure Not redundant All SiteIDs need to be the same HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ aspnet_state\Parameters\AllowRemoteConnection = 1 SQL Server Scalable and potentially redundant InstallSqlState.sql / aspnet_regsql.exe Build your own. ASP.NET v2.0 model makes it easier to develop custom providers Third-party solutions nCache – Alachisoft Tips and Tricks Local Node Testing Loopback adapter and NLB force local testing DNS – Node Specific Testing URLs Setup DNS wildcard – DNS once per node All host headers on all servers System.Environment.MachineName app_offline.htm - ASP.NET v2.0 SSL - One Certificate, Multiple Nodes IIS metabase replication requires same cert Filemon shows remote content on “Web servers” New Home for IIS Community! TechCenter to easily find the info you need Advice and assistance in Forums Insider info on new technology (IIS7!) Online labs, play with IIS7 in your browser Some of the Upcoming IIS Sessions Today 4:30 – 5:45 IIS 6: Everything the Web Administrator Needs to Know about MOM Tomorrow 8:30 – 9:45 IIS 7: End-to-end overview of Microsoft’s New Web Application Server 2:00 – 3:15 Chalktalk: IIS 6.0 Security: Setting the Record Straight 4:45 – 5:00 Chalktalk: IIS and Microsoft.com Operations: Migrating IIS 6.0 to 64 bit 5:30 – 6:45 Chalktalk: IIS 7 Q&A Thursday 2:45 – 4:00 IIS 7: Hands on Workshop for Building Custom Web Server Extensions Friday 1:00 – 2:45 IIS 7: Getting the Most out of New Delegation and Configuration Capabilities Resources IISCnfg.vbs http://www.orcsweb.com/articles/IISCnfg.aspx DFS http://www.orcsweb.com/articles/DFSResources.aspx NLB http://www.orcsweb.com/articles/NLBResources.aspx Robocopy http://www.orcsweb.com/articles/Robocopy.aspx Web Farm http://www.orcsweb.com/articles/WebfarmResources.aspx Machine Key http://www.orcsweb.com/articles/ASPNETMachineKey.aspx Technical Chats and Webcasts http://www.microsoft.com/communities/chats/default.mspx http://www.microsoft.com/usa/webcasts/default.asp Microsoft Learning and Certification http://www.microsoft.com/learning/default.mspx MSDN & TechNet http://microsoft.com/msdn http://microsoft.com/technet Technical Community Sites http://www.microsoft.com/communities/default.mspx User Groups http://www.microsoft.com/communities/usergroups/default.mspx Fill out a session evaluation on CommNet and Win an XBOX 360! © 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.