Clarification on FailoverRoute and gutter setup
kroemeke opened this issue · 1 comments
kroemeke commented
Hi there,
I'm trying to configure mcrouter in the following way:
Pool of N servers using consistent hashing, but if a shard dies - another shard is used, and if that shard dies - another one is used and so on...
Is it possible to have all requests to go to Pool with ch3 hash, and on shard failure - start using FailoverRoute with another or even the same pool of servers ?
Thanks in advance,
Marek
kroemeke commented
I found a working solution - which is having a FailoverRoute that has 2 children - 1st - HashRoute wrapped pool, followed by a FailoverRoute wrapped pool (same pool in my case). In case it helps anyone :
{
"pools":
{
"primary_ipv4": {
"hash": "ch3",
"protocol": "ascii",
"keep_routing_prefix": true,
"servers": [
"10.9.8.11:1234",
"10.9.8.17:1234",
"10.9.8.23:1234",
"10.9.8.29:1234",
"10.9.8.47:1234",
"10.9.8.5:1234",
"10.9.8.53:1234",
"10.9.8.59:1234",
"10.9.8.65:1234",
],
},
},
"route": {
"type": "FailoverRoute",
"children": [
"HashRoute|Pool|primary_ipv4",
"FailoverRoute|Pool|primary_ipv4"
],
"failover_errors": ["tko"],
}
}