Add overload manager to bootstrap config (#4038)

Initialize on startup and add documentation (issue #373)

Risk Level: low
Testing: unit tests
Docs Changes: add docs for overload manager

Signed-off-by: Elisha Ziskind <eziskind@google.com>

Mirrored from https://github.com/envoyproxy/envoy @ 14140ad83293d2cb4fcf356064ed98c3bffa295b
pull/620/head
data-plane-api(CircleCI) 7 years ago
parent 27371599d3
commit 60170a36bb
  1. 1
      docs/BUILD
  2. 2
      envoy/config/bootstrap/v2/BUILD
  3. 4
      envoy/config/bootstrap/v2/bootstrap.proto
  4. 8
      envoy/config/overload/v2alpha/BUILD
  5. 18
      envoy/config/overload/v2alpha/overload.proto
  6. 1
      envoy/config/resource_monitor/fixed_heap/v2alpha/BUILD
  7. 7
      envoy/config/resource_monitor/fixed_heap/v2alpha/fixed_heap.proto

@ -55,6 +55,7 @@ proto_library(
"//envoy/config/metrics/v2:stats",
"//envoy/config/ratelimit/v2:rls",
"//envoy/config/rbac/v2alpha:rbac",
"//envoy/config/resource_monitor/fixed_heap/v2alpha:fixed_heap",
"//envoy/config/trace/v2:trace",
"//envoy/config/transport_socket/capture/v2alpha:capture",
"//envoy/data/accesslog/v2:accesslog",

@ -15,6 +15,7 @@ api_proto_library_internal(
"//envoy/api/v2/core:config_source",
"//envoy/config/metrics/v2:metrics_service",
"//envoy/config/metrics/v2:stats",
"//envoy/config/overload/v2alpha:overload",
"//envoy/config/ratelimit/v2:rls",
"//envoy/config/trace/v2:trace",
],
@ -32,6 +33,7 @@ api_go_proto_library(
"//envoy/api/v2/core:config_source_go_proto",
"//envoy/config/metrics/v2:metrics_service_go_proto",
"//envoy/config/metrics/v2:stats_go_proto",
"//envoy/config/overload/v2alpha:overload_go_proto",
"//envoy/config/ratelimit/v2:rls_go_grpc",
"//envoy/config/trace/v2:trace_go_proto",
],

@ -16,6 +16,7 @@ import "envoy/api/v2/cds.proto";
import "envoy/api/v2/lds.proto";
import "envoy/config/trace/v2/trace.proto";
import "envoy/config/metrics/v2/stats.proto";
import "envoy/config/overload/v2alpha/overload.proto";
import "envoy/config/ratelimit/v2/rls.proto";
import "google/protobuf/duration.proto";
@ -123,6 +124,9 @@ message Bootstrap {
// Configuration for the local administration HTTP server.
Admin admin = 12 [(validate.rules).message.required = true, (gogoproto.nullable) = false];
// Optional overload manager configuration.
envoy.config.overload.v2alpha.OverloadManager overload_manager = 15;
}
// Administration interface :ref:`operations documentation

@ -1,8 +1,14 @@
load("//bazel:api_build_system.bzl", "api_proto_library_internal")
load("//bazel:api_build_system.bzl", "api_go_proto_library", "api_proto_library_internal")
licenses(["notice"]) # Apache 2
api_proto_library_internal(
name = "overload",
srcs = ["overload.proto"],
visibility = ["//visibility:public"],
)
api_go_proto_library(
name = "overload",
proto = ":overload",
)

@ -8,15 +8,19 @@ import "google/protobuf/struct.proto";
import "validate/validate.proto";
// The Overload Manager provides an extensible framework to protect Envoy instances
// from overload of various resources (memory, cpu, file descriptors, etc)
// [#protodoc-title: Overload Manager]
message EmptyConfig {
}
// The Overload Manager provides an extensible framework to protect Envoy instances
// from overload of various resources (memory, cpu, file descriptors, etc).
// It monitors a configurable set of resources and notifies registered listeners
// when triggers related to those resources fire.
message ResourceMonitor {
// The name of the resource monitor to instantiate. Must match a registered
// resource monitor type.
// resource monitor type. The built-in resource monitors are:
//
// * :ref:`envoy.resource_monitors.fixed_heap
// <envoy_api_msg_config.resource_monitor.fixed_heap.v2alpha.FixedHeapConfig>`
string name = 1 [(validate.rules).string.min_bytes = 1];
// Configuration for the resource monitor being instantiated.
@ -45,7 +49,7 @@ message OverloadAction {
// DNS to ensure uniqueness.
string name = 1 [(validate.rules).string.min_bytes = 1];
// A set of triggers for this action. If any of these triggers fires the overload action
// A set of triggers for this action. If any of these triggers fire the overload action
// is activated. Listeners are notified when the overload action transitions from
// inactivated to activated, or vice versa.
repeated Trigger triggers = 2 [(validate.rules).repeated .min_items = 1];
@ -59,5 +63,5 @@ message OverloadManager {
repeated ResourceMonitor resource_monitors = 2 [(validate.rules).repeated .min_items = 1];
// The set of overload actions.
repeated OverloadAction actions = 3 [(validate.rules).repeated .min_items = 1];
repeated OverloadAction actions = 3;
}

@ -5,4 +5,5 @@ licenses(["notice"]) # Apache 2
api_proto_library_internal(
name = "fixed_heap",
srcs = ["fixed_heap.proto"],
visibility = ["//visibility:public"],
)

@ -3,8 +3,11 @@ syntax = "proto3";
package envoy.config.resource_monitor.fixed_heap.v2alpha;
option go_package = "v2alpha";
// [#protodoc-title: Fixed heap]
// The fixed heap resource monitor reports the Envoy process memory pressure, computed as a
// fraction of currently reserved heap memory divided by a statically configured maximum
// specified in the FixedHeapConfig.
message FixedHeapConfig {
// Limit of the Envoy process heap size. This is used to calculate heap memory pressure which
// is defined as (current heap size)/max_heap_size_bytes.
uint64 max_heap_size_bytes = 1;
}

Loading…
Cancel
Save