-
Notifications
You must be signed in to change notification settings - Fork 27
Clients' requests fairness
The RequestPool
holds queues, one per each client id.
Once it receives a request it calls the RequestInspector
to extract the ClientID
and adds the request to the respective client's queue.
When batching requests to create a new Proposal
the requests are chosen in a round-robin fashion from the queues.
While the batching is done only by the leader, the followers use the same technique to determine on which requests should they start a timer, after which they suspect something is wrong.
Queues are removed when empty.
An application which uses this library can choose how to delegate the different client ids. For example, if clients belong to different organizations, and the application wishes to have fairness between organizations' requests, rather than clients' requests, it can return the same ClientID
from the RequestInspector
for all clients belonging to the same organization.
To prevent a DOS attack by a client the queues size must be fixed and configured in a manner that prevents frequent timeouts on requests in nodes which lead to view changes.