Skip to content
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

Rust Wasm Plugin Development Plan #1297

Open
007gzs opened this issue Sep 10, 2024 · 3 comments
Open

Rust Wasm Plugin Development Plan #1297

007gzs opened this issue Sep 10, 2024 · 3 comments

Comments

@007gzs
Copy link
Collaborator

007gzs commented Sep 10, 2024

proxy-wasm-rust-sdk

higress wasm-rust sdk

功能模块 难度 完成情况
http_wrapper HttpCall 回调方案,rust生命周期管理导致用回调函数或创建struct当作回调object都不太好用 done
redis_wrapper HttpCall 方案确认后可参考实现,sdk部分已增加未测试 done
plugin_wrapper 目前功能可用,细节考虑是否需要优化 done
cluster_wrapper easy done
log_wrapper easy done
request_wrapper easy done
response_wrapper easy done
@johnlanni johnlanni changed the title rust 插件讨论 Rust Wasm Plugin Development Plan Sep 11, 2024
@007gzs 007gzs mentioned this issue Oct 8, 2024
@pi-pi-miao
Copy link

https://github.com/pi-pi-miao/proxy-wasm-rust-sdk solve the problem

@007gzs
Copy link
Collaborator Author

007gzs commented Oct 8, 2024

https://github.com/pi-pi-miao/proxy-wasm-rust-sdk solve the problem

有些panic是不应该忽略的,会影响后续逻辑。sdk中大部分panic都是发生了不该出现的情况,只有少部分是一些非常规数据情况导致的,我们应该处理的只是支持非常规数据的解析异常。插件的panic只会影响单个请求,会自动重启的

@pi-pi-miao
Copy link

pi-pi-miao commented Oct 8, 2024

https://github.com/pi-pi-miao/proxy-wasm-rust-sdk solve the problem

有些panic是不应该忽略的,会影响后续逻辑。sdk中大部分panic都是发生了不该出现的情况,只有少部分是一些非常规数据情况导致的,我们应该处理的只是支持非常规数据的解析异常。插件的panic只会影响单个请求,会自动重启的

istio1.19 版本之前如果插件发生 panic,那么会影响所有的进出流量,全部都是 503,所以如果istio 版本是 1.19 (不包含)之前的环境,那么建议使用我修改的这个项目。如果是istio1.19 (包含)之后版本需要指定failed_open 为true,那么如果插件出现崩溃 panic,会把插件剔除掉,可以使用官方的 sdk 库。
无论如何在生产环境中都不应该出现panic,还是推荐
https://github.com/pi-pi-miao/proxy-wasm-rust-sdk
如果出现异常情况会通过日志打印出来。
建议通过日志分析+报警的方式,而不是panic 的方式(背后的代价很大)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants