Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Best Practices For High Performance Transactions In IIS

Posted on 2016-09-26
2
Medium Priority
?
138 Views
Last Modified: 2016-10-07
I'm looking for IIS configuration best practices for receiving many short lived calls to a web service to allow high transaction volume. I plan on having about 10 websites with hundreds of users each. Each user session in the web application will send a small piece of data to my collection web service every few seconds. The data would only be a few bytes and would be sent from the client using ajax to the HTTP service in the collection web app.

I plan on making the collection web app it's own website in IIS dedicated to only receiving these small pieces of data since it could potentially be receiving hundreds of connections per second and this is where I am looking for best practices/suggestions for how IIS should be configured. The webservice will receive the data and insert it into a database table. The database performance is not really the subject of this question but I will accept any architecture suggestions as well if I shouldn't be doing an insert with each call to the service.

So far I have disabled logging for the collection website, kept data sent to the service as minimal as possible(not sure if http compression would still be beneficial here), ensured a small timeout is set for inserting into the database (data loss is acceptable), disabled session state.
0
Comment
Question by:OriNetworks
2 Comments
 
LVL 39

Assisted Solution

by:Aaron Tomosky
Aaron Tomosky earned 400 total points
ID: 41817110
First establish a baseline using jmeter or something similar. That way if you change something you know if it has an effect.

Have a call that writes to sql and one that doesn't and see the difference in load.

On the sql side, make sure your databases are not set to auto close and your logging is appropriate.

Depending on where you see problems you can focus your efforts on optimizing.

A quick search for "iis tuning" has plenty of results with good advice from reputable sources
https://technet.microsoft.com/en-us/magazine/2005.11.pumpupperformance?f=255&MSPPError=-2147217396
0
 
LVL 29

Accepted Solution

by:
Dan McFadden earned 1600 total points
ID: 41817424
10 websites with 100s of users each... shouldn't be an issue for a properly sized server.  

I would recommend the following:

1. Each website or web service should get its own AppPool
2. Break out the web service from a parent website.  Don't bury the web service in an existing site, it makes for complicated access.  For example, if the site requires a login but the web service does not, you will have to break your site's security model to allow anonymous access to a specific page.
3. Move the application structure off of the boot drive (c:).  Place your sites on a set of dedicated HDDs.  Do not just partition off a slice of the HDDs where the OS lives.
4. Move the SQL Server Service off server to dedicated hardware.  SQL Server is a resource hog, it needs its own house.
5. If the server has a single IP:
5a. Do not use the "All Unassigned" site binding.  Choose the specific IP that the server is configured with and configure the Host Name for the binding.
6. If the server has multiple IPs:
6a.  Do not use the "All Unassigned" site binding.  Choose the matching IP as configured in DNS.  It doesn't hurt to configure the Host Name here.
7. Make sure that the sites are deployed into Production with debug-false.  This can be a massive performance hit.
7a.  Link:  https://blogs.msdn.microsoft.com/prashant_upadhyay/2011/07/14/why-debugfalse-in-asp-net-applications-in-production-environment/
8.  If your web service is WCF, disable WCF services tracing.  Also can be a performance hit.
8a. Link:  https://msdn.microsoft.com/en-us/library/ms732009.aspx
9. Enable HTTP compression.  even if the data transmitted is small, there are still other pieces of the protocol in the request that may benefit compression
10. Long list of various IIS 8.5 (most line up with IIS 8) deep tech tuning options.  Read and understand before some of these, especially is web site run on the same server as web services.
10a. Link: https://msdn.microsoft.com/en-us/library/windows/hardware/dn567678(v=vs.85).aspx
11. Enable caching (more for sites than services)
11a. Link:  http://aspnetfaq.com/enable-caching-in-iis-to-speed-performance/

* I would not recommend enabling Web Gardening (AppPool with multiple worker processes allowed).  Though this may sound interesting, it tend to cause more issues than it addresses.  It may be appropriate in certain instances, but you need to test extensively to be sure it helps and not hinders.

Dan
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs). Being someone who is always looking for alternatives to "work your data", I came across this …
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

971 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