-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
api: create OpenRCA service proto file #6497
Merged
htuch
merged 11 commits into
envoyproxy:master
from
voidzcy:feature/create_orca_service_proto_file
Apr 18, 2019
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
9098d9e
create orca.proto for open request cost aggregation service
voidzcy d9bc222
add validation rules for resource utilization fields
voidzcy bf7c3b5
add BUILD file
voidzcy ac71382
format with format tool
voidzcy 76b22cf
fix envoy proto naming conventions
voidzcy e0984a0
discard NIC metrics in load report message
voidzcy 0c82663
reword the service comments
voidzcy 3f59df8
split OrcaLoadReport message into seperate proto
voidzcy 89617a1
moved ORCA protos into udpa directory
voidzcy f71f81c
fixed comment grammar and add reference to design doc
voidzcy 26c75a6
add keywords to pass spellchecking
voidzcy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<string, double> request_cost_or_utilization = 3; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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", | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you add a pointer and reference to the public design doc and relevant section? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ACK. |
||
// 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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a pointer and reference to the public design doc and relevant section?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK.