II7 Pipelines request (or threads) [Answered]RSS

4 replies

Last post Jul 08, 2015 09:50 AM by intiko81

  • II7 Pipelines request (or threads)

    Jul 07, 2015 02:46 PM|intiko81|LINK

    Hello IIS team,

    I'm doing tests trying to figure out how does IIS process requests. With my tests, it seems that calling a web service, IIS process requests differently than calling a web site (aspx). Pipelines are created randomly when calling a web service (asmx). and I want to know is there a way to limit theses piplines, i.e 32 or 64 (enough to handle a throttle situation) ?

  • Re: II7 Pipelines request (or threads)

    Jul 08, 2015 03:19 AM|Pengzhen Song - MSFT|LINK


    As I know, the IIS pipeline is a state machine with the following states:


    When a request is received, it moves through the state machine step-by-step until completion.

    I think aspx and asmx has the same pipeline. For more infromation, please refer to the document:


    We are trying to better understand customer views on social support experience. Click HERE to participate the survey.
  • Re: II7 Pipelines request (or threads)

    Jul 08, 2015 03:46 AM|tweenet|LINK

    An easy way to see what's happening in an IIS request pipeline is to enable Failed Request Tracing for the request and then view the Complete Request Trace,

    You can see all the handlers and modules used in the request and compare that to another request.

    I don't think there is anything random going on and I think all requests are following the same rules.

    If you don't need certain handlers or modules, you can remove them for your site or the server, this makes the pipeline shorter and at least in theory the request quicker. You could remove all 32bit and all asp.net 2 handlers. 

    Peter Hahndorf
  • Re: II7 Pipelines request (or threads)

    Jul 08, 2015 09:35 AM|intiko81|LINK

    Thanks for you two for this answer.

    Let me try to explain my mentality to serve requests. From any aspx or asmx file, I return a [ThreadStatic] singleton of "RequestRelayer". It intercepets  a request and take its parameters. So any new created pipeline, it has its own RequestRelayer (own instance of the application). the RequestRelayer itself has an instance of the main entrance to the web application all the way down to the database access (which is a [ThreadStatic] singleton too and is always connected, ready to serve sqls). I must limit the created pipelines to have a limited number of connected "DataServer" to the database.

    Does anyone know if there is a real limit? 

    PS: I did my tests to see how many new singelon of RequestRelayer I have and yesterday I reached to 100 out of 50k requests maybe.

  • Re: II7 Pipelines request (or threads)

    Jul 08, 2015 09:50 AM|intiko81|LINK

    I found this interestring.

    Pipeline Instance Count

    The number of active request pipeline instances for the specified ASP.NET application. Because only one execution thread can run within a pipeline instance, this number represents the maximum number of concurrent requests that are being processed for a specific application. In most circumstances, it is better for this number be low when the server is busy, because this means that the CPU is well used.

    Source: https://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/a8c5b994-7722-4dc6-a246-7dfe667c6816.mspx?mfr=true