title: Super High Performance Socket Server - Implementation Details
body: <p>I've done my research and I know the best way to implement a high performance socket server is generally as follows: use async socket operations (specialized SocketAsyncEventArgs/Operations for best performance) and on the async callback, push the request to a processing queue that is tended by a pool of threads.</p>
  
  <p>My questions for this processing model - to have the greatest performance:</p>
  
  <p>1) when should the "End" operation of the socket be called (e.g. EndAccept or EndReceive)?  should this be called on the callback thread (IOCP) before queuing the request?  or called when the request gets taken out from the queue and gets processed (worker thread)?</p>
  
  <p>2) this question depends on the answer to #1.  when should the next "Begin" operation be called?  should we call it before we call EndOperation even or should we call it immediately right after EndOperation (before queuing/processing request)?</p>
  
  <p>3) can the processing queue simply be the .NET threadpool?  what advantages/drawbacks would using the .NET threadpool vs. rolling out your own synchronized processing queue?</p>
  
  <p>Any help is greatly appreciated.</p>