Skip to content

Commit 7c584d4

Browse files
authored
feat(outbound): add load balancing and circuit breaking proto surface (#556)
* fix: set build_transport in gen.rs The tonic-prost-build configure call was missing an explicit build_transport(true). While this is the default value, being explicit keeps the builder chain consistent with build_client and build_server, and prevents surprises if the default changes. Signed-off-by: Alejandro Martinez Ruiz <amr@buoyant.io> * feat(outbound): restructure FailureAccrual for multiple accrual policies Replace the single-field oneof wrapper with direct optional fields, allowing consecutive-failure and success-rate policies to coexist. The consecutive_failures field retains field number 1, so the wire encoding is identical to the old oneof layout and existing proxies continue to work without changes. Add a SuccessRate nested message at field 2 with threshold, decay, and min_requests parameters. When absent, success-rate accrual is disabled. Signed-off-by: Alejandro Martinez Ruiz <amr@buoyant.io> * feat(outbound): add LoadBiasConfig and load_bias fields Introduce a LoadBiasConfig message for 429-aware load balancing. When set on Http1, Http2, or Grpc protocol variants, the proxy injects artificial latency penalties on rate-limited endpoints so the P2C balancer prefers healthier alternatives. Signed-off-by: Alejandro Martinez Ruiz <amr@buoyant.io> * feat(outbound): add RetryAfterConfig and retry_after fields Introduce a RetryAfterConfig message for Retry-After header handling. When set on Http1, Http2, or Grpc protocol variants, the proxy honors Retry-After headers from 429 responses and clamps durations to the configured maximum. Added as field 4 on each HTTP protocol variant. The single max_duration field caps the Retry-After value the proxy will honor, falling back to a built-in default when absent. Signed-off-by: Alejandro Martinez Ruiz <amr@buoyant.io> * feat(outbound): add EjectionConfig to BalanceP2c Add pool-level ejection protection to the P2C load balancer configuration. When set this prevents circuit breakers from ejecting all endpoints in a load-balancing pool by enforcing a minimum number of ready endpoints. Signed-off-by: Alejandro Martinez Ruiz <amr@buoyant.io> * build: regenerate Rust and Go bindings Full regeneration from updated outbound.proto after the FailureAccrual restructure, the additions of LoadBiasConfig, RetryAfterConfig and EjectionConfig messages, and load_bias, retry_after and ejection fields. Signed-off-by: Alejandro Martinez Ruiz <amr@buoyant.io> --------- Signed-off-by: Alejandro Martinez Ruiz <amr@buoyant.io>
1 parent ef67ad4 commit 7c584d4

20 files changed

Lines changed: 887 additions & 392 deletions

examples/gen.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
2020
if let Err(e) = tonic_prost_build::configure()
2121
.build_client(true)
2222
.build_server(true)
23+
.build_transport(true)
2324
.out_dir(out_dir)
2425
.compile_protos(&proto_files, &[proto_dir])
2526
{

go/destination/destination.pb.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go/destination/destination_grpc.pb.go

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go/grpc_route/grpc_route.pb.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go/http_route/http_route.pb.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go/http_types/http_types.pb.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go/identity/identity.pb.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go/identity/identity_grpc.pb.go

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go/inbound/inbound.pb.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go/inbound/inbound_grpc.pb.go

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)