HTTP Connection Pooling

房东的猫 提交于 2019-12-21 05:23:19

问题


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:

  1. Open multiple connections to service B and keep them alive
  2. When A needs to make a call to B, provide it with one of the connections from the pool

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?).

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.

来源:https://stackoverflow.com/questions/15077526/http-connection-pooling

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!