1506 SAM IIS Whitepaper
1506 SAM IIS Whitepaper
1506 SAM IIS Whitepaper
Introduction
Before implementing your Internet Information Services (IIS) environment, consider the following
critical elements: security, load testing, scalability, and load balancing. Each can greatly impact
the user experience of your site. This paper outlines specific decisions and tasks you can perform
to effectively plan and implement your IIS environment.
table of contents
Security Considerations 3
File Locations 3
User Identities 4
Load Testing 5
Scalability 6
Application 6
Server 6
page 2
whitepaper: INTERNET INFORMATION SERVICES (IIS) IMPLEMENTATION BEST PRACTICES
security considerations
You enable the IIS Role and additional features using the Web Platform Installer. After you install
the application, complete these steps:
3. Search for IIS: ASP. Click Add on the IIS: ASP.NET 4.5 option. Click Install at the bottom of
the window, and click I Accept to begin the installation process
This enables the IIS Role, applies the recommended feature configuration, and enables .Net 4.5.
Installing these features will configure IIS correctly to serve ASP.Net websites and applications.
You will need to install any additional required IIS features beyond the following, which install
automatically with this method:
File Locations
A default installation of IIS places the folders on the C drive. It is recommended to move your
inetpub directory to a non-system partition. This should be done to ensure that if your IIS
implementation is compromised, that access to the system folders is not granted. This blog post
on iis.net explains how to move the folders to a different partition. It is written for IIS7, but the
page 3
whitepaper: INTERNET INFORMATION SERVICES (IIS) IMPLEMENTATION BEST PRACTICES
User Identities
As part of Service Pack 2 for Windows Server® 2008, Microsoft® introduced a new security
feature for IIS called application pool identities. This new identity allows you to run an application
pool under a unique identity without having to create or manage local or domain users. Beginning
with IIS 7.5 (Windows Server 2008 R2), this is the default user account for any newly created
application pool. For IIS7 (Windows Server 2008 SP2), you need to manually set up this user for
each application pool. You can do this via the GUI or by using appcmd. Run the following from a
command prompt to update the user of each application pool:
An SSL certificate is used to encrypt sensitive data transferred over an unsecure network, such as
the Internet. Without SSL implementation, data is visible as it is transmitted between your server
and the recipient of the requested data. With SSL implementation, the data is encrypted until it
reaches the destination computer. This protects the data, such as your credit card number, and
ensures that only the requesting entity can decrypt the data for actual viewing. If an account or
login is required, an SSL certificate should be acquired and implemented. The login page and all
subsequently browsed pages of your application should require a secure browsing session. If you
are simply providing information to anonymous or non-logged in clients, then an SSL certificate
probably not needed.
page 4
whitepaper: INTERNET INFORMATION SERVICES (IIS) IMPLEMENTATION BEST PRACTICES
load testing
Load testing provides a baseline for how your applications function under normal and peak loads.
This can point to bottlenecks in the infrastructure that can then be addressed to ensure that
your application performs in the best possible way. Visual Studio and other 3rd-party vendors
offer ways to load test your application. By performing load testing, you can determine if features
such as caching can aid in application performance.
Load testing can also reveal long-running SQL queries. If all Web metrics are within acceptable
limits for your application, but pages are still returning data slowly, you might need to optimize
SQL queries or stored procedures. You can implement SQL Query Analyzer to help determine
whether changes need to be made on the SQL Server® database(s). All of these things can
improve performance without having to scale.
When running load tests, you need to consider some key metrics. As new operating systems and
IIS versions are released, these key metrics continue to be the best options for evaluating the
health of your Web applications:
»» System counters
»» Memory\Available Mbytes
»» Memory\Pages/sec
»» ASP.NET Applications\Requests/Sec
»» ASP.NET\Application Restarts
»» ASP.NET\Requests Queued
page 5
whitepaper: INTERNET INFORMATION SERVICES (IIS) IMPLEMENTATION BEST PRACTICES
Scalability
Application
Scalability can relate to the application itself, or to the server infrastructure that hosts the
application. Improvements for scalability have been included with each new version of IIS. IIS6
introduced application pools for process isolation. This provided the ability to host multiple
applications or websites on the same server and ensure that the failure of any application was
isolated from other applications running on the same server. The ability to limit CPU usage by an
application pool also addressed runaway processes that could disrupt server activity.
Starting with Windows Server® 2012, several other enhancements were introduced that increased
the performance and scalability of IIS websites. The Centralized Certificate Store and Server Name
Indication are a few of the new features that have led to increased performance of websites on
an IIS implementation.
IIS8.5 brought even more scalability with the introduction of Dynamic Website Activation and
Idle Worker Process page-out. IIS8 changed the way SSL certificates are loaded, stored, and
configured within IIS. Before IIS8, all SSL certificates were loaded into memory as IIS loaded.
Starting with IIS8, SSL certificates are loaded as secured site requests are made, rather than
loading into memory and holding that memory space hostage. With the introduction of worker
process page-out and dynamic Web activation, you no longer need to load websites on start-up,
or shut down worker processes. These two enhancements for more websites to be hosted on
a single server, since rarely used applications and websites will not hold resources hostage that
could be used for active sites.
Server
Scalability of the servers themselves leads to load balancing and high availability, which will be
discussed later. Load balancing requires some configuration of the servers themselves to help
make sure that IIS configuration files and Web root files stay in sync.
To prepare your application servers for load balancing, enable the following features:
• Management Service.
Depending on your network configuration, you can use PowerShell™ to install these features
based on the following criteria:
page 6
whitepaper: INTERNET INFORMATION SERVICES (IIS) IMPLEMENTATION BEST PRACTICES
c. Click Enter.
c. Click Enter.
Depending on the environment, DFS/Robocopy is used to keep not only the Web root data synced
between the member servers, but also the IIS configuration. Robocopy is a core Windows®
executable beginning with Windows Server® 2008. You can find information related to configuring
Robocopy here. For configuration of DFS, please see this blog post.
A. Create a folder within inetpub named Config. This is the location where the IIS
configuration will be saved. A DFS replication group or Robocopy task will be created
for this folder.
e. Enter the folder location you created previously and enter an encryption
password. Document this password because you will need it later to enable
shared configuration on all nodes. This password will be stored and is the
page 7
whitepaper: INTERNET INFORMATION SERVICES (IIS) IMPLEMENTATION BEST PRACTICES
method that each server will use to decrypt any encrypted sections of the
IIS configuration files.
f. Click OK on the export and successful boxes. You are now ready to set up
Shared Configuration.
h. Enter the folder location where you stored the configuration files in the
previous step.
k. You will be prompted to restart IIS Manager and the Management Service for
the changes to take effect. Repeat these steps on all other nodes that will be
load balanced.
page 8
whitepaper: INTERNET INFORMATION SERVICES (IIS) IMPLEMENTATION BEST PRACTICES
network layer. ARR requires URL Rewrite, Web Farm Framework, and External Cache modules
as well. The combination of these three modules provides the ability to define your server farms
(groups of servers to be load balanced), route traffic to the correct nodes using URL Rewrite, and
test individual Web nodes to ensure that they are healthy and available to accept Web traffic. If
you need to perform traffic analysis that requires a preserved client IP address, you should also
install ARR Helper on each of the Web nodes to which ARR will route traffic.
ARR is a unique solution for IIS as a software-based load balancing solution because it is a
Microsoft® module that integrates with IIS and is configured using IIS Manager. The application
can be configured to load balance port 80 and 443 (standard Web application ports) and any
other ports you choose.
Before beginning the install and initial ARR configuration, know that the ARR server should be a
separate server from the Web nodes.
If you do not already have IIS installed, complete the installation steps at the beginning of this
document. You can then use the Web Platform Installer to add the additional modules to create
the ARR instance. To do this, search for ARR and click Add on Application Request Routing 3.0.
Click Install and I Accept to run the installation process. Upon completion of the install, a list of
all dependent modules that were also installed displays.
As soon as the installation is complete, you are ready to begin configuring your ARR instance for
load balancing. Open IIS Manager. You will notice a few new icons (Application Request Routing
and URL Rewrite) at the server level and the Server Farms group.
page 9
whitepaper: INTERNET INFORMATION SERVICES (IIS) IMPLEMENTATION BEST PRACTICES
To configure your first server farm, right-click on Server Farms and select Create Server Farm.
Enter an appropriate name for your server farm and click Next. On the following screen, enter
the DNS name or IP address of the first server and click Add. Repeat these steps for each server
you want to add to load balancing.
Click Finish to complete the setup of the server farm, which is the group of servers to which
the ARR server will route requests. Click OK to create the URL Rewrite rule for this server farm.
Note: choose this option only for the first server farm to ensure that routing is not broken as you
create subsequent farms.
By automatically creating the rule for the first farm, you have a template to use for future
reference. You will need to edit the rule to match a specific HTTP_HOST if you have more than
one server farm defined. To view the rule, click on the Server Name in IIS Manager and then the
URL Rewrite icon. You will see your rule listed in the GUI. This rule examines all traffic to match
the wildcard pattern and then routes it to the server farm arr-firstfarm. Based on the settings
for the server farm, the traffic is then routed to the nodes associated with the server farm based
on the defined rules configured.
The IIS Manager GUI displays multiple options to configure your server farm for load balancing.
To begin, the Load Balance feature has every option you could possibly want to configure.
The options include traditional as well as hash options for routing clients to the configured
page 10
whitepaper: INTERNET INFORMATION SERVICES (IIS) IMPLEMENTATION BEST PRACTICES
nodes. Weighted round robin ensures that traffic is routed to each node using even or custom
distribution (different percentage to each node) setting.
The Monitoring and Management feature allows you to view the traffic that is being routed to
the individual nodes. The screenshot below shows traffic patterns from an evenly distributed
weighted round robin implementation. Node 1 is in the same physical location and network as
the ARR server. Node 2 is an external server, which explains the difference in response time for
the requests.
When you have tested and verified that traffic is routing to the nodes as expected, you can
configure a health test page. Configure the URL, acceptable status codes, and response match.
For this demo, the default page returns a text value of node1 or node2. Clicking Verify URL Test
sends a request to each node and verifies that the returned status code and response match
are correct and will return a result of Pass.
page 11
whitepaper: INTERNET INFORMATION SERVICES (IIS) IMPLEMENTATION BEST PRACTICES
If either of the returned values do not match the defined settings, you will receive a failure
message in the Verify URL Test Results box.
ARR then marks the node as unhealthy and will not route additional traffic to that node until the
issue is resolved.
After the issue is resolved on the unhealthy node, ARR returns the node to a healthy status and
begins routing traffic to it again.
As you can see, ARR is a robust software-based load balancer that offers health check capabilities
for real-time monitoring of the nodes, and automatically directs traffic as needed if a node
becomes unhealthy.
Once testing and verification are complete, the DNS entry for websites that are not load balanced
should be updated to point to the IP(s) of the ARR server.
page 12
whitepaper: INTERNET INFORMATION SERVICES (IIS) IMPLEMENTATION BEST PRACTICES
©2015 SolarWinds, Inc. All rights reserved. SolarWinds®, the SolarWinds logo, ipMonitor®, LANsurveyor®,
and Orion® are among the trademarks or registered trademarks of the company in the United States
and/or other countries.All other trademarks are property of their respective owners. WP-1503
page 13