Skip to content
Switch branches/tags
Go to file
Cannot retrieve contributors at this time
syntax = "proto3";
option go_package = "";
import "google/protobuf/duration.proto";
import "google/protobuf/wrappers.proto";
import "google/protobuf/empty.proto";
import "extproto/ext.proto";
option (extproto.hash_all) = true;
option (extproto.equal_all) = true;
// LoadBalancerConfig is the settings for the load balancer used to send request to the Upstream
// endpoints.
message LoadBalancerConfig {
// Configures envoy's panic threshold Percent between 0-100. Once the number of non health hosts
// reaches this percentage, envoy disregards health information.
// see more info [here](
google.protobuf.DoubleValue healthy_panic_threshold = 1;
// This allows batch updates of endpoints health/weight/metadata that happen during a time window.
// this help lower cpu usage when endpoint change rate is high. defaults to 1 second.
// Set to 0 to disable and have changes applied immediately.
google.protobuf.Duration update_merge_window = 2;
message RoundRobin {}
message LeastRequest {
// How many choices to take into account. defaults to 2.
uint32 choice_count = 1;
message Random {}
// Customizes the parameters used in the hashing algorithm to refine performance or resource usage.
message RingHashConfig {
// Minimum hash ring size. The larger the ring is (that is, the more hashes there are for each provided host)
// the better the request distribution will reflect the desired weights. Defaults to 1024 entries, and limited
// to 8M entries.
uint64 minimum_ring_size = 1;
// Maximum hash ring size. Defaults to 8M entries, and limited to 8M entries, but can be lowered to further
// constrain resource use.
uint64 maximum_ring_size = 2;
message RingHash {
// Optional, customizes the parameters used in the hashing algorithm
RingHashConfig ring_hash_config = 1;
message Maglev {
oneof type {
// Use round robin for load balancing.
RoundRobin round_robin = 3;
// Use least request for load balancing.
LeastRequest least_request = 4;
// Use random for load balancing.
Random random = 5;
// Use ring hash for load balancing.
RingHash ring_hash = 6;
// Use maglev for load balancing.
Maglev maglev = 7;
oneof locality_config {
// (Enterprise Only)
// Locality weighted load balancing enables weighting assignments across different zones and geographical locations by using explicit weights.
// This field is required to enable locality weighted load balancing
google.protobuf.Empty locality_weighted_lb_config = 8;