You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Title: Provide a way to receive ORCA load reports from hosts
Description:
The ClientSideWeightedRoundRobin load balancing policy needs to receive OrcaLoadReports when they are received from the upstream host.
I propose to add an API to the HostDescription to allow LB policies and other modules to configure a callback on the Host, which will be invoked when RoutingFilter gets an ORCA report.
class HostDescription {
…
// Invoked each time when new custom_metrics are reported for a given host.
using OrcaLoadReportCb = std::function<absl::Status(
HostDescription& host, const OrcaLoadReport& orca_load_report)>;
/*
* Install a callback to be invoked when ORCA Load report is received for the host.
* @param callback supplies the callback to invoke.
* @return Common::CallbackHandlePtr a handle which can be used to unregister the callback.
*/
Common::CallbackHandlePtr addOrcaLoadReportCb(OrcaLoadReportCb callback) const PURE;
// Return true if Host has any CustomMetrics callbacks. Used to avoid parsing ORCA header
// if there are no callbacks that need it.
bool hasOrcaLoadReportCb() const PURE;
// Invokes orca_load_report_cb attached to this host with given custom_metrics.
void invokeOrcaLoadReportCb(const OrcaLoadReport& orca_load_report);
…
}
The text was updated successfully, but these errors were encountered:
Title: Provide a way to receive ORCA load reports from hosts
Description:
The
ClientSideWeightedRoundRobin
load balancing policy needs to receiveOrcaLoadReports
when they are received from the upstream host.I propose to add an API to the
HostDescription
to allow LB policies and other modules to configure a callback on the Host, which will be invoked when RoutingFilter gets an ORCA report.The text was updated successfully, but these errors were encountered: