title: Is Kestrel using a single thread for processing requests like Node.js?
body: <p>Both <a href="https://docs.microsoft.com/en-us/aspnet/core/fundamentals/servers/kestrel" rel="noreferrer">Kestrel</a> and <a href="https://nodejs.org/en/about" rel="noreferrer">Node.js</a> are based on <a href="https://github.com/libuv/libuv" rel="noreferrer">libuv</a>.</p>
  
  <p>While Node.js exactly states that it uses <a href="https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/" rel="noreferrer">an event loop</a>, I can't seem to find if such is the case for Kestrel, or if it utilizes thread pooling / request queue like IIS?</p>
  
  <h2>Kestrel behind a web server</h2>
  
  <p><a href="https://i.stack.imgur.com/VRCpS.png" rel="noreferrer"><img src="https://i.stack.imgur.com/VRCpS.png" alt="Kestrel behind a web server"></a></p>
  
  <h2>Node.js event loop</h2>
  
  <pre><code>    ┌───────────────────────┐
   ┌─&gt;│        timers         │
   │  └──────────┬────────────┘
   │  ┌──────────┴────────────┐
   │  │     I/O callbacks     │
   │  └──────────┬────────────┘
   │  ┌──────────┴────────────┐
   │  │     idle, prepare     │
   │  └──────────┬────────────┘      ┌───────────────┐
   │  ┌──────────┴────────────┐      │   incoming:   │
   │  │         poll          │&lt;─────┤  connections, │
   │  └──────────┬────────────┘      │   data, etc.  │
   │  ┌──────────┴────────────┐      └───────────────┘
   │  │        check          │
   │  └──────────┬────────────┘
   │  ┌──────────┴────────────┐
   └──┤    close callbacks    │
      └───────────────────────┘
  </code></pre>