Connections pooling for the incoming requests.
Maintain a Pool
mapping of the client ID and a http client.
The client ID can be the hash of the client IP address.
This is basically a sticky load balancing since each connection is reserved and assigned to
a particular client.
We can maintain the respective connection information about a particular client and reuse it.
Especially useful in scenarios wherein we want to use the same http connection for
example
in websockets or if you want to have a stateful connection.
Make sure to make it thread safe. So sprinkle a mutex over the pool map.
You can have an in-memory pool like the one above or cache the connection configs in redis for more durability.