basho / riak_core

Distributed systems infrastructure used by Riak.
Apache License 2.0
1.23k stars 392 forks source link

Add a soft-limit check to vnode proxy #921

Closed russelldb closed 5 years ago

russelldb commented 6 years ago

See riak#1661 for initial issue/discussion.

This PR supports https://github.com/basho/riak_kv/pull/1670

Adds a message (call and cast) for getting the estimated length of the mailbox queue from the vnode proxy. The returns of soft-limit indicates that the estimate of the vnode queue length is greater or equal to double the check interval. The return includes the mailbox queue estimated length and the check interval (i.e. soft-limit / 2) so that the caller can make their own decisions about the load state of the vnode.

NOTE: in our testing we lowered the check interval down to 50 as even a small increase in queue size can lead to high outlying latency increases for coordinated operations.