Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I try to say them with other words.</p> <p>In a server you can have many asp.net sites that runs together. Each one site is an <strong>app domain</strong>.</p> <p>You must assign to each of them one <strong>application pool</strong>. Many application domains (sites) can have the same application pool, and because they have the same application pool they run under the same processes, and under the same account - and they have the same settings of the pool. If this pool restarts, then all sites under that pools restarts.</p> <p>Now each pool can have one or more <strong>worker process</strong>. Each worker process is a different program that's run your site, have their alone static variables, they different start stop calls etc. Different worker process are not communicate together, and the only way to exchange data is from common files or a common database. If you have more than one worker process and one of them make long time calculations, then the other can take care to handle the internet calls and show content.</p> <p>When you assign many worker process to a single pool then you make the called <strong>web garden</strong> and your site is like to be run from more than one computer if a computer is one processing machine.</p> <p><a href="https://i.stack.imgur.com/y0gTZ.gif" rel="noreferrer"><img src="https://i.stack.imgur.com/y0gTZ.gif" alt="app domains, with pools and processes"></a></p> <p>Each worker process can have many threads.</p> <p>How the more worker process affect you:<br> When you have <strong>one worker process</strong> everything is more simple, among your application all static variables are the same, and you use the <a href="http://msdn.microsoft.com/en-us/library/c5kehkcz.aspx" rel="noreferrer"><code>lock</code></a> to synchronize them.<br> When you assign <strong>more than one worker process</strong> then you still continue to use the <code>lock</code> for static variables, static variables are not different among the many runs of your site, and if you have some common resource (e.g. the creation of a thumbnail on the disk) then you need to synchronize your worker process with <a href="http://msdn.microsoft.com/en-us/library/system.threading.mutex.aspx" rel="noreferrer"><code>Mutex</code></a>.</p> <p>One more note. Its sounds that when you make <strong>more worker process</strong> then you may have more smooth asynchronous page loads. There is a small issue with the session handler of asp.net that is lock the entire process for a page load - that is good and not good depend if you know it and handle it - or change it.</p> <p>So let talk about one site only with many worker process. Here you face the issue that you need to synchronize your common resource change with <code>Mutex</code>. But the pages/handlers that use session they are not asynchronous because the session locks them. This is good for start because you avoid to make this synchronization of many points your self.</p> <p>Some questions on this topic:<br> <a href="https://stackoverflow.com/questions/9426673/web-app-blocked-while-processing-another-web-app-on-sharing-same-session">Web app blocked while processing another web app on sharing same session</a><br> <a href="https://stackoverflow.com/questions/9052401/jquery-ajax-calls-to-web-service-seem-to-be-synchronous">jQuery Ajax calls to web service seem to be synchronous</a><br> <a href="https://stackoverflow.com/questions/12284530/asp-net-server-does-not-process-pages-asynchronously">ASP.NET Server does not process pages asynchronously</a><br> <a href="https://stackoverflow.com/questions/8989648/replacing-asp-nets-session-entirely">Replacing ASP.Net&#39;s session entirely</a> </p> <p>Now this session lock is not affect different sites. </p> <p>Among different sites the more worked process can help to not the one site block the other with long running process.<br> Also among different sites the more pools also can help, because each pool have at least one worked process, but remember and see by your self using the process explorer, each working process takes more memory of your computer, and one big server with 16G memory and one SQL server can not have too many different worked process - for example on a server with 100 shared sites, you can not have 100 different pools.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload