What's new in dubbogopixiu v1.0.0

2023年 11月 28日 87.5k 0

dubbo 原生网关 dubbo-go-pixiu v1.0 https://github.com/apache/dubbo-go-pixiu/releases/tag/v1.0.0-rc2 正式发版了,项目从 2019 年一路走来,四年磨剑,感谢从 铁城、张天 到 吕梦超 三位负责人。

目前,dubbo-go-pixiu 可作为 dubbo/dubbogo 服务网关,也可作为 dubbo/dubbogo 服务的 sidecar,还额外基于 Istio v1.14.3 实现了 dubbo 的控制面。

dubbo-go 和 dubbo-go-pixiu 在 2023 年初被蚂蚁集团采用内部容器 PAAS HCS(Hyper Container Service) 超级容器平台的微服务技术底座, v1.0.0 集成了蚂蚁集团使用过程中的提交的很多改进和优化。感谢本次版本的主要贡献者 胡潇晗、樊凡、龚娜、张国强、【阿里】远云、【蚂蚁】多航、王虓雄、望哥、于雨 等社区同学。

1 New Features In v1.0.0

1.1 Triple支持传递Header和引入PB定义

Triple代理现在可以正确传递header到Triple服务,且支持通过引入protoset文件来支持未开启Proto反射或不支持反射的特定proto,例如使用旧版本编译的或gogoproto编译的服务。

samples: https://github.com/apache/dubbo-go-pixiu-samples/tree/main/dubbogo/simple/triple

1.2 负载均衡 Maglev hashing

负载均衡支持新算法:Maglev hashing。Maglev 是 Google 开发的基于 kernal bypass 技术实现的 4 层负载均衡,它具有非常强大的负载性能,承载了Google绝大部分接入流量。Maglev在负载均衡算法上采用自行开发的一致性哈希算法被称为Maglev Hashing,该哈希算法在节点变化时能够尽量少的影响其他几点,且尽可能的保证负载的均衡,是一个非常优秀的一致性哈希算法。

samples: https://github.com/shawnh2/dubbo-go-pixiu-samples/tree/main/dubbogo/simple/traffic

1.3 Router支持Header路由

Router支持通过header路由,可以更方便的管理流量。

              http_filters:
                  - name: dgp.filter.http.traffic
                    config:
                      traffics:
                        - name: "user-v1"
                          router: "/user"
                          canary-by-header: v1
                          canary-weight: 0
                        - name: "user-v2"
                          router: "/user"
                          canary-by-header: v2
                          canary-weight: 100

samples: https://github.com/shawnh2/dubbo-go-pixiu-samples/tree/main/dubbogo/simple/traffic

1.4 错误注入

支持对特定API做错误注入,例如返回固定的响应,施加随机性的延时/错误等。

                http_filters:
                  - name: dgp.filter.http.faultinjection
                    config:
                      fail_inject_rules:
                        "/UserService/com.dubbogo.pixiu.UserService/GetUserByCode":
                          type: delay
                          trigger_type: random
                          status_code: 500
                          body: 'error'
                          delay: 5s
                          odds: 30

samples: https://github.com/apache/dubbo-go-pixiu/blob/develop/docs/sample/others/fail-inject.md

1.5 Add GracefulShutdown Signal For Windows

支持Windows优雅下线,Pixiu关闭时避免流量损失。

static_resources:
	.......
	.......
  shutdown_config:
    timeout: "60s"
    step_timeout: "10s"
    reject_policy: "immediacy"

配置方式参考: https://github.com/apache/dubbo-go-pixiu-samples/tree/main/shutdown

2 Enhancement in v1.0.0

  • 优化Prometheus指标上报
  • 修复一致性Hash数组越界
  • 优化Timeout时的http status code
  • 优化Metric推拉模式
  • 优化Nacos客户端启动时的参数配置
  • 修复特定Filter配置为空时的NPE问题
  • 升级wasmer-go v1.0.4以支持Mac ARM版本
  • fix sample url using github.com/apache/dubbo-go-pixiu-samples
  • 修复流量管理路由权重计算错误的问题
  • 修复负载均衡在特定情况下无法正常工作的问题
  • 移除无用的imports
  • chore: unnecessary use of fmt.Sprintf
  • chore:use wasm filter build tags add wasm
  • 修复无法错误的samples链接等
  • revert gatewayCmd to Run dubbo go pixiu
  • 升级 hessian2依赖到v1.11.3

3 参考文档

  • What's new in dubbo-go-pixiu v0.6.0
  • What's new in dubbo-go-pixiu 0.5.1
  • What's new in dubbo-go-pixiu 0.4.0
  • Dubbo 跨语言调用神兽:dubbo-go-pixiu

4 社区

欢迎钉钉扫码加入 dubbogo 社区钉钉群【钉钉群号 23331795】进行交流。

以及 dubbogo 社区微信公众号:

从今年开始,除了以往负责的 dubbogo 社区项目外,于雨还负责了 pika 项目(https://github.com/OpenAtomFoundation/pika),如果对该项目感兴趣,请扫码:

相关文章

塑造我成为 CTO 之路的“秘诀”
“人工智能教母”的公司估值达 10 亿美金
教授吐槽:985 高校成高级蓝翔!研究生基本废了,只为房子、票子……
Windows 蓝屏中断提醒开发者:Rust 比 C/C++ 更好
Claude 3.5 Sonnet 在伽利略幻觉指数中名列前茅
上海新增 11 款已完成登记生成式 AI 服务

发布评论