libplanet icon indicating copy to clipboard operation
libplanet copied to clipboard

`NetMQTransport` queue clogging due to insufficient number of workers

Open greymistcube opened this issue 3 years ago • 1 comments

As an ITransport interface, call to each of its method with timeout specified should be expected fail after the given amount of time period. However, due to its internal implementation, timeout is only considered when NetMQ actually attempts to process a given request. This would not be much of a problem if a Message gets processed by NetMQ near immediately after being enqueued, but with insufficient number of workers, which would depend on how lively the network currently is, this completely breaks the transport's behavior, and hence, also the Swarm<T>. As the number of workers determine the throughput of a NetMQTransport, there should be a better fail-safe mechanism to discard "stale" enqueued requests instead of trying to process every call to ITransport's method.

greymistcube avatar Jan 04 '22 00:01 greymistcube

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

stale[bot] avatar Apr 16 '22 01:04 stale[bot]