Module routing

Source
Expand description

This module holds entities whose goal is to enable routing requests optimally, that is, choosing a target node and a shard such that it is a replica for given token.

This includes:

  • token representation,
  • shard representation and shard computing logic,
  • partitioners, which compute token based on a partition key,
  • replica locator, which finds replicas (node + shard) for a given token.

Modules§

locator
partitioner
Partitioners are algorithms that can compute token for a given partition key, ultimately allowing optimised routing of requests (such that a request is routed to replicas, which are nodes and shards that really own the data the request concerns). Currently, two partitioners are supported:

Structs§

InvalidShardAwarePortRange
An error returned by ShardAwarePortRange::new().
ShardAwarePortRange
A range of ports that can be used for shard-aware connections.
Sharder
Token
Token is a result of computing a hash of a primary key

Type Aliases§

Shard
ShardCount