API Reference riax v0.1.0
modules
Modules
This module provides the set of functions to communicate
with your VNode implementation. To implement a VNode, check
the Riax.VNode
module documentation.
For an example on how to setup and use Riax, check the
tutorial section.
A virtual node is an Elixir (or Erlang) process responsible for a partition of keys from the ring. The key word here is virtual (as opposed to physical), because we can have many virtual nodes running on a physical node. In the picture, the colored squares are physical nodes. With consistent hashing, we can determine which node should handle a given key, depending on which partition (and therefore, VNode) the key ends up. The way that keys are distributed is the Handoff, which is explained on a section below. The virtual node is responsible for handling requests and can store data to be retrieved. It is important to bear in mind that VNodes are not bound to a particular to a particular physical node. They can be relocated to another physical nodes as new nodes are added (using Riax.join) or a certain physical node is not available. Adding new nodes easily is useful for horizontal scaling.