Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does IIS give each connected user a thread?

Tags:

I am doing some research on developing thread safe applications. I know users can use multiple threads on the same application (if the CPU works with more than one thread) but I am not sure what happens, and how IIS handles users when you have 5 users using the same application for example.

What does IIS do, are all the users working on the same thread? or are they given a thread each for example?

I am a newbie when it comes to IIS, so please bear with me. My question will help me understand whether I need to lock public static methods in my code (where thread safety is important).

like image 392
Ryan S Avatar asked Jun 19 '12 08:06

Ryan S


People also ask

Is IIS multithreaded?

IIS is a multi-threaded web server, because multi-threading is really the only way to achieve high-concurrency high-performance server applications on Windows (processes aren't as cheap as they are on Nix).

Is IIS single threaded?

IIS (and thus IISExpress, which is IIS packaged in an "application" format) is multi-threaded.

How many worker threads are there in IIS?

The “hard” limit on the max number of threads in the IIS thread pool. This limit can be set to a value between 64 and 256, so you cannot have more than 256 IIS threads in the pool regardless of settings.

How do I view threads in IIS?

To see how many threads are possible in an IIS server for specific hardware, Click on the server. Then on the right side pane, double click on ASP like this. The ASP Threads Per Processor Limit property specifies the maximum number of worker threads per processor that IIS creates.


1 Answers

Here is a good read to start with - ASP.NET Thread Usage on IIS 7.5, IIS 7.0, and IIS 6.0. The important thing you should remember - IIS will not create threads for users, it will create threads for concurrent calls. And of course you should create thread safe static methods, if they are not the pure.

like image 197
ie. Avatar answered Sep 17 '22 17:09

ie.