Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ShuffleShardExpectedInstances ¶
func ShuffleShardExpectedInstances(shardSize, numZones int) int
ShuffleShardExpectedInstances returns the total number of instances that should be selected for a given tenant. If zone-aware replication is disabled, the input numZones should be 1.
func ShuffleShardExpectedInstancesPerZone ¶
func ShuffleShardExpectedInstancesPerZone(shardSize, numZones int) int
ShuffleShardExpectedInstancesPerZone returns the number of instances that should be selected for each zone when zone-aware replication is enabled. The algorithm expects the shard size to be divisible by the number of zones, in order to have nodes balanced across zones. If it's not, we do round up.
func ShuffleShardSeed ¶
func ShuffleShardSeed(identifier, zone string) int64
ShuffleShardSeed returns seed for random number generator, computed from provided identifier.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.