-
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.
Signed-off-by: Tamal Saha <tamal@appscode.com>
- Loading branch information
Showing
1 changed file
with
14 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,15 @@ | ||
# operator-shard-manager | ||
|
||
Operator Shard Manager applies a label `shard.operator.k8s.appscode.com/<shard-config-name>: <shard-index>` on Kubernetes resources and assigns indices to controllers that manage those resources. | ||
|
||
This uses [consistent hashing with bounded load](https://research.google/blog/consistent-hashing-with-bounded-loads/) to achieve both uniformity and consistency across operator pods managing resources. | ||
|
||
## Key Considerations | ||
|
||
- A sharding aware operator implementation can use label to only watch and manage resources assigned to its own shard. But one has to be careful not consider a missing object from controller cache as deletion, as the object might has been moved to a different shard to balance sharding when operator pod count changes. | ||
|
||
- An alternative option will be to watch all objects of a given resource kind and use predicates to skip managing resources that are not in assigned to an operator pods's shard index. This will not reduce the list call response size. This approach has the benefit of accessing refrenced resources of the same kind that are not in the same shard. | ||
|
||
## Samples | ||
|
||
You can find example ShardConfiguration yamls [here](hack/samples). |