what happens when IIS site is idle and suddenly multiple requests arrives at a time concurrentlyRSS

1 reply

Last post Sep 18, 2020 11:53 PM by lextm

  • what happens when IIS site is idle and suddenly multiple requests arrives at a time concurrently

    Sep 17, 2020 09:22 AM|Hatim Johar|LINK

    Hi Team,

    I am observing a behavior with a webapi developed in .Net Framework 4.6.2 and hosted on IIS

    1. When site is initially deployed / Application pool is recycled / site reset command is issued
    2. and lets say two requests (call it A and B respectively) are send to the web api in the interval of 500 ms one after the other
    3. Since the webapi was idle, it will first invoke "Application_Start" event in global.ascx
    4. Now in logs, I was expecting request A first and then request B to receive at different time, however to my surprise they both were received at the same time

    Now my question here is, 

    what happens when IIS site is idle and suddenly multiple requests arrives at a time concurrently ? will it process all of them together ?

    Note - this happens only when site is idle, after it becomes active I see it is able to handle requests with right intervals.

    Please help me or share link that will have an answer to this case.

    Thanks,

    Hatim

  • Re: what happens when IIS site is idle and suddenly multiple requests arrives at a time concurren...

    Sep 18, 2020 11:53 PM|lextm|LINK

    Hatim Johar

    what happens when IIS site is idle and suddenly multiple requests arrives at a time concurrently ? will it process all of them together ?

    IIS/ASP.NET runtime will put the requests to a queue and try to process them as quickly as possible by spinning out more threads. However, often you observe "contention, poor performance and deadlocks",

    https://docs.microsoft.com/en-us/troubleshoot/aspnet/performance-call-web-service

    Lex Li
    Affordable IIS Consulting Services at https://support.lextudio.com/services/consulting.html
    ---------------------------
    This posting is provided "AS IS" with no warranties, and confers no rights.