Skip to content

Make NewRouter tolerant to the cluster's degraded state #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nurzhan-saktaganov opened this issue Jan 9, 2025 · 0 comments · Fixed by #39
Closed

Make NewRouter tolerant to the cluster's degraded state #13

nurzhan-saktaganov opened this issue Jan 9, 2025 · 0 comments · Fixed by #39

Comments

@nurzhan-saktaganov
Copy link
Collaborator

Original: KaymeKaydex/go-vshard-router#65

NewRouter returns an error if some (all) cluster replicas are down (or in case of misconfiguration too).

It's ok if some replicas are temporarily unavailable (due to an incident or something else).
However, it is not ok, if we can't start some application that uses go-vshard-router (or create struct Router instance) due to a degraded cluster.

We should be able to work as best as we can even in the worst possible external factors, for example: the availability of cluster replicas is an external factor, that can change over time (a replica can be under maintenance, a network between hosts might be cut off).

But it's ok to return an error due to internal factors, that will not change over time, for example, an invalid config won't fix automatically: an application should be restarted with the corrected config.

JFYI, similar issue in go-tarantool tarantool/go-tarantool#372

nurzhan-saktaganov added a commit to nurzhan-saktaganov/go-vshard-router that referenced this issue Jan 22, 2025
…tarantool#13)

* DiscoveryAllBuckets: don't cancel requests to other replicasets if request to some replicaset failed.
* add test for degraded cluster (TestDegradedCluster)
* AddReplicaset: don't fail if there are no available RW instances
* NewRouter: don't fail if DiscoveryAllBuckets has returned an error
nurzhan-saktaganov added a commit to nurzhan-saktaganov/go-vshard-router that referenced this issue Jan 22, 2025
…tarantool#13)

* DiscoveryAllBuckets: don't cancel requests to other replicasets if request to some replicaset failed.
* add test for degraded cluster (TestDegradedCluster)
* AddReplicaset: don't fail if there are no available RW instances
* NewRouter: don't fail if DiscoveryAllBuckets has returned an error
KaymeKaydex pushed a commit that referenced this issue Jan 23, 2025
…#13)

* DiscoveryAllBuckets: don't cancel requests to other replicasets if request to some replicaset failed.
* add test for degraded cluster (TestDegradedCluster)
* AddReplicaset: don't fail if there are no available RW instances
* NewRouter: don't fail if DiscoveryAllBuckets has returned an error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant