Closed mjaow closed 3 years ago
Hi @mjaow, first - do any of the other non-rr Envoy load balancing strategies in Envoy work for you? This would be the easiest solution. https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/load_balancers#arch-overview-load-balancing-types
Next, in terms of Gloo Edge - you can route based on headers if you'd like, see our docs here on the various routing/matching patterns we support - https://docs.solo.io/gloo-edge/latest/guides/traffic_management/destination_selection/
If you want to use logic from a wasm filter from routing, Gloo Edge supports routing to a cluster as a header value, so you could have a wasm filter add the header for the cluster you wanted, then clear the route cache, and I believe gloo should forward the request to your desired cluster.
Otherwise, right now I don't believe your use case of a custom load balancing strategy is supported by the wasm ABI or the Envoy API. Here's a relevant discussion about extending load balancing strategies in upstream envoy - https://github.com/envoyproxy/envoy/issues/5598
Yeah, for some reason, existing lb_policy of envoy is not able to support. We need a better global least request to make load even , envoy only support least req locally. Thanks for advice and the related link. I'll take a shot
Closing this as resolved for now, feel free to re-open if you have any more questions!
I don't want a rr load balance for gloo, but I found there is no way to customize it in gloo?
Have a look at wasm examples, all of them seem like do some filter/transform before request backend service. Is it possible to implement a customized load balance strategy with wasm?
just like