throttlerdata

package
v2.1.0-alpha.2+incompa... Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2017 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package throttlerdata is a generated protocol buffer package.

It is generated from these files:

throttlerdata.proto

It has these top-level messages:

MaxRatesRequest
MaxRatesResponse
SetMaxRateRequest
SetMaxRateResponse
Configuration
GetConfigurationRequest
GetConfigurationResponse
UpdateConfigurationRequest
UpdateConfigurationResponse
ResetConfigurationRequest
ResetConfigurationResponse

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	// target_replication_lag_sec is the replication lag (in seconds) the
	// MaxReplicationLagModule tries to aim for.
	// If it is within the target, it tries to increase the throttler
	// rate, otherwise it will lower it based on an educated guess of the
	// slave throughput.
	TargetReplicationLagSec int64 `` /* 128-byte string literal not displayed */
	// max_replication_lag_sec is meant as a last resort.
	// By default, the module tries to find out the system maximum capacity while
	// trying to keep the replication lag around "target_replication_lag_sec".
	// Usually, we'll wait min_duration_between_(increases|decreases)_sec to see
	// the effect of a throttler rate change on the replication lag.
	// But if the lag goes above this field's value we will go into an "emergency"
	// state and throttle more aggressively (see "emergency_decrease" below).
	// This is the only way to ensure that the system will recover.
	MaxReplicationLagSec int64 `protobuf:"varint,2,opt,name=max_replication_lag_sec,json=maxReplicationLagSec" json:"max_replication_lag_sec,omitempty"`
	// initial_rate is the rate at which the module will start.
	InitialRate int64 `protobuf:"varint,3,opt,name=initial_rate,json=initialRate" json:"initial_rate,omitempty"`
	// max_increase defines by how much we will increase the rate
	// e.g. 0.05 increases the rate by 5% while 1.0 by 100%.
	// Note that any increase will let the system wait for at least
	// (1 / MaxIncrease) seconds. If we wait for shorter periods of time, we
	// won't notice if the rate increase also increases the replication lag.
	// (If the system was already at its maximum capacity (e.g. 1k QPS) and we
	// increase the rate by e.g. 5% to 1050 QPS, it will take 20 seconds until
	// 1000 extra queries are buffered and the lag increases by 1 second.)
	MaxIncrease float64 `protobuf:"fixed64,4,opt,name=max_increase,json=maxIncrease" json:"max_increase,omitempty"`
	// emergency_decrease defines by how much we will decrease the current rate
	// if the observed replication lag is above "max_replication_lag_sec".
	// E.g. 0.50 decreases the current rate by 50%.
	EmergencyDecrease float64 `protobuf:"fixed64,5,opt,name=emergency_decrease,json=emergencyDecrease" json:"emergency_decrease,omitempty"`
	// min_duration_between_increases_sec specifies how long we'll wait at least
	// for the last rate increase to have an effect on the system.
	MinDurationBetweenIncreasesSec int64 `` /* 151-byte string literal not displayed */
	// max_duration_between_increases_sec specifies how long we'll wait at most
	// for the last rate increase to have an effect on the system.
	MaxDurationBetweenIncreasesSec int64 `` /* 151-byte string literal not displayed */
	// min_duration_between_decreases_sec specifies how long we'll wait at least
	// for the last rate decrease to have an effect on the system.
	MinDurationBetweenDecreasesSec int64 `` /* 151-byte string literal not displayed */
	// spread_backlog_across_sec is used when we set the throttler rate after
	// we guessed the rate of a slave and determined its backlog.
	// For example, at a guessed rate of 100 QPS and a lag of 10s, the replica has
	// a backlog of 1000 queries.
	// When we set the new, decreased throttler rate, we factor in how long it
	// will take the slave to go through the backlog (in addition to new
	// requests). This field specifies over which timespan we plan to spread this.
	// For example, for a backlog of 1000 queries spread over 5s means that we
	// have to further reduce the rate by 200 QPS or the backlog will not be
	// processed within the 5 seconds.
	SpreadBacklogAcrossSec int64 `protobuf:"varint,9,opt,name=spread_backlog_across_sec,json=spreadBacklogAcrossSec" json:"spread_backlog_across_sec,omitempty"`
	// ignore_n_slowest_replicas will ignore replication lag updates from the
	// N slowest REPLICA tablets. Under certain circumstances, replicas are still
	// considered e.g. a) if the lag is at most max_replication_lag_sec, b) there
	// are less than N+1 replicas or c) the lag increased on each replica such
	// that all replicas were ignored in a row.
	IgnoreNSlowestReplicas int32 `` /* 126-byte string literal not displayed */
	// ignore_n_slowest_rdonlys does the same thing as ignore_n_slowest_replicas
	// but for RDONLY tablets. Note that these two settings are independent.
	IgnoreNSlowestRdonlys int32 `protobuf:"varint,11,opt,name=ignore_n_slowest_rdonlys,json=ignoreNSlowestRdonlys" json:"ignore_n_slowest_rdonlys,omitempty"`
	// age_bad_rate_after_sec is the duration after which an unchanged bad rate
	// will "age out" and increase by "bad_rate_increase".
	// Bad rates are tracked by the code in memory.go and serve as an upper bound
	// for future rate changes. This ensures that the adaptive throttler does not
	// try known too high (bad) rates over and over again.
	// To avoid that temporary degradations permanently reduce the maximum rate,
	// a stable bad rate "ages out" after "age_bad_rate_after_sec".
	AgeBadRateAfterSec int64 `protobuf:"varint,12,opt,name=age_bad_rate_after_sec,json=ageBadRateAfterSec" json:"age_bad_rate_after_sec,omitempty"`
	// bad_rate_increase defines the percentage by which a bad rate will be
	// increased when it's aging out.
	BadRateIncrease float64 `protobuf:"fixed64,13,opt,name=bad_rate_increase,json=badRateIncrease" json:"bad_rate_increase,omitempty"`
}

Configuration holds the configuration parameters for the MaxReplicationLagModule which adaptively adjusts the throttling rate based on the observed replication lag across all replicas.

func (*Configuration) Descriptor

func (*Configuration) Descriptor() ([]byte, []int)

func (*Configuration) ProtoMessage

func (*Configuration) ProtoMessage()

func (*Configuration) Reset

func (m *Configuration) Reset()

func (*Configuration) String

func (m *Configuration) String() string

type GetConfigurationRequest

type GetConfigurationRequest struct {
	// throttler_name specifies which throttler to select. If empty, all active
	// throttlers will be selected.
	ThrottlerName string `protobuf:"bytes,1,opt,name=throttler_name,json=throttlerName" json:"throttler_name,omitempty"`
}

GetConfigurationRequest is the payload for the GetConfiguration RPC.

func (*GetConfigurationRequest) Descriptor

func (*GetConfigurationRequest) Descriptor() ([]byte, []int)

func (*GetConfigurationRequest) ProtoMessage

func (*GetConfigurationRequest) ProtoMessage()

func (*GetConfigurationRequest) Reset

func (m *GetConfigurationRequest) Reset()

func (*GetConfigurationRequest) String

func (m *GetConfigurationRequest) String() string

type GetConfigurationResponse

type GetConfigurationResponse struct {
	// max_rates returns the configurations for each throttler.
	// It's keyed by the throttler name.
	Configurations map[string]*Configuration `` /* 148-byte string literal not displayed */
}

GetConfigurationResponse is returned by the GetConfiguration RPC.

func (*GetConfigurationResponse) Descriptor

func (*GetConfigurationResponse) Descriptor() ([]byte, []int)

func (*GetConfigurationResponse) GetConfigurations

func (m *GetConfigurationResponse) GetConfigurations() map[string]*Configuration

func (*GetConfigurationResponse) ProtoMessage

func (*GetConfigurationResponse) ProtoMessage()

func (*GetConfigurationResponse) Reset

func (m *GetConfigurationResponse) Reset()

func (*GetConfigurationResponse) String

func (m *GetConfigurationResponse) String() string

type MaxRatesRequest

type MaxRatesRequest struct {
}

MaxRatesRequest is the payload for the MaxRates RPC.

func (*MaxRatesRequest) Descriptor

func (*MaxRatesRequest) Descriptor() ([]byte, []int)

func (*MaxRatesRequest) ProtoMessage

func (*MaxRatesRequest) ProtoMessage()

func (*MaxRatesRequest) Reset

func (m *MaxRatesRequest) Reset()

func (*MaxRatesRequest) String

func (m *MaxRatesRequest) String() string

type MaxRatesResponse

type MaxRatesResponse struct {
	// max_rates returns the max rate for each throttler. It's keyed by the
	// throttler name.
	Rates map[string]int64 `` /* 131-byte string literal not displayed */
}

MaxRatesResponse is returned by the MaxRates RPC.

func (*MaxRatesResponse) Descriptor

func (*MaxRatesResponse) Descriptor() ([]byte, []int)

func (*MaxRatesResponse) GetRates

func (m *MaxRatesResponse) GetRates() map[string]int64

func (*MaxRatesResponse) ProtoMessage

func (*MaxRatesResponse) ProtoMessage()

func (*MaxRatesResponse) Reset

func (m *MaxRatesResponse) Reset()

func (*MaxRatesResponse) String

func (m *MaxRatesResponse) String() string

type ResetConfigurationRequest

type ResetConfigurationRequest struct {
	// throttler_name specifies which throttler to reset. If empty, all active
	// throttlers will be reset.
	ThrottlerName string `protobuf:"bytes,1,opt,name=throttler_name,json=throttlerName" json:"throttler_name,omitempty"`
}

ResetConfigurationRequest is the payload for the ResetConfiguration RPC.

func (*ResetConfigurationRequest) Descriptor

func (*ResetConfigurationRequest) Descriptor() ([]byte, []int)

func (*ResetConfigurationRequest) ProtoMessage

func (*ResetConfigurationRequest) ProtoMessage()

func (*ResetConfigurationRequest) Reset

func (m *ResetConfigurationRequest) Reset()

func (*ResetConfigurationRequest) String

func (m *ResetConfigurationRequest) String() string

type ResetConfigurationResponse

type ResetConfigurationResponse struct {
	// names is the list of throttler names which were updated.
	Names []string `protobuf:"bytes,1,rep,name=names" json:"names,omitempty"`
}

ResetConfigurationResponse is returned by the ResetConfiguration RPC.

func (*ResetConfigurationResponse) Descriptor

func (*ResetConfigurationResponse) Descriptor() ([]byte, []int)

func (*ResetConfigurationResponse) ProtoMessage

func (*ResetConfigurationResponse) ProtoMessage()

func (*ResetConfigurationResponse) Reset

func (m *ResetConfigurationResponse) Reset()

func (*ResetConfigurationResponse) String

func (m *ResetConfigurationResponse) String() string

type SetMaxRateRequest

type SetMaxRateRequest struct {
	Rate int64 `protobuf:"varint,1,opt,name=rate" json:"rate,omitempty"`
}

SetMaxRateRequest is the payload for the SetMaxRate RPC.

func (*SetMaxRateRequest) Descriptor

func (*SetMaxRateRequest) Descriptor() ([]byte, []int)

func (*SetMaxRateRequest) ProtoMessage

func (*SetMaxRateRequest) ProtoMessage()

func (*SetMaxRateRequest) Reset

func (m *SetMaxRateRequest) Reset()

func (*SetMaxRateRequest) String

func (m *SetMaxRateRequest) String() string

type SetMaxRateResponse

type SetMaxRateResponse struct {
	// names is the list of throttler names which were updated.
	Names []string `protobuf:"bytes,1,rep,name=names" json:"names,omitempty"`
}

SetMaxRateResponse is returned by the SetMaxRate RPC.

func (*SetMaxRateResponse) Descriptor

func (*SetMaxRateResponse) Descriptor() ([]byte, []int)

func (*SetMaxRateResponse) ProtoMessage

func (*SetMaxRateResponse) ProtoMessage()

func (*SetMaxRateResponse) Reset

func (m *SetMaxRateResponse) Reset()

func (*SetMaxRateResponse) String

func (m *SetMaxRateResponse) String() string

type UpdateConfigurationRequest

type UpdateConfigurationRequest struct {
	// throttler_name specifies which throttler to update. If empty, all active
	// throttlers will be updated.
	ThrottlerName string `protobuf:"bytes,1,opt,name=throttler_name,json=throttlerName" json:"throttler_name,omitempty"`
	// configuration is the new (partial) configuration.
	Configuration *Configuration `protobuf:"bytes,2,opt,name=configuration" json:"configuration,omitempty"`
	// copy_zero_values specifies whether fields with zero values should be copied
	// as well.
	CopyZeroValues bool `protobuf:"varint,3,opt,name=copy_zero_values,json=copyZeroValues" json:"copy_zero_values,omitempty"`
}

UpdateConfigurationRequest is the payload for the UpdateConfiguration RPC.

func (*UpdateConfigurationRequest) Descriptor

func (*UpdateConfigurationRequest) Descriptor() ([]byte, []int)

func (*UpdateConfigurationRequest) GetConfiguration

func (m *UpdateConfigurationRequest) GetConfiguration() *Configuration

func (*UpdateConfigurationRequest) ProtoMessage

func (*UpdateConfigurationRequest) ProtoMessage()

func (*UpdateConfigurationRequest) Reset

func (m *UpdateConfigurationRequest) Reset()

func (*UpdateConfigurationRequest) String

func (m *UpdateConfigurationRequest) String() string

type UpdateConfigurationResponse

type UpdateConfigurationResponse struct {
	// names is the list of throttler names which were updated.
	Names []string `protobuf:"bytes,1,rep,name=names" json:"names,omitempty"`
}

UpdateConfigurationResponse is returned by the UpdateConfiguration RPC.

func (*UpdateConfigurationResponse) Descriptor

func (*UpdateConfigurationResponse) Descriptor() ([]byte, []int)

func (*UpdateConfigurationResponse) ProtoMessage

func (*UpdateConfigurationResponse) ProtoMessage()

func (*UpdateConfigurationResponse) Reset

func (m *UpdateConfigurationResponse) Reset()

func (*UpdateConfigurationResponse) String

func (m *UpdateConfigurationResponse) String() string

Jump to

Keyboard shortcuts

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