ShuffleShard returns a subring for the provided identifier (eg. a tenant ID) and size (number of instances). The size is expected to be a multiple of the number of zones and the returned subring will contain the same number of instances per zone as far as there are enough registered instances in the
(identifier string, size int)
| 747 | // - Shuffling: probabilistically, for a large enough cluster each identifier gets a different |
| 748 | // set of instances, with a reduced number of overlapping instances between two identifiers. |
| 749 | func (r *Ring) ShuffleShard(identifier string, size int) ReadRing { |
| 750 | return r.shuffleShardWithCache(identifier, size, false) |
| 751 | } |
| 752 | |
| 753 | func (r *Ring) ShuffleShardWithZoneStability(identifier string, size int) ReadRing { |
| 754 | return r.shuffleShardWithCache(identifier, size, true) |