Workflow
Consistent-hashing ring lookup API
Places nodes with virtual replicas on a hash ring and finds which node owns a key plus the next N nodes for replication, giving stable assignment under node changes. Answers 'Which shard/node owns this key?', 'Where do replicas go on the ring?'.
Price$0.02per request
MethodPOST
Route/v1/workflow/consistent-hash
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
consistent-hashingringshardingpartitionnodelookupreplicationworkflow
API URL
Integration docshttps://x402.hexl.dev/v1/workflow/consistent-hashExample request
{
"nodes": [
"n1",
"n2",
"n3"
],
"key": "session-abc",
"copies": 2
}Example response
{
"owner": "n1",
"owners": [
"n1",
"n3"
],
"keyHash": 2334701770,
"ringSize": 300,
"virtualNodesPerNode": 100,
"interpretation": "Key 'session-abc' maps to node 'n1' with replicas [n3]."
}Input schema
{
"type": "object",
"required": [
"nodes",
"key"
],
"properties": {
"nodes": {
"type": "array",
"items": {
"type": "string"
},
"examples": [
[
"n1",
"n2",
"n3"
]
]
},
"key": {
"type": "string",
"examples": [
"session-abc"
]
},
"replicas": {
"type": "integer",
"description": "Virtual nodes per physical node"
},
"copies": {
"type": "integer",
"description": "Number of owner nodes to return"
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}