diff --git a/CHANGELOG.md b/CHANGELOG.md index ca81170b1a..4cd4499897 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,55 @@ # Changelog +## v0.26.0 + +### Incompatible Change + +For implementing new protocols more nature, XProtocol is no longer as a protocol and no subprotocol any more. +XProtocol is a framework to implement protocol easier now. +So, the old existing code for implementing new protocols need some changes, +please see [this doc](reports/xprotocol_0.26.0.md)(In Chinese) for changing the old existing code suit for the new release. + +### New Features + +- Added the ip_access new filter to manage access control based on IP (#1797). [@Bryce-huang](https://github.com/Bryce-huang) +- Support admin api extends auth functions (#1834). [@nejisama](https://github.com/nejisama) +- The transcode filter module support dynamic phase (#1815). [@YIDWang](https://github.com/YIDWang) +- Added the SetConnectionState method for tls connection in pkg/mtls/crypto/tls.Conn (#1804). [@antJack](https://github.com/antJack) +- Added the after-start and after-stop two new stages, and allow to register handler during these stages. [@doujiang24](https://github.com/doujiang24) +- Support specify the unix domain socket directory by adding the new "uds_dir" configuration (#1829). [@dengqian](https://github.com/dengqian) +- Support choose dynamic protocol convert dynamically and allow register transcoder through go-plugin. [@Tanc010](https://github.com/Tanc010) +- Added more HTTP protocol method to make protocol matcher work properly (#1870). [@XIEZHENGYAO](https://github.com/XIEZHENGYAO) +- Support to set upstream protocol dynamically (#1808). [@YIDWang](https://github.com/YIDWang) +- Support set default HTTP stream config #1886. [@nejisama](https://github.com/nejisama) + +### Changes + +- Change the default max header size to 8KB (#1837). [@nejisama](https://github.com/nejisama) +- Refactory default HTTP1 and HTTP2 convert, remove the proxy convert, use transcoder filter instead. [@nejisama](https://github.com/nejisama) +- transcoder filter: changed to register trancoder factory instead trancoder (#1879). [@YIDWang](https://github.com/YIDWang) + +### Bug fixes + +- Fix a HTTP buffer reuse related bug that may leads to nil panics in high concurrency case. [@nejisama](https://github.com/nejisama) +- Fix: get the proper value of variable response_flag, (#1814). [@lemonlinger](https://github.com/lemonlinger) +- Fix: prefix_write not work with "/" (#1826). [@Bryce-huang](https://github.com/Bryce-huang) +- Fix: the reconfig.sock file may be removed unexpectly when killed the old MOSN manually during smoothly upgrade, (#1820). [@XIEZHENGYAO](https://github.com/XIEZHENGYAO) +- Fix the bug in doretry: should not set setupRetry to false directly, since the old response should be skip when the new upstream request has been sent out (#1807). [@taoyuanyuan](https://github.com/taoyuanyuan) +- Should set the inherit config back to the MOSN instance (#1819). [@XIEZHENGYAO](https://github.com/XIEZHENGYAO) +- Should send resetStreamFrame to upstream when cancel grpc context at client side, otherwise server side context won't be done. [@XIEZHENGYAO](https://github.com/XIEZHENGYAO) +- Should set the resetReason before closing the stream connection, otherwise, may unable to get the real reason (#1828). [@wangfakang](https://github.com/wangfakang) +- Should use the listener that best match when found multi listeners, otherwise, may got 400 error code. [@MengJiapeng](https://github.com/MengJiapeng) +- Fixed panic due to concurrent map iteration and map write during process setting broadcast in HTTP2 protocol. [@XIEZHENGYAO](https://github.com/XIEZHENGYAO) +- Fix memory leak occurred in the binding connpool of XProtocol (#1821). [@Dennis8274](https://github.com/Dennis8274) +- Should close logger at the end, otherwise, may lost log during close MOSN instance (#1845). [@doujiang24](https://github.com/doujiang24) +- Fix panic due to codecClient is nil when got connect timeout event from XProtocol PingPong connection pool (#1849). [@cuiweixie](https://github.com/cuiweixie) +- Health checker not work when the unhealthyThreshold is an empty value (#1853). [@Bryce-huang](https://github.com/Bryce-huang) +- WRR may leads dead recursion in unweightChooseHost #1860. [@alpha-baby](https://github.com/alpha-baby) +- Fix direct response, send hijack should not transcode. [@nejisama](https://github.com/nejisama) +- Fix EDF wrr lb cannot choose a healthy host when there's a unhealthy host with a high weight. [@lemonlinger](https://github.com/lemonlinger) +- Got the wrong CACert filename when converting the listen filter from Istio LDS, MOSN may not listen success (#1893). [@doujiang24](https://github.com/doujiang24) +- The goroutine for resolving hosts in STRICT_DNS_CLUSTER cannot be stopped #1894 [@bincherry](https://github.com/bincherry) + ## v0.25.0 ### New Features diff --git a/CHANGELOG_ZH.md b/CHANGELOG_ZH.md index 1b97f8e32a..61b4c2b57b 100644 --- a/CHANGELOG_ZH.md +++ b/CHANGELOG_ZH.md @@ -1,5 +1,53 @@ # 更新日志 +## v0.26.0 + +### 不兼容变更 + +为了更自然的添加扩展协议,新版对 XProtocol 进行了重构,XProtocol 不再是一种协议,而是便于协议扩展实现的框架。 +扩展协议的实现需要一些调整,具体请见 [XProtocol协议改造适配指南](reports/xprotocol_0.26.0.md) + +### 新功能 + +- 新增 ip_access filter,基于来源 IP 的 ACL 控制器 (#1797) [@Bryce-huang](https://github.com/Bryce-huang) +- 允许 Admin Api 扩展验证方法 (#1834) [@nejisama](https://github.com/nejisama) +- transcoder filter:支持通过配置指定阶段,取代固定的阶段 (#1815) [@YIDWang](https://github.com/YIDWang) +- 为 tls connection 增加 SetConnectionState 方法,在 pkg/mtls/crypto/tls.Conn 中 (#1804) [@antJack](https://github.com/antJack) +- 增加了 after-start 和 after-stop 这两个新的执行阶段,并允许在这两个阶段注册处理函数 [@doujiang24](https://github.com/doujiang24) +- 新增 uds_dir 配置项,用于指定 unix domain socket 的目录 (#1829) [@dengqian](https://github.com/dengqian) +- 支持go plugin加载协议转化插件,并支持动态选择协议转换插件 [@Tanc010](https://github.com/Tanc010) +- 增加更多的 HTTP 协议方法,使动态协议匹配更加精准 (#1870) [@XIEZHENGYAO](https://github.com/XIEZHENGYAO) +- 支持动态设置上游协议 (#1808) [@YIDWang](https://github.com/YIDWang) +- 支持动态设置 HTTP 默认最大值配置 #1886 [@nejisama](https://github.com/nejisama) + +### 变更 + +- 将 HTTP 协议的默认最大请求头大小调整到 8KB (#1837) [@nejisama](https://github.com/nejisama) +- 重构默认的 HTTP1 和 HTTP2 的协议转换,删除了 proxy 中的转换,使用 transcoder filter 来代替 [@nejisama](https://github.com/nejisama) +- transcoder filter:使用注册转换器工厂来替代注册转换器 (#1879) [@YIDWang](https://github.com/YIDWang) + +### Bug 修复 + +- 修复:HTTP buffer 复用在高并发场景下可能导致 nil panic [@nejisama](https://github.com/nejisama) +- 修复:response_flag 变量值获取错误 (#1814) [@lemonlinger](https://github.com/lemonlinger) +- 修复:prefix_write 在 "/" 的场景下不能正常工作 [@Bryce-huang](https://github.com/Bryce-huang) +- 修复:在热升级过程中,手动 kill 老的 MOSN,可能会导致新 MOSN 的 reconfig.sock 会被错误的删除 (#1820) [@XIEZHENGYAO](https://github.com/XIEZHENGYAO) +- 修复:请求上游失败时,在 doretry 中不应该直接设置 setupRetry (#1807) [@taoyuanyuan](https://github.com/taoyuanyuan) +- 修复:热升级中继承了老 MOSN 的配置之后,应该将配置设置到新的 MOSN 结构体中 [@XIEZHENGYAO](https://github.com/XIEZHENGYAO) +- 修复:当取消客户端的 grpc 的时候,没有发送 resetStreamFrame 到上游,使得 server 端没有及时结束 [@XIEZHENGYAO](https://github.com/XIEZHENGYAO) +- 修复:应该在关闭 stream connection 之前设置 resetReason,否则可能导致获取不到真实的原因 (#1828) [@wangfakang](https://github.com/wangfakang) +- 修复:当有多个匹配的 listener 的时候,应该选择最优的匹配的 listener,否则可能导致 400 错误 [@MengJiapeng](https://github.com/MengJiapeng) +- 修复:HTTP2 协议处理 broadcast 可能导致 map 并发读写 panic [@XIEZHENGYAO](https://github.com/XIEZHENGYAO) +- 修复:XProtocol 连接池(binding connpool) 中的内存泄漏 (#1821) [@Dennis8274](https://github.com/Dennis8274) +- 修复:应该将 close logger 放在最后,否则在关闭 MOSN 实例过程中将没有日志输出 (#1845) [@doujiang24](https://github.com/doujiang24) +- 修复:XProtocol PingPong 类型连接超时的时候,因为 codecClient 没有初始化,会导致 panic (#1849) [@cuiweixie](https://github.com/cuiweixie) +- 修复:当 unhealthyThreshold 是一个空值时,健康检查将不会工作,修改为空值时使用默认值 (#1853) [@Bryce-huang](https://github.com/Bryce-huang) +- 修复:WRR 负载均衡算法可能导致死循环(发生在 unweightChooseHost)#1860 [@alpha-baby](https://github.com/alpha-baby) +- 修复:direct response 中 hijack 不应该再执行转换 [@nejisama](https://github.com/nejisama) +- 修复:当一个不健康的 host 有很高的权重时,EDF wrr 将不再选择其他健康的 host [@lemonlinger](https://github.com/lemonlinger) +- 修复:Istio LDS 中的 CACert 文件名获取错误,导致 MOSN listen 失败,不会接受请求 (#1893). [@doujiang24](https://github.com/doujiang24) +- 修复:DNS 解析 STRICT_DNS_CLUSTER 中 host 的 goroutine 没法停止 #1894 [@bincherry](https://github.com/bincherry) + ## v0.25.0 ### 新功能 diff --git a/VERSION b/VERSION index 5bd9725a34..eaf8bae706 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v0.25.0 +v0.26.0 diff --git a/reports/0.26.0.md b/reports/0.26.0.md new file mode 100644 index 0000000000..46084c8804 --- /dev/null +++ b/reports/0.26.0.md @@ -0,0 +1,54 @@ +# v0.26.0 + +# 功能测试 + +## MOSN 作为 Istio 的数据平面 + +测试过程参考这个[文档](https://mosn.io/docs/quick-start/istio/) + ++ 参考文档中的方式二构建新的镜像 + +``` +# 编译 mosn 可执行文件 +make istio-1.5.2 +make build + +# 构建镜像,Dockerfile 参考上述文档 +docker build --no-cache --rm -t mosnio/proxyv2:0.26.0 ./ +``` + ++ 使用文档中的教程,安装 Minikube, Istio 等环境,将其中的 mosn 镜像替换为新的版本 ++ 运行完整的bookinfo,符合预期 + +# 基准测试 + ++ 使用[sofaload](https://github.com/antJack/sofaload)在本地搭建简单的性能测试 + +```Bash +sofaload -D 10 --qps=2000 -c 200 -t 16 -p sofarpc sofarpc://127.0.0.1:12200 +``` + +``` +starting benchmark... +Application protocol: sofarpc + +finished in 60.00s, 2000.00 req/s, 2.41MB/s +requests: 120000 total, 120000 started, 120000 done, 120000 succeeded, 0 failed, 0 errored, 0 timeout +sofaRPC status codes: + 120000 success, 0 error, 0 server exception, 0 unknown + 0 server threadpool busy, 0 error comm, 0 no processor, 0 timeout + 0 client send error, 0 codec exception, 0 connection closed, 0 server serial exception + 0 server deserial exception +traffic: 144.65MB (151680000) total, 2.29MB (2400000) headers (space savings 0.00%), 142.36MB (149280000) data + min max mean sd +/- sd +time for request: 123us 14.46ms 261us 400us 98.38% +time for connect: 4us 35us 13us 6us 71.00% +req/s : 9.57 10.47 10.00 0.40 62.50% + + Latency Distribution + 50% 199us + 75% 261us + 90% 359us + 95% 447us + 99% 1.11ms +```