shotover / shotover-proxy

L7 data-layer proxy
https://docs.shotover.io
Apache License 2.0
86 stars 17 forks source link

Fix RedisSinkCluster random node handling #630

Open rukai opened 2 years ago

rukai commented 2 years ago
  1. RoutingInfo::Random does not route to a random node but to the first node in the list of master nodes
  2. Many commands fallback to the default routing implementation of using the 2nd command arg as the key for a slot
    • This results in commands like "CLUSTER REPLICAS" using REPLICAS as a key which is absurd, we should instead use RoutingInfo::Random for this command. Actually thinking about it more, maybe we are better off setting "CLUSTER" commands as RoutingInfo::Unsupported for cluster hiding.
rukai commented 2 years ago

The second point is not fixed yet. CLUSTER REPLICAS is still routed with "REPLICAS" treated as a key.