What's new in dubbo-go-pixiu v1.0.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

扫描二维码关注公众号,回复: 17125906 查看本文章

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

3 参考文档

4 社区

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

以及 dubbogo 社区微信公众号:

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

OpenAI 面向所有用户免费开放 ChatGPT Voice 程序员篡改 ETC 余额,一年私吞 260 余万元 Spring Boot 3.2.0 正式发布 谷歌员工离职后抨击大老板,曾深度参与 Flutter 项目、制定 HTML 相关标准 微软 Copilot Web AI 将于12月1日正式上线,支持中文 微软开源 Terminal Chat Rust Web 框架 Rocket 发布 v0.5:支持异步、SSE、WebSockets 等 Redis 之父用纯 C 语言代码实现 Telegram Bot 框架 假如你是开源项目维护者,遇到这种回复能忍到哪步? PHP 8.3 GA
{{o.name}}
{{m.name}}

猜你喜欢

转载自my.oschina.net/dubbogo/blog/10294380