Service A calls service B through HTTP. This happens often, and the size of the transmitted data is small. I found that reusing the same TCP connection to send multiple requests from A to B improves latency. Naturally, the idea of a connection pool comes to mind:
- Open several connections to service B and save them.
- When A needs to call B, provide him with one of the connections from the pool
Implementing this requires solving some problems that are not within the scope of what I'm trying to do, so I'm looking for a cheap way to implement this (maybe you have a specific proxy configured between A and B?),
I could just jump in and start coding, but this problem seems so common that I'm sure someone has already solved it before.
user500944
source share