title: Most Efficient High-Performance Server Socket/Thread Design
body: <p>I'm building an extremely high-performance piece of enterprise software, which will receive, handle, and respond to over 50,000 TCP requests per second.  This will be spread over a number of Amazon EC2 servers, but I'd like to get a single server able to handle as many thousand requests per second as possible (shooting for 5k/sec).  I'm most likely going to be using the m1.xlarge instance running Amazon Linux.</p>
  
  <p>I'm building this software in C++ with Boost ASIO, and I'm trying to figure out the most efficient way of architecting the socket handling.  In the examples (<a href="http://www.boost.org/doc/libs/1_53_0/doc/html/boost_asio/examples.html">http://www.boost.org/doc/libs/1_53_0/doc/html/boost_asio/examples.html</a>) I'm leaning toward emulating the "HTTP Server 2" since we'll have multiple vCPUs to employee.  </p>
  
  <p>Could someone really describe the pros/cons of each HTTP server example there, and dealing with this many connections, I'd really appreciate any additional insight (regarding Boost sockets, and/or high-throughput EC2 configuration).</p>
  
  <p>Thanks so much!</p>