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
Following сomment relates to Envoy proxy (I don't know much about other proxy-wasm implementations).
Multi-threaded servers may use separate WASM runtime for each worker thread. At least in Envoy identifiers, provided in proxy_on_context_create are unique for that worker thread (that is, in simplest scenario, all root contexts will get identifier equal to 1). Thus it impossible to distinguish instances of the HTTP filter contexts, running on different threads.
Why users may want distinguish them: Suppose system where some plugin has one context marked as singleton (registered in bootstrap_extensions config section), and multiple contexts registered as HTTP filter. If singleton context wants send data to worker contexts, then each worker context must have some unique shared queue name (since as far as I can see, proxy_on_queue_ready notifications will arrive to those instance that made most recent call to proxy_register_shared_queue ). There are no simple way for generating such unique queue names for HTTP filter context instance in each worker thread.
I think providing identifier unique for entire proxy process will help solve this issue.
If I missed something and proxy-wasm API already have ways for accomplishing this task, I will be very grateful is somebody points to them.
The text was updated successfully, but these errors were encountered:
Following сomment relates to Envoy proxy (I don't know much about other proxy-wasm implementations).
Multi-threaded servers may use separate WASM runtime for each worker thread. At least in Envoy identifiers, provided in
proxy_on_context_create
are unique for that worker thread (that is, in simplest scenario, all root contexts will get identifier equal to 1). Thus it impossible to distinguish instances of the HTTP filter contexts, running on different threads.Why users may want distinguish them: Suppose system where some plugin has one context marked as singleton (registered in
bootstrap_extensions
config section), and multiple contexts registered as HTTP filter. If singleton context wants send data to worker contexts, then each worker context must have some unique shared queue name (since as far as I can see,proxy_on_queue_ready
notifications will arrive to those instance that made most recent call toproxy_register_shared_queue
). There are no simple way for generating such unique queue names for HTTP filter context instance in each worker thread.I think providing identifier unique for entire proxy process will help solve this issue.
If I missed something and proxy-wasm API already have ways for accomplishing this task, I will be very grateful is somebody points to them.
The text was updated successfully, but these errors were encountered: