Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ShardingStrategy ¶
type ShardingStrategy struct { // Configures the number of series needed to add a new shard. Computation is number of series / ScaleUpSeriesCount ScaleUpSeriesCount float64 // Percentage of needed series based on ScaleUpSeriesCount to scale down agents ScaleDownPercentage float64 }
ShardingStrategy is a struct that holds the configuration on how to scale prometheus agent shards up and down. It is used to compute the number of shards needed based on the number of time series. It works as follow:
ScaleUpSeriesCount = 1_000_000 ScaleDownPercentage = 0.20 time series = 1_000_000 => 1 shard time series increase to 1_000_001 => 2 shards time series decrease to 800_001 => 2 shards time series decrease to 800_000 => 1 shard
func (ShardingStrategy) ComputeShards ¶
func (pass ShardingStrategy) ComputeShards(currentShardCount int, timeSeries float64) int
We want to start with 1 prometheus-agent for each 1M time series with a scale down 20% threshold.
func (ShardingStrategy) Merge ¶
func (pass1 ShardingStrategy) Merge(pass2 *ShardingStrategy) ShardingStrategy
Click to show internal directories.
Click to hide internal directories.