Skip to content

load_aware_locality: add out-of-band ORCA reporting - #46670

Open
jukie wants to merge 3 commits into
envoyproxy:mainfrom
jukie:load-aware-oob
Open

load_aware_locality: add out-of-band ORCA reporting#46670
jukie wants to merge 3 commits into
envoyproxy:mainfrom
jukie:load-aware-oob

Conversation

@jukie

@jukie jukie commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Commit Message: implement out-of-band ORCA reporting for load_aware_locality

Additional Description: Follow-up to #45725 to wire up ORCA out-of-band reporting with the additional below changes:

  • Adds oob_reporting_config proto field
  • Graduates envoy.load_balancing_policies.load_aware_locality from wip to alpha in extensions_metadata.yaml.
  • Fixes lb_orca_oob.active_sessions accounting in the shared OrcaOobManager

Risk Level: Low - still an alpha marked policy and opt-in only
Testing: Added end-to-end OOB integration test and other coverage
Docs Changes: Yes
Release Notes: Updated existing (still unreleased)
Platform Specific Features: N/A

xRef #43665
xRef #6614

jukie added 2 commits August 12, 2026 11:24
Signed-off-by: jukie <10012479+jukie@users.noreply.github.com>
Signed-off-by: jukie <10012479+jukie@users.noreply.github.com>
@repokitteh-read-only

Copy link
Copy Markdown

As a reminder, PRs marked as draft will not be automatically assigned reviewers,
or be handled by maintainer-oncall triage.

Please mark your PR as ready when you want it to be reviewed!

🐱

Caused by: #46670 was opened by jukie.

see: more, trace.

@jukie jukie changed the title Load aware oob load_aware_locality: add out-of-band ORCA reporting Aug 12, 2026
@jukie

jukie commented Aug 12, 2026

Copy link
Copy Markdown
Contributor Author

Continued discussion question from #45725 (comment) @paul-r-gall :

what happens if the Child LB policy also attempts to attach an OrcaHostLbPolicyData to the upstream hosts? Will you open two separate OOB gRPC streams? I would love to see some sort of integration test exercising this scenario at least to "documentation-via-test" the behavior.

Yes, if both this policy and it's endpoint_picking_policy enable OOB each would open their own stream per host. I think documentation around this behavior is adequate vs the complexity of trying to dedupe but if we want that in the future, we could consider adding OOB fields at the cluster scope which would make things easier by having a clear owner.

@jukie
jukie marked this pull request as ready for review August 12, 2026 18:02
@repokitteh-read-only

Copy link
Copy Markdown

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to (api/envoy/|docs/root/api-docs/).
envoyproxy/api-shepherds assignee is @markdroth
CC @envoyproxy/api-watchers: FYI only for changes made to (api/envoy/|docs/root/api-docs/).

🐱

Caused by: #46670 was ready_for_review by jukie.

see: more, trace.

Comment on lines 80 to +145
@@ -115,8 +116,8 @@ void OrcaOobManager::onHostsAdded(const Upstream::HostVector& hosts) {
const std::chrono::milliseconds initial_delay(random_.random() % period_ms);
it->second = std::make_unique<OobSession>(*this, host, initial_delay);
}
if (oob_sessions_.size() != prior_size) {
oob_stats_.active_sessions_.set(oob_sessions_.size());
if (oob_sessions_.size() > prior_size) {
oob_stats_.active_sessions_.add(oob_sessions_.size() - prior_size);
}
}

@@ -131,8 +132,8 @@ void OrcaOobManager::onHostsRemoved(const Upstream::HostVector& hosts) {
dispatcher_.deferredDelete(std::move(it->second));
oob_sessions_.erase(it);
}
if (oob_sessions_.size() != prior_size) {
oob_stats_.active_sessions_.set(oob_sessions_.size());
if (oob_sessions_.size() < prior_size) {
oob_stats_.active_sessions_.sub(prior_size - oob_sessions_.size());
}
}

@@ -141,7 +142,7 @@ void OrcaOobManager::onSessionTerminated(OobSession* session) {
ASSERT(it != oob_sessions_.end() && it->second.get() == session);
dispatcher_.deferredDelete(std::move(it->second));
oob_sessions_.erase(it);
oob_stats_.active_sessions_.set(oob_sessions_.size());
oob_stats_.active_sessions_.dec();

@jukie jukie Aug 12, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the previous set(oob_sessions_.size()), each manager overwrote the total with only its own session count, and whichever destructor ran last zeroed the other's live sessions. Not much of an issue on current main but now that OOB is available at both locality and endpoint level, that would actually trigger so this shifts to an increment/decrement logic and I added a test to validate.

Signed-off-by: jukie <10012479+jukie@users.noreply.github.com>
@jukie

jukie commented Aug 12, 2026

Copy link
Copy Markdown
Contributor Author

/retest

@jukie

jukie commented Aug 12, 2026

Copy link
Copy Markdown
Contributor Author

/gemini review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants