title: Async-Await vs ThreadPool vs MultiThreading on High-Performance Sockets (C10k Solutions?)
body: <p>I'm really confused about <code>async-await</code>s, <code>pool</code>s and <code>thread</code>s. The main problem starts with this question: "What can I do when I have to handle 10k socket I/O?" (aka <a href="http://www.kegel.com/c10k.html" rel="noreferrer">The C10k Problem</a>).</p>
  
  <ul>
  <li>First, I tried to make a custom pooling architecture with threads
  that uses one main <code>Queue</code> and multiple <code>Thread</code>s to process all
  incoming datas. It was a great experience about understanding
  <code>thread-safety</code> and <code>multi-threading</code> but <code>thread</code> is an <em>overkill</em>
  with <code>async-await</code> nowadays.</li>
  <li>Later, I implemented a simple architecture with <code>async-await</code> but I
  can't understand why <em>"The async and await keywords don't cause
  additional threads to be created."</em> (<a href="https://msdn.microsoft.com/en-us/library/hh191443.aspx#BKMK_Threads" rel="noreferrer">from MSDN</a>)? I think there
  must be some <code>thread</code>s to do jobs like <a href="https://msdn.microsoft.com/en-us/library/system.componentmodel.backgroundworker.aspx" rel="noreferrer">BackgroundWorker</a>.</li>
  <li>Finally, I implemented another architecture with <code>ThreadPool</code> and it
  looks like my first custom pooling.</li>
  </ul>
  
  <p>Now, I think there should be someone else with me who confused about handling <em>The C10k</em>. My project is a dedicated (central) server for my game project that is hub/lobby server like <a href="http://www.minecraftsurvivalgames.com/" rel="noreferrer">MCSG</a>'s lobbies or COD's matchmaking servers. I'll do the login operations, game server command executions/queries and information serving (like version, patch).</p>
  
  <p>Last part might be more specific about my project but I really need some good suggestions about real world solutions about multiple (heavy) data handling.</p>
  
  <p>(Also yes, 1k-10k-100k connection handling depending on server hardware but this is a general question)</p>
  
  <hr>
  
  <p>The key point: <a href="http://blogs.msdn.com/b/pfxteam/archive/2009/10/06/9903475.aspx" rel="noreferrer">Choosing Between the Task Parallel Library and the ThreadPool</a> (MSDN Blog)</p>
  
  <hr>
  
  <p><strong>[ADDITIONAL]</strong> Good (basic) things to read who wants to understand what are we talking about:</p>
  
  <ol>
  <li><a href="http://www.dotnetperls.com/thread" rel="noreferrer">Threads</a></li>
  <li><a href="http://www.dotnetperls.com/async" rel="noreferrer">Async, Await</a></li>
  <li><a href="http://www.dotnetperls.com/threadpool" rel="noreferrer">ThreadPool</a></li>
  <li><a href="http://www.dotnetperls.com/backgroundworker" rel="noreferrer">BackgroundWorker</a></li>
  </ol>