• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 190
  • Last Modified:

Best Practices For High Performance Transactions In IIS

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
OriNetworks
Asked:
OriNetworks
2 Solutions
 
Aaron TomoskySD-WAN SimplifiedCommented:
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
 
Dan McFaddenSystems EngineerCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now