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 (*Config) RegisterFlags ¶
type RequestHandler ¶
type RequestHandler interface {
Handle(context.Context, *httpgrpc.HTTPRequest) (*httpgrpc.HTTPResponse, error)
}
RequestHandler for HTTP requests wrapped in protobuf messages.
Click to show internal directories.
Click to hide internal directories.