-
Notifications
You must be signed in to change notification settings - Fork 29
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
ABI to customize upstream/origin selection #16
Comments
Thanks for adding the reproducer, it was really helpful. The issue is that your code is missing a call to Answering your original question, the ABI will indeed have dedicated call to select upstream, but it's not there yet. |
Proxy-Wasm ABI v0.1.0 has a dedicated call for clearing route cache (proxy_clear_route_cache). Proxy-Wasm ABI v0.2.0 removed it in favor of automatically clearing route cache, but that part was never implemented in Envoy. Partially fixes proxy-wasm/spec#16. Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Proxy-Wasm ABI v0.1.0 has a dedicated call for clearing route cache (proxy_clear_route_cache). Proxy-Wasm ABI v0.2.0 removed it in favor of automatically clearing route cache, but that part was never implemented in Envoy. Partially fixes proxy-wasm/spec#16. Signed-off-by: Piotr Sikora <piotrsikora@google.com>
I'm really looking forward to this feature |
Proxy-Wasm ABI v0.1.0 has a dedicated call for clearing route cache (proxy_clear_route_cache). Proxy-Wasm ABI v0.2.0 removed it in favor of automatically clearing route cache, but that part was never implemented in Envoy. Partially fixes proxy-wasm/spec#16. Signed-off-by: Piotr Sikora <piotrsikora@google.com>
EDIT1: The example code for reproducing is at https://github.com/ElvinEfendi/envoy-wasm-regional-routing.
I have been experimenting with https://github.com/proxy-wasm/proxy-wasm-rust-sdk recently. I want to write a filter that for a given request, dynamically picks what Envoy cluster the request should be proxied to.
I tried using
cluster_header: region
routing functionality of Envoy and was hoping I could dynamically change the header value in the plugin. But that did not work as I expected. Turns outself.set_http_request_header(&"region", Some(&"us_central1"));
changes/sets the header only for the upstream. Envoy's router does not see the updated value when making routing decision.Is this an expected behaviour? If so, is there any plan to introduce a dedicated ABI for customizing Envoy's routing decision when it comes to upstream/cluster selection?
FWIW this seems to be possible with a Lua filter: https://medium.com/safetycultureengineering/edge-routing-with-envoy-and-lua-621f3d776c57
The text was updated successfully, but these errors were encountered: