Skip to content

Commit

Permalink
fix: add 0.21.0 changelog
Browse files Browse the repository at this point in the history
Change-Id: If3495def083623ecaeb81eee37db9c14e0571f9b
  • Loading branch information
CodingSinger committed Feb 1, 2021
1 parent 755ebcd commit 68b2bc0
Show file tree
Hide file tree
Showing 4 changed files with 306 additions and 15 deletions.
30 changes: 18 additions & 12 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,31 @@

## v0.21.0

### 优化
### Optimization

- 升级sentinel版本到v1.0.2 [@ansiz](https://github.com/ansiz)
- hijack的情况下,`onUpstreamReset`方法不统计host的metri [@cch123](https://github.com/cch123)
- 优化在tls下读超时场景下的内存消耗 [@cch123](https://github.com/cch123)
4. 增加注释,简化xprotocol connectpool代码 [@cch123](https://github.com/cch123)
- Upgrade sentinel version to v1.0.2 [@ansiz](https://github.com/ansiz)
- `onUpstreamReset` method doesn't count the host's metric in the case of hijack [@cch123](https://github.com/cch123)
- Optimize the memory consumption in the read timeout scenario with tls [@cch123](https://github.com/cch123)
- Add comments and simplify the code of xprotocol connectpool [@cch123](https://github.com/cch123)
- Update the mosn registry version [@cadeeper](https://github.com/cadeeper) [@cch123](https://github.com/cch123)

### 重构
### Refactoring

- 优化路由Header匹配逻辑,删除SofaRule 规则扩展 [@nejisama](https://github.com/nejisama)
- 重命名MOSNHeaderXXX的相关变量 [@nejisama](https://github.com/nejisama)
- Optimize header matching logic when routing, delete sofa rule extension [@nejisama](https://github.com/nejisama)
- Rename related variables of MOSNHeaderXXX [@nejisama](https://github.com/nejisama)
- Refactor flow control streamfilter [@ansiz](https://github.com/ansiz)

### Bug修复
### Bug fixes

- 修复http场景转发之后编码丢失的bug [@antJack](https://github.com/antJack)
- Fix the bug that the BASE64 encoding lost after HTTP forwarding [@antJack](https://github.com/antJack)
- Fix the bug than injecting duplicate keys in `injectCtxVarFromProtocolHeaders` [@nejisama](https://github.com/nejisama)

### 新功能
### New Features

- 支持virtual_host和route的per_filter_config属性 [@machine3](https://github.com/machine3)
- Support DSL route implementation [@CodingSinger](https://github.com/CodingSinger)
- Support stream filter in golang plugin mode [@CodingSinger](https://github.com/CodingSinger)
- Support `per_filter_config` attributes of VirtualHost and Route [@machine3](https://github.com/machine3)
- Xprotocol supports dubbo thrift protocol [@cadeeper](https://github.com/cadeeper)

## v0.20.0

Expand Down
9 changes: 7 additions & 2 deletions CHANGELOG_ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,24 @@
- 升级sentinel版本到v1.0.2 [@ansiz](https://github.com/ansiz)
- hijack的情况下,`onUpstreamReset`方法不统计host的metri [@cch123](https://github.com/cch123)
- 优化在tls下读超时场景下的内存消耗 [@cch123](https://github.com/cch123)
4. 增加注释,简化xprotocol connectpool代码 [@cch123](https://github.com/cch123)
- 增加注释,简化xprotocol connectpool代码 [@cch123](https://github.com/cch123)
- 更新mosn registry版本 [@cadeeper](https://github.com/cadeeper) [@cch123](https://github.com/cch123)

### 重构

- 优化路由Header匹配逻辑,删除SofaRule 规则扩展 [@nejisama](https://github.com/nejisama)
- 优化路由Header匹配逻辑,删除SofaRule规则扩展 [@nejisama](https://github.com/nejisama)
- 重命名MOSNHeaderXXX的相关变量 [@nejisama](https://github.com/nejisama)
- flow control streamfilter重构 [@ansiz](https://github.com/ansiz)

### Bug修复

- 修复http场景转发之后编码丢失的bug [@antJack](https://github.com/antJack)
- 修改injectCtxVarFromProtocolHeaders注入重复key的问题 [@nejisama](https://github.com/nejisama)

### 新功能

- 支持dsl route [@CodingSinger](https://github.com/CodingSinger)
- 支持golang plugin方式的stream filter [@CodingSinger](https://github.com/CodingSinger)
- 支持virtual_host和route的per_filter_config属性 [@machine3](https://github.com/machine3)
- 支持dubbo thrift协议 [@cadeeper](https://github.com/cadeeper)

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.20.0
v0.21.0
280 changes: 280 additions & 0 deletions reports/0.21.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,280 @@
# v0.21.0

## 支持dsl路由

### config

```
```

### result

```
```

curl localhost:34901/api/v1/config_dump

```
{"mosn_config":{"servers":[{"graceful_timeout":"0s"}],"cluster_manager":{"tls_context":{}},"inherit_old_mosnconfig":true,"tracing":{},"metrics":{"sinks":null,"stats_matcher":{},"shm_zone":"","shm_size":"0B","flush_mosn":false,"lazy_flush":false},"admin":{"address":{"socket_address":{"address":"0.0.0.0","port_value":34901}}},"pprof":{"debug":false,"port_value":0},"plugin":{"log_base":""}},"listener":{"serverListener":{"name":"serverListener","address":"127.0.0.1:2046","bind_port":true,"network":"tcp","filter_chains":[{"tls_context_set":[{}],"filters":[{"type":"proxy","config":{"downstream_protocol":"Http1","router_config_name":"server_router","upstream_protocol":"Http1"}}]}]}},"cluster":{"serverCluster":{"name":"serverCluster","type":"SIMPLE","lb_type":"LB_RANDOM","max_request_per_conn":1024,"conn_buffer_limit_bytes":32768,"circuit_breakers":null,"health_check":{"timeout":"0s","interval":"0s","interval_jitter":"0s"},"spec":{},"lb_subset_config":{},"original_dst_lb_config":{},"tls_context":{},"hosts":[{"address":"127.0.0.1:8080","weight":1}],"dns_resolvers":{}}},"routers":{"server_router":{"router_config_name":"server_router","virtual_hosts":[{"name":"serverHost","domains":["*"],"routers":[{"match":{"prefix":"/"},"route":{"cluster_name":"serverCluster","timeout":"0s"}}]}]}}}
```

## 支持go plugin的stream filter

### config

```
```

go run examples/codes/sofarpc-with-xprotocol-sample/client.go -t

### result

```
```

## 支持广播

### config

mosn_config.json

```
{
"servers": [
{
"default_log_path": "/dev/stdout",
"default_log_level": "DEBUG",
"routers": [
{
"router_config_name": "default_router",
"virtual_hosts": [
{
"domains": [
"*"
],
"routers": [
{
"match": {
"prefix": "/"
},
"request_mirror_policies": {
"cluster": "defaultCluster",
"percent": 100
},
"route": {
"cluster_name": "defaultCluster"
}
}
]
}
]
}
],
"listeners": [
{
"name": "defaultListener",
"address": "0.0.0.0:2045",
"bind_port": true,
"stream_filters": [
{
"type": "mirror",
"config": {
"broadcast": true
}
}
],
"filter_chains": [
{
"filters": [
{
"type": "proxy",
"config": {
"downstream_protocol": "Http1",
"upstream_protocol": "Http1",
"router_config_name": "default_router"
}
}
]
}
]
}
]
}
],
"cluster_manager": {
"clusters": [
{
"Name": "defaultCluster",
"type": "EDS",
"lb_type": "SIMPLE",
"connect_timeout": "1s",
"max_request_per_conn": 1024,
"conn_buffer_limit_bytes": 32768,
"hosts": [
{
"address": "localhost:5302"
},
{
"address": "localhost:5301"
}
]
}
]
}
}
```
start server:
```cassandraql
./server localhost:5301
./server localhost:5302
```
server.go:
```
package main
import (
"fmt"
"net/http"
"os"
)
func ServeHTTP(w http.ResponseWriter, r *http.Request) {
fmt.Printf("[UPSTREAM]receive request %v", r.Host)
fmt.Println()
w.WriteHeader(502)
w.Header().Set("Content-Type", "text/plain")
fmt.Fprintf(w, "Method: %s\n", r.Method)
fmt.Fprintf(w, "ServerAddr: %s\n", os.Args[1])
fmt.Fprintf(w, "Protocol: %s\n", r.Proto)
fmt.Fprintf(w, "Host: %s\n", r.Host)
fmt.Fprintf(w, "RemoteAddr: %s\n", r.RemoteAddr)
fmt.Fprintf(w, "RequestURI: %q\n", r.RequestURI)
fmt.Fprintf(w, "URL: %#v\n", r.URL)
fmt.Fprintf(w, "Body.ContentLength: %d (-1 means unknown)\n", r.ContentLength)
fmt.Fprintf(w, "Close: %v (relevant for HTTP/1 only)\n", r.Close)
fmt.Fprintf(w, "TLS: %#v\n", r.TLS)
fmt.Fprintf(w, "\nHeaders:\n")
r.Header.Write(w)
}
func main() {
http.HandleFunc("/", ServeHTTP)
http.ListenAndServe(os.Args[1], nil)
}
```


### result
curl localhost:2045 -v
```
* Rebuilt URL to: localhost:2045/
* Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 2045 (#0)
> GET / HTTP/1.1
> Host: localhost:2045
> User-Agent: curl/7.54.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Sun, 03 Jan 2021 13:23:21 GMT
< Content-Length: 0
<
* Connection #0 to host localhost left intact
```
server1:
```
[UPSTREAM]receive request localhost:2045
```
server2:
```
[UPSTREAM]receive request localhost:2045
```


## 支持通过全局配置关闭循环写模式

### config:

```
{
"close_graceful" : true,
"servers":[
{
"default_log_path":"stdout",
"default_log_level": "DEBUG",
"optimize_local_write": true,
"routers":[
{
"router_config_name":"server_router",
"virtual_hosts":[{
"name":"serverHost",
"domains": ["*"],
"routers": [
{
"match":{"prefix":"/"},
"route":{"cluster_name":"serverCluster"}
}
]
}]
}
],
"listeners":[
{
"name":"serverListener",
"address": "127.0.0.1:2046",
"bind_port": true,
"filter_chains": [{
"filters": [
{
"type": "proxy",
"config": {
"downstream_protocol": "Http1",
"upstream_protocol": "Http1",
"router_config_name":"server_router"
}
}
]
}]
}
]
}
],
"cluster_manager":{
"clusters":[
{
"name":"serverCluster",
"type": "SIMPLE",
"lb_type": "LB_RANDOM",
"max_request_per_conn": 1024,
"conn_buffer_limit_bytes":32768,
"hosts":[
{"address":"127.0.0.1:8080"}
]
}
]
},
"admin": {
"address": {
"socket_address": {
"address": "0.0.0.0",
"port_value": 34902
}
}
}
}
```

### result

```
2021-01-03 19:05:40,734 [DEBUG] [network] [check use writeloop] Connection = 3, Local Address = 127.0.0.1:63757, Remote Address = 127.0.0.1:8080
2021-01-03 19:05:40,734 [DEBUG] [network] [client connection connect] connect raw tcp, remote address = 127.0.0.1:8080 ,event = ConnectedFlag, error = <nil>
2021-01-03 19:05:40,735 [DEBUG] client OnEvent ConnectedFlag, connected false
```

0 comments on commit 68b2bc0

Please sign in to comment.