worker

package
v0.0.0-...-80e4d6b Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: AGPL-3.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

View Source
const MinConcurrencyPerRequestQueue = 4

MinConcurrencyPerRequestQueue prevents RequestQueue starvation in query-frontend or query-scheduler instances. When the RequestQueue utilizes the querier-worker queue prioritization algorithm, querier-worker connections are partitioned across up to 4 queue dimensions representing the 4 possible assignments for expected query component: ingester, store-gateway, ingester-and-store-gateway, and unknown. Failure to assign any querier-worker connections to a queue dimension can result in starvation of that queue dimension.

View Source
const (
	// ResponseStreamingEnabledHeader is the header key used by http handlers to
	// indicate to the scheduler processor that its response should be streamed. This
	// header is internal to the querier only and removed before the response is sent
	// over the network.
	ResponseStreamingEnabledHeader = "X-Mimir-Stream-Grpc-Response"
)

Variables

This section is empty.

Functions

func NewQuerierWorker

func NewQuerierWorker(cfg Config, handler RequestHandler, log log.Logger, reg prometheus.Registerer) (services.Service, error)

Types

type Config

type Config struct {
	FrontendAddress                string            `yaml:"frontend_address"`
	SchedulerAddress               string            `yaml:"scheduler_address"`
	DNSLookupPeriod                time.Duration     `yaml:"dns_lookup_duration" category:"advanced"`
	QuerierID                      string            `yaml:"id" category:"advanced"`
	QueryFrontendGRPCClientConfig  grpcclient.Config `` /* 134-byte string literal not displayed */
	QuerySchedulerGRPCClientConfig grpcclient.Config `` /* 151-byte string literal not displayed */
	ResponseStreamingEnabled       bool              `yaml:"response_streaming_enabled" category:"experimental"`

	// This configuration is injected internally.
	MaxConcurrentRequests   int                       `yaml:"-"` // Must be same as passed to PromQL Engine.
	QuerySchedulerDiscovery schedulerdiscovery.Config `yaml:"-"`
}

func (*Config) IsFrontendOrSchedulerConfigured

func (cfg *Config) IsFrontendOrSchedulerConfigured() bool

func (*Config) RegisterFlags

func (cfg *Config) RegisterFlags(f *flag.FlagSet)

func (*Config) Validate

func (cfg *Config) Validate() error

type RequestHandler

type RequestHandler interface {
	Handle(context.Context, *httpgrpc.HTTPRequest) (*httpgrpc.HTTPResponse, error)
}

RequestHandler for HTTP requests wrapped in protobuf messages.

Jump to

Keyboard shortcuts

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