0

Can anyone please tell me the difference the following metrics in Riak: 1. node_gets vs vnode_gets 2. node_puts vs vnode_puts

As per the documentation, node_gets is the number of gets co-ordinated by a node in the Riak cluster in the last 60 seconds, whereas vnode_gets is the number of gets co-ordinated by vnodes on a particular node. Since vnodes are responsible for managing the partitions and data in a Riak cluster, I am guessing that the node_gets should be a subset of vnode_gets.

If I have to figure out the number of get/put on the cluster by different clients, which among node_gets/vnode_gets and node_puts/vnode_puts should I use?

user1184527
  • 113
  • 1
  • 12

1 Answers1

1

When the client sends a get it goes to a single node that coordinates the get. The node_gets stat at that node gets incremented.

The node hashes the requested key, looks up the has in the ring, and gets the n_val(default 3) vnodes that should hold the value. It then forwards the request to the node that owns each of those vnodes. The vnode_gets stat at each of those nodes is then updated.

So each get from the client should equate to 1 node_get and n_val vnode_gets.

Joe
  • 25,000
  • 3
  • 22
  • 44