title: HTTP Connection Pooling
body: <p>Service A calls into service B via HTTP. This happens frequently, and the size of transferred data is not very big. I discovered that re-using the same TCP connection to send multiple requests from A to B seems to improve latency. Naturally, the idea of connection pooling comes to mind:</p>
  
  <ol>
  <li>Open multiple connections to service B and keep them alive</li>
  <li>When A needs to make a call to B, provide it with one of the connections from the pool</li>
  </ol>
  
  <p>Implementing this involves solving some problems which are outside of the scope of what I'm trying to do, so I'm looking for a cheap way to implement this (maybe have some specifically configured proxy server between A and B?). </p>
  
  <p>I could just jump in and start coding, but this problem seems so common that I'm pretty sure someone has already solved it before.</p>