diff --git a/api/udpa/data/orca/v1/BUILD b/api/udpa/data/orca/v1/BUILD new file mode 100644 index 0000000000000..096ca28bac3b3 --- /dev/null +++ b/api/udpa/data/orca/v1/BUILD @@ -0,0 +1,16 @@ +load("@envoy_api//bazel:api_build_system.bzl", "api_go_proto_library", "api_proto_library") + +licenses(["notice"]) # Apache 2 + +api_proto_library( + name = "orca_load_report", + srcs = ["orca_load_report.proto"], + visibility = [ + "//visibility:public", + ], +) + +api_go_proto_library( + name = "orca_load_report", + proto = ":orca_load_report", +) diff --git a/api/udpa/data/orca/v1/orca_load_report.proto b/api/udpa/data/orca/v1/orca_load_report.proto new file mode 100644 index 0000000000000..bed48ed2a88ed --- /dev/null +++ b/api/udpa/data/orca/v1/orca_load_report.proto @@ -0,0 +1,31 @@ +syntax = "proto3"; + +package udpa.data.orca.v1; + +option java_outer_classname = "OrcaLoadReportProto"; +option java_multiple_files = true; +option java_package = "io.envoyproxy.udpa.data.orca.v1"; +option go_package = "v1"; + +import "validate/validate.proto"; + +// See section `ORCA load report format` of the design document in +// :ref:`https://github.com/envoyproxy/envoy/issues/6614`. + +message OrcaLoadReport { + // CPU utilization expressed as a fraction of available CPU resources. This + // should be derived from a sample or measurement taken during the request. + double cpu_utilization = 1 [(validate.rules).double.gte = 0, (validate.rules).double.lte = 1]; + + // Memory utilization expressed as a fraction of available memory + // resources. This should be derived from a sample or measurement taken + // during the request. + double mem_utilization = 2 [(validate.rules).double.gte = 0, (validate.rules).double.lte = 1]; + + // Application specific requests costs. Each value may be an absolute cost (e.g. + // 3487 bytes of storage) or utilization associated with the request, + // expressed as a fraction of total resources available. Utilization + // metrics should be derived from a sample or measurement taken + // during the request. + map request_cost_or_utilization = 3; +} \ No newline at end of file diff --git a/api/udpa/service/orca/v1/BUILD b/api/udpa/service/orca/v1/BUILD new file mode 100644 index 0000000000000..72543e8092216 --- /dev/null +++ b/api/udpa/service/orca/v1/BUILD @@ -0,0 +1,20 @@ +load("@envoy_api//bazel:api_build_system.bzl", "api_go_grpc_library", "api_proto_library_internal") + +licenses(["notice"]) # Apache 2 + +api_proto_library_internal( + name = "orca", + srcs = ["orca.proto"], + has_services = 1, + deps = [ + "//udpa/data/orca/v1:orca_load_report", + ], +) + +api_go_grpc_library( + name = "orca", + proto = ":orca", + deps = [ + "//udpa/data/orca/v1:orca_load_report_go_proto", + ], +) diff --git a/api/udpa/service/orca/v1/orca.proto b/api/udpa/service/orca/v1/orca.proto new file mode 100644 index 0000000000000..87871d209a4cf --- /dev/null +++ b/api/udpa/service/orca/v1/orca.proto @@ -0,0 +1,38 @@ +syntax = "proto3"; + +package udpa.service.orca.v1; + +option java_outer_classname = "OrcaProto"; +option java_multiple_files = true; +option java_package = "io.envoyproxy.udpa.service.orca.v1"; +option go_package = "v1"; + +import "udpa/data/orca/v1/orca_load_report.proto"; + +import "google/protobuf/duration.proto"; + +import "validate/validate.proto"; + +// See section `Out-of-band (OOB) reporting` of the design document in +// :ref:`https://github.com/envoyproxy/envoy/issues/6614`. + +// Out-of-band (OOB) load reporting service for the additional load reporting +// agent that does not sit in the request path. Reports are periodically sampled +// with sufficient frequency to provide temporal association with requests. +// OOB reporting compensates the limitation of in-band reporting in revealing +// costs for backends that do not provide a steady stream of telemetry such as +// long running stream operations and zero QPS services. This is a server +// streaming service, client needs to terminate current RPC and initiate +// a new call to change backend reporting frequency. +service OpenRcaService { + rpc StreamCoreMetrics(OrcaLoadReportRequest) returns (stream udpa.data.orca.v1.OrcaLoadReport); +} + +message OrcaLoadReportRequest { + // Interval for generating Open RCA core metric responses. + google.protobuf.Duration report_interval = 1; + // Request costs to collect. If this is empty, all known requests costs tracked by + // the load reporting agent will be returned. This provides an opportunity for + // the client to selectively obtain a subset of tracked costs. + repeated string request_cost_names = 2; +} diff --git a/tools/spelling_dictionary.txt b/tools/spelling_dictionary.txt index bd4a33889dd65..25c768b3558d7 100644 --- a/tools/spelling_dictionary.txt +++ b/tools/spelling_dictionary.txt @@ -160,8 +160,10 @@ NUL Nilsson OCSP OK +OOB OOM OOMs +ORCA OS OSI OSS @@ -181,6 +183,7 @@ POSTs PREBIND PRNG PROT +QPS QUIC RAII RANLUX