Overview
The Shard Servers is a crucial component of the Ultipa Powerhouse (v5) architecture, typically comprising multiple servers dedicated to distributed graph storage and computation. This design enables horizontal scaling while delivering highly competitive performance.
Each shard supports multi-replica data storage. In the three-shard setup below, shards 1
and 2
each have three replicas, while shard 3
has two replicas. Graphsets are distributed across these shards, with Graph_1
stored in all three shards, Graph_2
and Graph_3
partially stored across the three shards, and Graph_4
located in a single shard.
A graphset can be projected from the physical storage of shard servers into their respective memory, creating a distributed projection. On these distributed projections you can execute graph algorithms. For more information, refer to Managing Distributed Projections.
Showing Shard Servers
Retrieves information about all shard servers:
show().shard()
The details returned for each shard server include:
Field |
Description |
---|---|
shardId |
The unique identifier, typically numbered sequentially (1, 2, 3, ...), of each shard server. |
shardStatus |
Current state of the shard server, which can be ACTIVE or DEAD . |
replicas |
The replicas of the shard server. Each replica includes:
|
Adding a Shard Server
After successfully deploying a new shard server, it must be registered with the meta servers using the alter().shard().add()
statement before it can be utilized. This process ensures that the new shard server is recognized within the system.
The following example adds a shard server 4
with three replicas:
alter().shard().add({
shardId: 4,
replicas: [
{addr: "127.0.0.1:40061", streamAddr: "127.0.0.1:40023"},
{addr: "127.0.0.2:40061", streamAddr: "127.0.0.2:40023"},
{addr: "127.0.0.3:40061", streamAddr: "127.0.0.3:40023"}
]
})
Deleting a Shard Server
You can unregister an inactive or obsolete shard server from the meta servers using the alter().shard().delete()
statement.
The following example deletes the shard server with the shardId
1:
alter().shard().delete({shardId: 1})