forked from authzed/spicedb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
introduces configurable dispatch hashring
this new CLI allows parameterizing the replication factor used in hashring used by the dispatch client-side gRPC balancer. This was a bit more involved as the balancer registry is a global singleton meant to be registered on an init block. This would have required moving flag handling outside of cobra, which is not ideal. As a solution I changed how the balancer is named, appending the replication factor to the name, and introducing a lazy-load mechanism with a mutex: - if a balancer with a specific replication factor does not exist, lock is acquired and the balancer is registered. This avoids races if multiple spicedb servers are running in the same process - if a balancer exists already, it's not registered - we do not unregister the balancer when the server is wind down, as it could affect another spicedb instance in the process using the same replication factor
- Loading branch information
1 parent
b5886f0
commit 34a4202
Showing
7 changed files
with
80 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.