eos icon indicating copy to clipboard operation
eos copied to clipboard

Support for persistent HTTP connections

Open aclark-b1 opened this issue 3 years ago • 1 comments

When transacting with an API it does three HTTP requests:

  • v1/chain/get_info to get the reference block
  • v1/chain/get_required_keys to check which key is needed
  • v1/chain/push_transaction to push the actual tx

We're pushing 1 transaction from 3 services every second, so we end up with 9 HTTP calls / second. The servers we're using (confidential VMs) have strict TCP port limitations (48) and since the channels are left open (MSL has a termination of 120s) and unable to be re-used until they close we end up consuming all available ports in little time just on transaction pushing which then impacts the rest of the service as it shares the same pool.

Aside from the benefits the request originator receives, it should also lower network congestion and cpu load on nodeos itself by reducing the number of open TCP connections it needs to track in the OS.

aclark-b1 avatar Jul 19 '21 13:07 aclark-b1

This issue is being worked on as we speak as part of the replacement of Websocket++ with boost::beast and is expected for 2.2 RC2

praphael avatar Jul 19 '21 19:07 praphael