limits

package
v3.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 8, 2024 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Limits

type Limits interface {
	// MaxQueriersPerUser returns max queriers to use per tenant, or 0 if shuffle sharding is disabled.
	MaxQueriersPerUser(user string) uint

	// MaxQueryCapacity returns how much of the available query capacity can be used by this user.
	MaxQueryCapacity(user string) float64
}

Limits needed for the Query Scheduler - interface used for decoupling.

type QueueLimits

type QueueLimits struct {
	// contains filtered or unexported fields
}

func NewQueueLimits

func NewQueueLimits(limits Limits) *QueueLimits

func (*QueueLimits) MaxConsumers

func (c *QueueLimits) MaxConsumers(tenantID string, allConsumers int) int

MaxConsumers is used to compute how many of the available queriers are allowed to handle requests for a given tenant. Returns the min value or one of (frontend.max-queriers-per-tenant, ceil(querier_replicas * frontend.max-query-capacity)) depending of whether both or only one of the two limits are configured. 0 is returned when neither limits are applied.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL