title: Performance of TNonblockingServer, TThreadPoolServer for DB-bound server in Python
body: <p>I am making an internal API in Python (pardon my terms) that provides a layer over MySQL and Solr (databases) with only simple computing. A Python program that spawns from scratch waits 80ms for Solr, while taking negligible time by itself. </p>
  
  <p>I am worried about the incomplete threading support of Python. So which of the modern Thrift servers allows high-performance request handling?</p>
  
  <hr>
  
  <p>In Python, I could make a WSGI app under Apache workers that:</p>
  
  <ul>
  <li>pooling resources such as DB connection objects</li>
  <li>high performance with minimum processes</li>
  <li>graceful dropping of requests</li>
  <li>(relatively) graceful code reloading</li>
  <li>a keep-alive mechanism (restart the application if it crashes)</li>
  </ul>