RoutingScope::from_cluster() is meant to route across every node in the cluster. Instead, it routes only within a single datacenter.
Why: from_cluster() sends the /localnodes request with no dc/rack filter. Alternator interprets an unfiltered request as "return nodes from the same datacenter as me," so the effective scope collapses to the datacenter of whichever node served /localnodes - typically the seed.
Example:
Consider a cluster with two datacenters:
dc1: nodes A (seed), B, C
dc2: nodes X, Y, Z
The client is configured with endpoint_url("http://A:8043") and RoutingScope::from_cluster().
- Expected: the client discovers and routes to all six nodes (A, B, C, X, Y, Z).
- Actual:
/localnodes on A receives no filter, so Alternator returns only nodes from A's own datacenter (A, B, C). The client routes to those three; X, Y, and Z are never used.
RoutingScope::from_cluster()is meant to route across every node in the cluster. Instead, it routes only within a single datacenter.Why:
from_cluster()sends the/localnodesrequest with nodc/rackfilter. Alternator interprets an unfiltered request as "return nodes from the same datacenter as me," so the effective scope collapses to the datacenter of whichever node served/localnodes- typically the seed.Example:
Consider a cluster with two datacenters:
dc1: nodes A (seed), B, Cdc2: nodes X, Y, ZThe client is configured with
endpoint_url("http://A:8043")andRoutingScope::from_cluster()./localnodeson A receives no filter, so Alternator returns only nodes from A's own datacenter (A, B, C). The client routes to those three; X, Y, and Z are never used.