-
Notifications
You must be signed in to change notification settings - Fork 483
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
Add ability to refresh wasm middleware without restart #2267
Comments
cc @daixiang0 @ItalyPaleAle @anuraaga for ideas.. maybe swap out this function with some go atomic ref? https://github.com/dapr/components-contrib/blob/master/middleware/http/wasm/httpwasm.go#L148 |
the primary use case I'm thinking of right now is just development, as it is intuitive to have the server reload if you re-compile the wasm path dapr/samples#122 |
@codefromthecrypt If I'm not mistaken, Envoy doesn't have anything specific for wasm, so not based on file change but a hot restart can be triggered manually with some complexity (it's a process swap though, not a in-process reload) |
I have mixed opinions about this feature. On one hand, I can see how this could be helpful during development On the other hand, if used in production, it could lead to unintended consequences as it would essentially allow changing the code that's being executed on-the-fly. When your app scales horizontally, you also need to ensure consistency there. What do maintainers (CC: @yaron2 @berndverst ) think? As an aside, you can use dapr/kit/fswatcher to implement a inotify-based watcher. |
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged (pinned, good first issue, help wanted or triaged/resolved) or other activity occurs. Thank you for your contributions. |
I think it is ok until users request this |
Describe the feature
WebAssembly has an interesting ability to be safely reloadable. I suspect we should have either an implicit file watch, or another control to allow refreshing the wasm without restarting the sidecar.
Release Note
ADD HTTP wasm middleware can now be configured with
watchPath: true
to reload the wasm binary upon change.The text was updated successfully, but these errors were encountered: