-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Labels
Description
Situation:
- especially from v7, cluster shards may be routed via hosts instead of IPs
- thus, the advertised IPs may sometimes (with known examples) may not be routable
- SLOTS and SHARDS (v7+) provide the hosts; NODES does not, as far as known
Proposal:
- prefer SLOTS to NODES (but not SHARDS due to v7 dependency)
- route via hostname when available, IP otherwise
- possibly with option to use fallback old behaviour?
Was: "Lookup by endpoint should check IP and host"
Currently, only exact endpoint matches are considered. However, specially in the case of CLUSTER, a node may have both host and IP evidently. Further, -MOVED may return the unexpected option, leading to additional connections.
We should:
- record both identities as declared, for example from the
CLUSTER NODESresponse - if no equality endpoint match is found, check also using the best data available (after type-testing the endpoint)
Context: dotnet/aspnetcore#59211
Auxiliary consideration: should cluster routing be limited to IP, as current? Should there be a "use host routing" option? Or should we try IP and use host if that fails?
CaringDev