Skip to main content

One post tagged with "Apache ShenYu"

View All Tags

【Apache ShenYu 2.6.0 版本发布】

· One min read

关于Apache ShenYu

Apache ShenYu 一款使用 Java Reactor 开发的响应式API 网关。以其高性能,动态灵活的流量管控,热插拔,易部署等特性,开箱即用为用户提供整套全生命周期的 API网关,包含 API注册、服务代理、协议转换、API文档与 API治理等功能。Apache ShenYu于2022年7月毕业成为Apache顶级项目。

官网: https://shenyu.apache.org GitHub: https://github.com/apache/shenyu

版本预览

时隔半年,Apache ShenYu发布了2.6.0版本,该版本共计提交了280+个 Pull Request,新增约20+个新特性,新增了若干增强,重构了若干功能,并且修复了若干个bug。共计78位贡献者参与其中,累计贡献者达350+位。

版本记录:https://github.com/apache/shenyu/compare/v2.5.1...v2.6.0

新特性

1.支持插件上传功能,支持网关热加载插件

具体使用请查看:https://shenyu.apache.org/zh/docs/next/developer/custom-plugin

具体pr请查看:https://github.com/apache/shenyu/pull/4392

2.支持使用Apollo作为数据同步和注册中心

sheneyu:
sync:
apollo:
appId: shenyu
meta: http://localhost:8080
env: dev
clusterName: test
namespace: application

具体pr请查看:https://github.com/apache/shenyu/pull/4532

3.支持springboot client在shenyu client中动态配置

4.添加TCP插件

具体使用请查看:https://shenyu.apache.org/zh/docs/next/plugin-center/proxy/tcp-plugin

具体pr请查看:https://github.com/apache/shenyu/pull/4607

https://github.com/apache/shenyu/pull/4766

5.支持springmvn(boot)在shenyu client中收集api-meta data

具体pr请查看:https://github.com/apache/shenyu/pull/4600

6.添加shenyu ingress controller的支持

具体使用请查看:https://shenyu.apache.org/zh/docs/user-guide/kubernetes-controller/build-deploy

https://shenyu.apache.org/zh/docs/user-guide/kubernetes-controller/config

具体pr请查看:https://github.com/apache/shenyu/pull/4620

配置如下:

shenyu:
netty:
http:
sni:
enabled: true
mod: k8s #k8s模式适用
defaultK8sSecretNamespace: shenyu-ingress #默认secret资源的namespace
defaultK8sSecretName: default-cert #默认secret资源名字

7.添加zookeeper,naocs,apollo,HttpLongPolling,consul作为shenyu服务发现

具体pr请查看:https://github.com/apache/shenyu/pull/4636

https://github.com/apache/shenyu/pull/4657

https://github.com/apache/shenyu/pull/4802

https://github.com/apache/shenyu/pull/4795

https://github.com/apache/shenyu/pull/4800

https://github.com/apache/shenyu/issues/4562

8.添加华为云lts日志收集

具体pr请查看:https://github.com/apache/shenyu/pull/4812

9.添加opengauss数据库支持

具体pr请查看:https://github.com/apache/shenyu/pull/4856

10.添加polaris作为shenyu的数据同步和注册中心

shenyu:
sync:
polaris:
url: 127.0.0.1:8093
namespace:
fileGroup:

具体pr请查看:https://github.com/apache/shenyu/pull/4410

https://github.com/apache/shenyu/pull/4897

11.添加shenyu匹配缓存

shenyu:
selectorMatchCache:
## selector L1 cache
cache:
enabled: false
initialCapacity: 10000 # initial capacity in cache
maximumSize: 10000 # max size in cache
## selector L2 cache, use trie as L2 cache
trie:
enabled: false
cacheSize: 128 # the number of plug-ins
matchMode: antPathMatch
ruleMatchCache:
## rule L1 cache
cache:
enabled: true
initialCapacity: 10000 # initial capacity in cache
maximumSize: 65536 # max size in cache
## rule L2 cache, use trie as L2 cache
trie:
enabled: false
cacheSize: 1024 # the number of selectors
matchMode: antPathMatch

具体使用请查看:https://shenyu.apache.org/zh/docs/next/user-guide/property-config/client-property-config

具体pr请查看:https://github.com/apache/shenyu/pull/4417

https://github.com/apache/shenyu/pull/4536

12.新增shenyu admin对prometheus的支持

具体pr请查看:https://github.com/apache/shenyu/pull/4336

13.暴露shenyu actuator端点

说明:可通过pr查看shenyu网关的内存数据

具体pr请查看:https://github.com/apache/shenyu/pull/4637

如何关闭请查看actuator配置:

management:
endpoints:
web:
exposure:
include: "*" # or health,info

增强

1.对API doc client增加tags属性

具体使用请查看:https://shenyu.apache.org/docs/user-guide/api-doc/shenyu-annotation-apidoc

具体pr请查看:https://github.com/apache/shenyu/pull/4362

2.添加Brpc的集成测试

具体pr请查看:https://github.com/apache/shenyu/pull/4319

3.Brpc支持共享线程池

具体pr请查看:https://github.com/apache/shenyu/pull/4402

4.为加密插件(cryptorRequst和cryptorResponse)增加映射类型

具体pr请查看:https://github.com/apache/shenyu/pull/4418

5.加密插件支持多个个字段加密

具体pr请查看:https://github.com/apache/shenyu/pull/4435

6.添加p2c负载均衡算法

具体pr请查看:https://github.com/apache/shenyu/pull/4451

7.使用base64生成插件字符串,并存储到插件数据中

具体使用请查看:https://shenyu.apache.org/zh/docs/next/developer/custom-plugin

具体pr请查看:https://github.com/apache/shenyu/pull/4473

8.添加最短响应负载均衡算法

具体pr请查看:https://github.com/apache/shenyu/pull/4488

9.添加hash负载均衡测试用例

具体pr请查看:https://github.com/apache/shenyu/pull/4383

10.添加DetailSerivice测试用例

具体pr请查看:https://github.com/apache/shenyu/pull/4450

11.提供宽泛的路径策略

具体配置如下:

shenyu:
switchConfig:
local: true
collapseSlashes: false #true表示开启宽泛路径支持

具体pr请查看:https://github.com/apache/shenyu/pull/4522

12.添加shenyu-common的enums包测试用例

具体pr请查看:https://github.com/apache/shenyu/pull/4541

13.添加shenyu-common的dto包测试用例

具体pr请查看:https://github.com/apache/shenyu/pull/4549/

14.添加Add shenyu-admin的model包测试用例

具体pr请查看:https://github.com/apache/shenyu/issues/4540

15.添加shenyu match cache测试用例

具体pr请查看:https://github.com/apache/shenyu/pull/4557

16.支持k8s探针

具体pr请查看:https://github.com/apache/shenyu/pull/4567

17.添加shenyu-admin的service包测试

具体pr请查看:https://github.com/apache/shenyu/pull/4579

18.在API文档中添加json支持

具体pr请查看:https://github.com/apache/shenyu/pull/4591

19.mock插件的SPEL默认为安全的

具体pr请查看:https://github.com/apache/shenyu/pull/4606

20.添加ShenyuClientApiDocExecutorSubscriber的测试用例

具体pr请查看:https://github.com/apache/shenyu/pull/4632

21.为shenyu-client-sofa模块添加测试用例

具体pr请查看:https://github.com/apache/shenyu/pull/4688

22.为shenyu api doc添加tag relation

具体pr请查看:https://github.com/apache/shenyu/pull/4362

23.添加windows下的启动、停止脚本

具体pr请查看:https://github.com/apache/shenyu/pull/4673

24.添加ShenyuSdkClientFactory的测试用例

具体pr请查看:https://github.com/apache/shenyu/pull/4645

25.添加shenyu e2e springcloud plugin的websocket同步支持

具体pr请查看:https://github.com/apache/shenyu/pull/4698

26.支持divide插件自动下线

具体pr请查看:https://github.com/apache/shenyu/pull/4702

27.添加springcloud service instance缓存

具体pr请查看:https://github.com/apache/shenyu/pull/4705

具体使用请查看:https://shenyu.apache.org/zh/docs/next/plugin-center/proxy/spring-cloud-plugin

shenyu:
springCloudCache:
enabled: false # 为true是开启springcloud缓存

28.更改密码支持i18n

具体pr请查看:https://github.com/apache/shenyu/pull/4758

29.shenyu discovery支持websocket同步

具体pr请查看:https://github.com/apache/shenyu/pull/4768

30.升级springboot版本到2.7.13

具体pr请查看:https://github.com/apache/shenyu/pull/4783

31.为e2e-springcloud添加nacos,zookeeper同步测试

具体pr请查看:https://github.com/apache/shenyu/pull/4747

32.添加api doc client注解生成属性

具体pr请查看:https://github.com/apache/shenyu/pull/4845

33.支持zookeeper客户端自动下线

具体pr请查看:https://github.com/apache/shenyu/pull/4806

34.支持Apollo client自动下线

具体pr请查看:https://github.com/apache/shenyu/pull/4855

35.支持swagger文档,并将文档存储到数据库

具体pr请查看:https://github.com/apache/shenyu/pull/4849

36.支持nacos client自动下线

具体pr请查看:https://github.com/apache/shenyu/pull/4890

37.添加alibaba dubbo e2e 测试用例

具体pr请查看:https://github.com/apache/shenyu/pull/4859

38.添加apache dubbo e2e 测试用例

具体pr请查看:https://github.com/apache/shenyu/pull/4899

39.添加shenyu spring sdk测试用例

具体pr请查看:https://github.com/apache/shenyu/pull/4913

40.添加sofa e2e测试

具体pr请查看:https://github.com/apache/shenyu/pull/4919

41.添加Apollo数据同步的测试用例

具体pr请查看:https://github.com/apache/shenyu/pull/4918

42.添加数据库的连接池配置(hakari)

具体pr请查看:https://github.com/apache/shenyu/pull/4938

43.为shenyu添加idea icon

具体pr请查看:https://github.com/apache/shenyu/pull/4951

重构

1.重构shenyu admin

具体pr请查看:https://github.com/apache/shenyu/pull/4355

2.优化least active balance算法

具体pr请查看:https://github.com/apache/shenyu/pull/4342

3.优化shenyu sign插件的第一个版本的兼容性

具体pr请查看:https://github.com/apache/shenyu/pull/4332

具体使用请查看:https://shenyu.apache.org/docs/plugin-center/security/sign-plugin

4.优化shenyu upstream check逻辑

具体pr请查看:https://github.com/apache/shenyu/pull/4386

5.优化项目的全局版本

具体pr请查看:https://github.com/apache/shenyu/pull/4394

6.优化ShenyuConsulConfigWatch的代码

具体pr请查看:https://github.com/apache/shenyu/pull/4400

7.优化shenyu前缀树匹配逻辑

具体pr请查看:https://github.com/apache/shenyu/pull/4414

8.优化rule condition提交时的校验

具体pr请查看:https://github.com/apache/shenyu/pull/4403

9.优化shenyu-client-websocket的客户端注册代码

具体pr请查看:https://github.com/apache/shenyu/pull/4462

10.添加shenyu admin依赖Micrometer的许可证

具体pr请查看:https://github.com/apache/shenyu/pull/4409

11.更新 maven-assembly-plugin打包插件到3.5.0版本

具体pr请查看:https://github.com/apache/shenyu/pull/4673

12.优化全局插件的排序

具体pr请查看:https://github.com/apache/shenyu/pull/4429

13.在shenyu admin中使用BearerToken替代StatelessToken

具体pr请查看:https://github.com/apache/shenyu/pull/4516

14.重构shenyu-logging模块

具体pr请查看:https://github.com/apache/shenyu/pull/4526

15.对api doc支持校验

具体pr请查看:https://github.com/apache/shenyu/pull/4564

16.优化shenyu前缀树,并支持*匹配

具体pr请查看:https://github.com/apache/shenyu/pull/4569

17.优化插件的热加载

具体pr请查看:https://github.com/apache/shenyu/pull/4392

18.优化ShenyuWebHandler的putPlugin方法

具体pr请查看:https://github.com/apache/shenyu/pull/4598

19.重构Shenyu webfilter

具体pr请查看:https://github.com/apache/shenyu/pull/4614

20.重构 oauth2 plguin插件

具体pr请查看:https://github.com/apache/shenyu/pull/4624

21.重构shenyu选择器的continued字段

具体pr请查看:https://github.com/apache/shenyu/pull/4635

22.重构shenyu选择和规则的匹配缓存

具体pr请查看:https://github.com/apache/shenyu/pull/4578

23.删除了shenyu客户端中未使用的泛型

具体pr请查看:https://github.com/apache/shenyu/pull/4653

24.重构shenyu对sentinel插件的支持

具体pr请查看:https://github.com/apache/shenyu/pull/4669

25.将缓存数据通过actuator端点暴露

具体pr请查看:https://github.com/apache/shenyu/pull/4637

https://github.com/apache/shenyu/pull/4658

26.重构checkUserPassword方法,启动时不打印已知错误日志

具体pr请查看:https://github.com/apache/shenyu/pull/4697

27.添加打印日志的参数

具体pr请查看:https://github.com/apache/shenyu/pull/4637

28.重构shenyu全局异常处理

具体pr请查看:https://github.com/apache/shenyu/pull/4709

29.添加了shenyu插件上传的集成测试

具体pr请查看:https://github.com/apache/shenyu/pull/4679

30.优化语法糖

具体pr请查看:https://github.com/apache/shenyu/pull/4700

31.优化discovery_upstream的discovery_handler_id字段

具体pr请查看:https://github.com/apache/shenyu/pull/4710

32.重构shenyu-plugin模块,将proxy插件分类归档

具体pr请查看:https://github.com/apache/shenyu/pull/4765

33.重构AlibabaDubboConfigCache的缓存

具体pr请查看:https://github.com/apache/shenyu/pull/4772

34.移除hutool的依赖

具体pr请查看:https://github.com/apache/shenyu/pull/4773

35.重构ShenyuClientShutdownHook

具体pr请查看:https://github.com/apache/shenyu/pull/4780

36.Extractor添加BaseAnnotationApiBeansExtractor

具体pr请查看:https://github.com/apache/shenyu/pull/4787

37.支持多客户端注册

具体pr请查看:https://github.com/apache/shenyu/pull/4790

38.重构Shenyu-e2e支持Shenyu的check style

具体pr请查看:https://github.com/apache/shenyu/pull/4799

39.优化shenyu客户端注册逻辑

具体pr请查看:https://github.com/apache/shenyu/pull/4809

40.添加shenyu divide插件的域名测试

具体pr请查看:https://github.com/apache/shenyu/pull/4803

41.更新rpc_ext字段的扩展

具体pr请查看:https://github.com/apache/shenyu/pull/4821

42.优化consul的连接操作

具体pr请查看:https://github.com/apache/shenyu/pull/4832

43.重构shenyu e2e的springcloud的yaml添加方式

具体pr请查看:https://github.com/apache/shenyu/pull/4837

44.为k8s ingress controller添加集成测试

具体pr请查看:https://github.com/apache/shenyu/pull/4820

45.拆分apidoc明细接口的document字段,增加requestHeaders、responseParameters等字段

具体pr请查看:https://github.com/apache/shenyu/pull/4865

46.加swagger示例项目,测试API文档的相关功能

具体pr请查看:https://github.com/apache/shenyu/pull/4825

47.优化shenyu admin的json格式表单字段的显示

具体pr请查看:https://github.com/apache/shenyu/pull/4873

48.重构shenyu日志可观测性

具体pr请查看:https://github.com/apache/shenyu/pull/4874

49.添加bootstrap启动日志

具体pr请查看:https://github.com/apache/shenyu/pull/4879

50.重构swagger的api文档

具体pr请查看:https://github.com/apache/shenyu/pull/4892

51.升级grpc版本至1.53.0

具体pr请查看:https://github.com/apache/shenyu/pull/4841

52.重构api元数据处理函数

具体pr请查看:https://github.com/apache/shenyu/pull/4948

53.优化代码和pom依赖

具体pr请查看:https://github.com/apache/shenyu/pull/4945

Bug修复

1.优化h2的路径

具体pr请查看:https://github.com/apache/shenyu/pull/4351

2.修复加密响应插件的调用错误

具体pr请查看:https://github.com/apache/shenyu/pull/4331

3.修复jdk8 Map computeIfAbsent性能bug

具体pr请查看:https://github.com/apache/shenyu/pull/4338

4.修复zombieRemovalTimes代码

具体pr请查看:https://github.com/apache/shenyu/pull/4368

5.修复升级后的sql错误

具体pr请查看:https://github.com/apache/shenyu/pull/4374

6.删除detectorOfflineLinks标签

具体pr请查看:https://github.com/apache/shenyu/pull/4382

7.忽略扁平化的pom

具体pr请查看:https://github.com/apache/shenyu/pull/4390

8.修复LOG调用方法

具体pr请查看:https://github.com/apache/shenyu/pull/4387

9.使用nacos修复sheyu-example-springcloud的NPE

具体pr请查看:https://github.com/apache/shenyu/pull/4396

10.修复 Shenyu-admin名称的类型争论

具体pr请查看:https://github.com/apache/shenyu/pull/4340

11.修复负载平衡spi资源

具体pr请查看:https://github.com/apache/shenyu/pull/4411

12.修复sql脚本错误

具体pr请查看:https://github.com/apache/shenyu/pull/4412

13.修复jackson的24小时格式和时区

具体pr请查看:https://github.com/apache/shenyu/pull/4413

14.修复JwtUtils错误

具体pr请查看:https://github.com/apache/shenyu/pull/4420

15.修复dubbo调用者缓存bug

具体pr请查看:https://github.com/apache/shenyu/pull/4433

16.修复丢失HOST的删除操作

具体pr请查看:https://github.com/apache/shenyu/pull/4425

17.修复SpringMvcClientEventListener测试用例

具体pr请查看:https://github.com/apache/shenyu/pull/4252

18.修复zombie更新PENDING_SYNC的错误

具体pr请查看:https://github.com/apache/shenyu/pull/4430

19.修复windlfu的内存泄漏

具体pr请查看:https://github.com/apache/shenyu/pull/4486

20.修复因规则过多导致规则查询失败的问题

具体pr请查看:https://github.com/apache/shenyu/pull/4499

21.修复示例http中缺少执行器依赖项和端口错误

具体pr请查看:https://github.com/apache/shenyu/pull/4506

22.修复UpstreamCheckUtils的http和https错误

具体pr请查看:https://github.com/apache/shenyu/pull/4509

23.修复FileFilter造成内存泄漏的问题

具体pr请查看:https://github.com/apache/shenyu/pull/4507

24.修复zookeeper同步错误

具体pr请查看:https://github.com/apache/shenyu/pull/4906

25.修复MemorySafeWindowTinyLFUMap内存泄漏错误

具体pr请查看:https://github.com/apache/shenyu/pull/4524

26.修复ApiDoc路径缺少分隔符的问题

具体pr请查看:https://github.com/apache/shenyu/pull/4528

27.修复 shenyu trie的NPE

具体pr请查看:https://github.com/apache/shenyu/pull/4533

28.修复插件跳过错误

具体pr请查看:https://github.com/apache/shenyu/pull/4589

29.修复oracle sql错误

具体pr请查看:https://github.com/apache/shenyu/pull/4595

30.修复shenyu admin中无法加载shenyu图标的问题

具体pr请查看:https://github.com/apache/shenyu/pull/4605

31.修复hystrix fallback的bug

具体pr请查看:https://github.com/apache/shenyu/pull/4593

32.修复divide和springcloud的预热时间

具体pr请查看:https://github.com/apache/shenyu/pull/4619

33.修复springcloud服务选择器

具体pr请查看:https://github.com/apache/shenyu/pull/4639

34.修复 shenyu-spring-boot-starter-plugin-mock添加spring.factories

具体pr请查看:https://github.com/apache/shenyu/pull/4644

35.修复 shenyu-client-mvc和shenyu-client-springcloud丢失ip

具体pr请查看:https://github.com/apache/shenyu/pull/4681

36.修复缓存中规则数据和选择器数据为空的问题

具体pr请查看:https://github.com/apache/shenyu/pull/4716

37.修复api文档模块更新api详情错误

具体pr请查看:https://github.com/apache/shenyu/pull/4720

38.修复从KafkaLogCollectClient中的配置获取topic

具体pr请查看:https://github.com/apache/shenyu/pull/4756

39.修复loggingConsole插件的线程安全问题

具体pr请查看:https://github.com/apache/shenyu/pull/4763

40.修复brpc集成测试响应大小

具体pr请查看:https://github.com/apache/shenyu/pull/4784

41.修复plugn-dubbo-common的选择器更新灰色发布删除缓存的问题

具体pr请查看:https://github.com/apache/shenyu/pull/4762

42.修复shenyu admin菜单名称bug

具体pr请查看:https://github.com/apache/shenyu/pull/4805

43.修复shenyu admin无法配置consul端口的问题

具体pr请查看:https://github.com/apache/shenyu/pull/4843

44.修复shenyu客户端元数据和uri无法与apollo同步到admin的问题

具体pr请查看:https://github.com/apache/shenyu/pull/4851

45.修复PathVariable注解url无法匹配的问题

具体pr请查看:https://github.com/apache/shenyu/pull/4852

46.修复PathPattern模式下无法更新uri的问题

具体pr请查看:https://github.com/apache/shenyu/pull/4854

47.修复客户端关闭方法调用两次

具体pr请查看:https://github.com/apache/shenyu/pull/4867

48.修复 shenyu 错误处理 consul 配置

具体pr请查看:https://github.com/apache/shenyu/pull/4872

49.从Request、modifyResponse插件中删除未使用的配置

具体pr请查看:https://github.com/apache/shenyu/pull/4882

50.修复http注册元数据错误

具体pr请查看:https://github.com/apache/shenyu/pull/4889

51.修复websocket丢失用户自定义关闭状态的问题

具体pr请查看:https://github.com/apache/shenyu/pull/4844

52.修复consul寄存器在特殊符号时丢失元路径的属性

具体pr请查看:https://github.com/apache/shenyu/pull/4885

53.修复etcd同步错误

具体pr请查看:https://github.com/apache/shenyu/pull/4911

54.修复shenyu admin多次同步事件错误

具体pr请查看:https://github.com/apache/shenyu/pull/4941

55.修复 Shenyu motan插件执行错误

具体pr请查看:https://github.com/apache/shenyu/pull/4934

贡献者

特别感谢以下贡献者对 2.6.0版本的支持和参与(排名不分先后)。

midnight2104,koonchen,847850277,balloon72,yu199195,iwangjie,damonxue,tian-pengfei,caojiajun,dragon-zhang,u3breeze,li-keguo,SuperMonkeyC,mahaitao617,tomsun28,moremind,liaolzy,Ceilzcx,misaya295,BoyuLi4,HaiqiQin,starlight2003,stulzq,ywj1352,yunlongn,aFlyBird0,dengliming,plutokaito,xuyicheng1995,lan-dian,sachin10fi,zuobiao-zhou, hudongdong129,crudboy,aoshiguchen,VampireAchao,JooKS-me,Redick01,huanccwang,lijay7674,omernaci,peng-heng,December-Pb,6freeair2016,jieyangxchen,lianjunwei,u3breeze,eurecalulu,wanyaoasiainfo,wanyaoasiainfo,Kakk22,xuziyang,menglujing,xcsnx,yu1183688986,lahmXu,fabian4,ileonli,VampireAchao,GOODBOY008,TeslaCN

成为贡献者

我们欢迎每一位贡献者的加入ShenYu,欢迎贡献者以Apache Way的精神参与ShenYu!

贡献者指南请参考:

https://shenyu.apache.org/zh/community/contributor-guide

【学生的Apache ShenYu贡献之路】

· One min read
秦海棋

个人介绍

姓名:秦海棋

学校:东北大学

角色: Apache ShenYu Committer

邮箱:haiqi@apache.org

github:https://github.com/HaiqiQin

初遇shenyu

最早接触shenyu是经同学朱坤帅(jooks-me)的介绍,当时坤帅已经在社区做过了很多贡献,有一定的经验。在介绍我进入shenyu社区后,他不断的指点着我,带领我了解项目,讲解社区的相关规约,在他的鼓励下我提交了人生中第一个有关开源项目的pr。之后的日子里,我主要尝试研读shenyu的代码,同时修改一些小的错误,做一些插件的单元测试或者集成测试。

渐至佳境

作为一名开发,当然不希望自己对shenyu的贡献仅限于测试类型任务。正逢shenyu报名了谷歌开源之夏(Google Summer of Code)活动,所以我积极查看议题,最终决定参加shenyu-plugin-logging-elasticsearch课题。在肖宇老师(猫大人)耐心的指导下,我最终完成了课题,如愿以偿地为shenyu提交了开发相关的代码。通过这次课题,我更好地了解了shenyu,同时内心更渴望继续为shenyu贡献代码。在这之后我尝试向shenyu贡献了两个负载均衡的策略,目前以及后续会对shenyu-e2e模块进行贡献。

收获满满

  • 了解到更多有关网关以及为服务方面的知识

  • 学习到了不同注册中心的注册原理

  • 学习到了不同数据同步方式的同步原理

  • 学习到了如何编写更优雅的代码

一些建议

  • 学会阅读官方文档。现在文档已经相当完善了,基本能够覆盖用户的需求。
  • 参加周会。shenyu每双周会开一次例会,在例会上会介绍项目目前的开发进度,小伙伴们可以选取自己感兴趣的任务进行开发,也可以和大佬们交流技术。

特别鸣谢

我一直认为shenyu是一个有温度的大家庭,在我遇到困难的时候,很多小伙伴都对我提供了很大的帮助,使我在贡献的时候少走了很多弯路。在此感谢帮助过我的小伙伴(以下排名不分先后):yu199195,moremind,JooKS-me,erdengk,qifanyyy。

[开源之夏】Apache ShenYu 课题来袭 | 邀您深耕高性能网关]

· One min read
moremind

[开源之夏】Apache ShenYu e2e课题来袭 | 邀您深耕高性能网关

开源之夏

开源之夏是由中科院软件所开源软件供应链点亮计划发起并长期支持的一项暑期开源活动,旨在鼓励在校学生积极参与开源软件的开发维护,培养和发掘更多优秀的开发者,促进优秀开源软件社区的蓬勃发展,助力开源软件供应链建设。

学生开启报名

开源之夏 2023 学生报名 4 月 29 日正式开启啦!同学们可以在开源之夏官网 https://summer-ospp.ac.cn/ 挑选项目,与导师沟通并准备项目申请材料、提交申请。

ospp-2023.jpg

Apache ShenYu简介

Apache ShenYu是一款支持多语言、多协议(Dubbo,SpringCloud,gRPC,Motan,SofaTars, BRPC)、插件化设计、高度可动态化配置、高度可自主化开发的Java网关。内置丰富的插件支持,鉴权,限流,熔断,防火墙等等。流量配置动态化,性能极高。支持集群部署,支持 A/B Test,蓝绿发布等功能。

Apache ShenYu社区作为Apache基金会组织下的开源项目社区。截止目前在全球共聚集了340位贡献者,他们以“Apache Way”的精神参与ShenYu,为ShenYu做出贡献,与ShenYu共同成长!

Apache ShenYu课题项目介绍

课题任务门槛不会太高的哦,且全程由社区导师倾心指导。

项目背景

Shenyu是一个异步的,高性能的,跨语言的,响应式的API网关,但目前ShenYu缺少必要的end to end engine以及test case, end to end test是shenyu项目整体贯通的重要部分。

相关技能

了解Apache ShenYu的技术架构,了解Apache ShenYu的端到端测试框架,能够利用现有代码编写TestSpec,需要了解shenyu的数据同步框架包括websocket,http,zookeeper,nacos,apollo等中间件以及算法,能够编写docker-compose,了解testcontainer,docker等e2e开发必备工具。

相关任务

1.编写shenyu端到端测试框架,编写shenyu端到端测试引擎(难度:高)

2.需要在e2e中实现admin不同数据库(mysql,oracle,postgres,h2)的存储,保证数据存储正确

3.需要通过配置方式以及shenyu-client注册方式保证数据能够正确添加到shenyu-admin(难度:高)

4.使用不同的数据同步方式(websocket,http,zookeeper,nacos,apollo)保证admin到gateway的数据同步正确

5.添加alibaba dubbo,apache dubbo,sofa,tars,motan相关代理插件的端到端测试用例

6.编写特定的TestSpec修改admin字典,元数据,插件,选择器,规则数据,并且在修改后进行回归测试,保证调用逻辑正确(难度:高)

7.编写对应github ci文件,保证ci流程在github action运转正常

项目产出要求

1.编写对应的e2e测试用例

2.使用e2e实现admin使用不同的数据库存储数据的测试

3.实现不同数据同步方式同步数据的端到端测试

4.编辑对应的e2e文档

项目技术要求

1.遵循shenyu代码规范

2.深入理解spring webflux

3.深入理解shenyu的数据同步原理

4.深入理解shenyu client注册数据原理

5.深入了解shenyu的端到端测试引擎以及框架

项目成果仓库

项目地址

其他信息

你能从活动中获得什么?

开发经历

参与开源项目,成为大型开源项目的贡献者,了解多领域多难度梯度任务,给你丰富的大型开源项目实战经验,同时也是锻炼开发能力的好机会!

组委会奖励

1.你将获得结项奖金和结项证书:通过结项考核的学生将有机会获得优秀学生证书。

2.本次比赛共设有两个难度等级,不同等级对应不同奖金:

进阶难度:学生结项奖金税前人民币 12000 元

基础难度:学生结项奖金税前人民币 8000 元

本次比赛的奖金均由开源之夏组委会提供。

Apache ShenYu社区深度交流

1.参与开源之夏@Apache ShenYu课题,你将能够同Apache ShenYu社区全球300+位贡献者交流。

2.参与开源之夏@Apache ShenYu课题,你将成为Apache ShenYu贡献者,在持续贡献者之后,更有机会成为Apache ShenYu Committer。

快速参与开源之夏

开源之夏2023 社区各项目课题将从4月29日开始接受学生参与项目申请,欢迎通过上方联系方式,与各导师沟通并准备项目申请材料。

shenyu-ingress-controller能力增强

项目背景

Kubernetes Controller是Apache ShenYu云原生建设的重要步骤,社区正在建设shenyu-ingress-controller,以实现K8s ingress资源的对接。但是,目前shenyu-ingress-controller功能较为简单,仅支持K8s ingress原生的资源定义。

本项目需要基于annotation拓展shenyu-ingress-controller,尽可能地继承Apache ShenYu丰富的原生功能。

项目产出要求

  • 增强shenyu-ingress-controller的能力

  • 完成核心代码的编写

  • 完成相应单元测试和集成测试

  • 完成相关文档

项目技术要求

  • 熟悉Java和Spring Framework
  • 熟悉Kubernetes
  • 了解API网关

项目成果仓库

项目地址

https://summer-ospp.ac.cn/org/prodetail/2362f0183

其他信息

[开源之夏】Apache ShenYu tcp代理来袭 | 邀您深耕高性能网关

开源之夏

开源之夏是由中科院软件所开源软件供应链点亮计划发起并长期支持的一项暑期开源活动,旨在鼓励在校学生积极参与开源软件的开发维护,培养和发掘更多优秀的开发者,促进优秀开源软件社区的蓬勃发展,助力开源软件供应链建设。

学生开启报名

开源之夏 2023 学生报名 4 月 29 日正式开启啦!同学们可以在开源之夏官网 https://summer-ospp.ac.cn/ 挑选项目,与导师沟通并准备项目申请材料、提交申请。

ospp-2023.jpg

Apache ShenYu简介

Apache ShenYu支持各种语言(http 协议),支持 Dubbo、 Spring Cloud、 gRPC、 Motan、 Sofa、 Tars 等协议。插件化设计思想,插件热插拔,易扩展。灵活的流量筛选,能满足各种流量控制。内置丰富的插件支持,鉴权,限流,熔断,防火墙等等。流量配置动态化,性能极高。 支持集群部署,支持 A/B Test,蓝绿发布的Java网关。

Apache ShenYu课题项目介绍

课题任务门槛不会太高的哦,且全程由社区导师倾心指导。

项目背景

本项目主要是通过插件的方式更加灵活地、可拓展地实现不同通信协议(TCP/UDP/WebSocket等)的代理,以增强ShenYu的通信代理功能。项目提供管理后台可手动配置转发下游的IP、PORT等数据,同时支持下游服务通过ShenYu客户端自动注册ShenYu网关,此外也支持业务提供注册中心地址来完成服务发现和注册功能。业务请求进来时,ShenYu网关根据不同的通信协议类型,匹配不同的通信协议插件来完成通信代理。

相关技能

了解Apache ShenYu的技术架构,熟悉Java和Spring Framework,熟悉reactor等前端组件和框架,熟悉API网关,熟悉tcp、udp等相关协议。

项目产出要求

完成tcp/udp/websocket等代理插件的开发

Task1:完成tcp/udp/websocket的用来代理到下游服务的代理插件功能开发;

✅ 完成注册中心监听元数据的开发

Task1:在shenyu-admin开发支持的多种注册中心(nacos/consul/zk等)监听业务下游服务相关元数据;

✅ 完成代理插件相关元数据的数据同步开发

Task1:完成通信插件代理相关数据同步到网关的开发;

✅ 完成和设计服务自动发现相关表和后台数据开发

Task1:完成相关数据库表设计;

Task2:完成相关表的CRUD开发;

✅ 完成shenyu管理后台通信代理相关数据的编辑

Task1:前端增加编辑通信代理相关元数据的编辑新增页面;

Task2:增加前端页面对应的后端接口;

✅ 完成通信协议代理的集成测试单元测试和文档输出

Task1:完成相关改动的单元测试;

Task2:完成整个功能的集成测试;

Task3:完成整个功能相关接入文档以及功能介绍相关文档的输出。

项目技术要求

1.熟悉Java和Spring Framework

2.熟悉reactor等前端组件和框架

3.熟悉API网关.

项目成果仓库

项目地址

导师邮箱

mahaitao@apache.org

快速参与开源之夏

开源之夏2023 社区各项目课题将从4月29日开始接受学生参与项目申请,欢迎通过上方联系方式,与各导师沟通并准备项目申请材料。

ospp-2023.jpg

[Google Summer of Code & Apache ShenYu task is coming | Invite you to explore the high performance gateway]

· One min read
moremind

Google Summer of Code & Apache ShenYu springcloud e2e task is coming | Invite you to explore the high performance gateway

Description

Shenyu is a native API gateway for service proxy, protocol translation and API governance. but Shenyu lack of End-To-End Tests.

Relevant skills:

  • Understand the architecture of ShenYu
  • Understand SpringCloud micro-service and ShenYu SpringCloud proxy plugin.
  • Understand ShenYu e2e framework and architecture.

How to coding

  • please refer to org.apache.shenyu.e2e.testcase.plugin.DividePluginCases

How to test

  • start shenyu admin in docker
  • start shenyu boostrap in docker
  • run test case org.apache.shenyu.e2e.testcase.plugin.PluginsTest#testDivide

Task List

  1. develop e2e tests of the springcloud plug-in.
  2. write shenyu e2e springcloud plugin documentation in shenyu-website.
  3. refactor the existing plugin test cases.

Design and implement shenyu ingress-controller in k8s

Background

Apache ShenYu is a Java native API Gateway for service proxy, protocol conversion and API governance. Currently, ShenYu has good usability and performance in microservice scenarios. However, ShenYu's support for Kubernetes is still relatively weak.

Tasks

  1. Discuss with mentors, and complete the requirements design and technical design of shenyu-ingress-controller.
  2. Complete the initial version of shenyu-ingress-controller, implement the reconcile of k8s ingress api, and make ShenYu as the ingress gateway of k8s.
  3. Complete the ci test of shenyu-ingress-controller, verify the correctness of the code.

Relevant Skills

  1. Know the use of Apache ShenYu
  2. Familiar with Java and Golang
  3. Familiar with Kubernetes and can use java or golang to develop Kubernetes Controller

【From company gateway framework selection to Apache ShenYu Committer】

· One min read
Shuo Li

Introduction of new Committer

Hello everyone, my name is Shuo Li , java architect, currently engaged in a big-sized Internet company, It is my honor to be invited by the Apache ShenYu community as the Committer. Let me share with you my first meet, acquaintance, understanding, growth and suggestions with the Apache ShenYu community.

Meet the Apache Shenyu community for the first time

The story starts from 2020. In the early stage, I used SpringCloud Gateway + Nacos Config Event to realize the dynamic routing of gateway by myself. Because there was no dashboard of Gateway at that time, it was very painful. My team made a dashboard based on Micro Enterprise, which has a lot of functionality and limitations. From then on, I started to pursue a good gateway. One day, I found ShenYu, and saw that ShenYu's overall architecture was in sharper contrast to SpringCloud Gateway. ShenYu outperforms Gateway in terms of overall architecture design, function design, plug-in design, etc. ShenYu can be said to be the next generation gateway product. After that, I started to have a certain understanding of Apache ShenYu from building environment to running example project, and then to read plug-in chain and data synchronization, SPI mechanism and other source code.

Start submitting PR

It was not until January 2022 that I started to submit my first PR, which was to fix a problem that caused null Pointers when the Admin module started the default load instance. The function was small, but its significance was remarkable. It meant that I had a good start on the open source road from learning to contributing.

Ongoing open source contributions and gains

So far, I have participated in the open source of Apache ShenYu community for more than half a year, contributing a lot and growing and harvesting a lot. The details are as follows:

  • Witnessed Shenyu graduate from Apache Incubator and become a top Apache project.
  • Fixed ShenYu admin starting null pointer problem.
  • Added ShenYu Rewrite plugin support for PathVariable functionality.
  • Responsible for the functional support of the entire Shenyu-Client-Golang project.
  • Participated in the repair of some discovered problems, integration test writing, code of other CR contributors, corresponding functional documentation writing, etc.

Thanks to the community

Thanks to my friends who helped me or inspired me for free (in no particular order): yu199195,yonglun,luoxiaolong,lianjunwei,gaohan.

A little advice for newcomers

1.Be sure to check out the website or Github first 2.Follow the official website or project documents to try to run the relevant functional modules of Example 3.Feel free to submit an issue to the community if you have any ideas

Attend ShenYu biweekly meetings to keep up with the community and meet with developers one-on-one to ask questions

How to join Apache ShenYu

  1. How to become a Contributor

    The Apache ShenYu community has purposely written a very comprehensive Contributor Guide

  2. Github Issues

  3. Subscribe emails

    Email dev-subscribe@ShenYu.apache.org;

    After the sending is successful, you will receive a reply from dev-subscribe@ShenYu.apache.org, please reply to this email according to the prompt of the email to confirm the subscription;

    After replying to confirm, you will receive a welcome email indicating that you have successfully subscribed to emails.

【从用户到Apache ShenYu Committer】

· One min read
何凤恩

个人介绍

大家好,我是何凤恩 ,目前从事Java开发,非常荣幸在受邀成为Apache ShenYu社区的Committer,下面跟大家分享一下我参与Apache ShenYu社区这段时间的成长和建议。

初识ShenYu网关

最早接触shenyu在2021年3月左右,当时还叫soul,由于部门业务场景需要统一网关的使用,选择shenyu网关的主要原因是shenyu的插件化设计很符合我们所需的场景,当时主要使用的一些功能插件包括divide、sentinel熔断、ratelimiter、公司内部rpc的协议转换以及log2Mongo等。随着shenyu的不断升级发版,我们也在不断地升级我们的代码。

初次看到shenyu的代码时,我和大多数开发者一样都遇到这样几个问题:响应式编程到底是什么?响应式编程到底怎么写才对?shenyu的代码怎么会这么写呢?带着这些疑问,我阅读了很多遍shenyu的源码,然后自己调试shenyu,查看shenyu对于请求的处理以及各个插件的具体逻辑。再此期间也曾在shenyu的社区提过很多issues,感谢shenyu社区给予我的帮助。

开源之路

初次向shenyu提交代码还是在2022年3月,当时主要是在使用rpc进行协议转换时发现请求体丢失数据,然后发现是由于rpc参数转换插件丢失了数据,于是我第一次向shenyu提交了该bug的解决代码。

在后续的持续贡献中,主要是贡献了如下功能:

  • springboot的升级改造
  • springcloud插件的重构
  • cache插件的重构
  • logging模块以及各个logging插件的重构
  • shenyu官网插件文档的重构

感谢社区的朋友们

在此特别感谢各位帮助过我的伙伴们(排名不分先后):yu199195,qicz,li-keguo,dragon-zhang,renzhuyan,hutaishi,impactCn,yunlongn。

对于开源开发者的话

开源开发其实一件很有意义又很痛苦的事,很考验一个人的耐力,在无数的pr之后,可能会因为某些困难、问题放弃,而坚持下来的人,无论在技术还是沟通能力上,亦或者开源贡献上,都会有一定的收获。

开源不是一味的做任务,也不是被固定在某一个项目、某一个任务,而是你有空就可以参与任何一个项目。一个人获取会很快,但一群人会走的更远!

如何参与ShenYu

1.ShenYu在官网提供很全面的贡献者指南,https://shenyu.apache.org/zh/community/contributor-guide

2.如果你想参与shenyu的功能开发和问题修复,可关注shenyu的github issues,https://github.com/apache/shenyu/issues

【从CRUD Boy到Apache ShenYu Committer】

· One min read
鄢仁柱

新晋Committer介绍

大家好,我是鄢仁柱 ,目前在微众银行做java/大数据业务开发。非常荣幸受邀成为Apache ShenYu社区的Committer,作为一名业务开发人员,平常关注点更多是在业务上,然后去写CRUD,而参与Apache Shenyu社区开源,让我有别样体验,更多关注点是放在代码本身,考虑如何支持各种协议、插件拓展、数据同步等。下面跟大家分享一下我参与Apache ShenYu社区这段时间的成长和建议。

初识Apache Shenyu社区

故事时间线还得回到2020年底开始说起,当时部门为了让我们能更好的成长,给我们报名了极客时间的JAVA进阶训练营,也就是在这个训练营里有幸结识了猫大人,在猫大人读源码活动的带领下,我第一次接触到了Apache Shenyu,当时还没进入Apache孵化器,还叫Soul(下面都称Apache Shenyu)。读Apache Shenyu源码活动,总共持续三周,在三周里我们每天读源码、写博客,从搭环境到跑示例工程,再到读插件链及数据同步等源码,收获巨大,对Apache Shenyu也有了一定的了解。

开始提交PR

一直到2021年5月份,我开始提交了我的第一个pr,当时是给Admin模块添加了一个单元测试,功能很小,但它的意义却是非凡的,它意味的我从学习开始到贡献,从自己玩开始到开源,在开源之路上有了一个很好的开始。

持续的开源贡献与收获

到目前为止,参与Apache Shenyu社区开源已有一年多一点时间,贡献了许多,也成长收获了许多。具体如下:

  • 参与soul迁移至Apache孵化器,并改名为Apache Shenyu。
  • 参与各模块单元测试的编写。
  • 负责整合TarsResponsePlugin,GrpcResponsePlugin,SofaResponsePlugin,DubboResponsePlugin等重构为ResponsePlugin统一处理。
  • 负责Admin Oracle数据库的支持。
  • 负责Shenyu网关实例注册到Consul的支持。
  • 参与一些已发现问题的修复、示例工程编写、jar包替换及升级、集成测试编写等。

感谢社区小伙伴

感谢无偿帮助过我或给过我启发的小伙伴(排名不分先后):yu199195,dragon-zhang,li-keguo,qicz,moremind,zouchangfu,lianjunwei

给新人的一点建议

Apache Way有个理念:社区大于代码,坚信健康的社区比好的代码更重要。这一年多参与下来也让我感受到了Apache Shenyu社区这一点践行的非常好,双周会议、任务遵从共识自愿、社区公开透明、小伙伴们热心帮助等。所以今天同样将这句话送给新人,社区大于代码,在这里,你都可以试一试。

如何参与Apache ShenYu

  1. 如何成为贡献者

    Apache ShenYu社区特意写了非常全面的贡献者指南

  2. Github Issues

  3. 订阅邮件

    dev-subscribe@ShenYu.apache.org 发送一封邮件;

    发送成功后,您会收到来自 dev-help@ShenYu.apache.org 的回信,请按照邮件的提示回复这封邮件,确认订阅;

    在回复确认后,您会收到一封欢迎邮件,表示您已经成功订阅了邮件。

【你也可以成为Apache ShenYu Committer】

· One min read
张子成

新晋Committer介绍

大家好,我是张子成 ,java/rust开发者,目前在某中型互联网公司从事中间件开发,工作方向包括网关/RPC/MQ。非常荣幸受邀成为Apache ShenYu社区的Committer,下面跟大家分享一下我与Apache ShenYu社区的相遇、相识、相知、成长和建议。

相遇

2021年8月中旬的时候,我加入现公司,转型为中间件开发(在上家做业务开发),接到的第一个任务就是尽快熟悉公司的网关中间件,于是一款叫Soul的网关进入了我的视野(Soul是ShenYu的前身,ShenYu于2021年进入了Apache孵化器,以下的Soul/ShenYu都指代Apache ShenYu(incubating))。

相识

在经过大概一周的学习后,我对Soul的主链路有了一定程度的认识。在后续2-3个月的时间里,随着不断地帮公司业务开发回答/解决问题,慢慢地我也发现了一些Soul不符合人体工程学的地方。

直到2021年12月的时候,出于公司需要和个人兴趣,我开始着手调研ShenYu,并考虑升级方案,此时才算真正开始接触ShenYu和社区。

相知

ShenYu是一个异步的,高性能的,跨语言的,响应式的API网关,其坚持插件化、全链路异步化的设计理念,目前已经集成了很多插件供用户选择,如果已有插件不满足需求,可以对着官网文档 自己上手做定制化开发。

ShenYu社区是活跃的、友善的,为了让更多的同学成为Contributor/Commiter,在github的issues 页面时不时就有新任务 发布,其中有不少非常适合新人的任务 。即使发布的任务对你来说有一定难度,你仍然可以尝试提交PR,社区的小伙伴会review你的PR并提供一些指导建议,帮助你在思想碰撞中提升自己。

我的社区成长

首先感谢无偿帮助过我的小伙伴(排名不分先后):yu199195,JooKS-me,KevinClair,lianjunwei,qicz,AhahaGe,hutaishi

贡献与收获

  • 学习如何同时兼容spring-boot 1.x和2.x,并贡献了非常多的方案。
  • 熟悉project-reactor和spring-webflux的使用,然后贡献大量的优化。
  • 熟悉netty后,贡献了netty线程池设置。
  • 熟悉dubbo后,扩展了ShenYu中的dubbo线程池。
  • 了解grpc和motan等RPC,贡献了共享线程池技术。
  • 提供MemoryLimitedLinkedBlockingQueue和MemorySafeLRUMap,较好地解决了技术悖论。

贡献Apache ShenYu的建议

  1. 初窥门径

    从官网文档开始,首先是admin/bootstrap的部署 ,其次选择一种你最熟悉的方式接入ShenYu ,最后发起请求,验证是否接入成功。

  2. 驾轻就熟

    在一段时间后,你对ShenYu的使用已经比较熟悉了。此时你可以从一种接入方式入手,看看数据最终是如何发送到admin并存储的。

  3. 略有小成

    你已经熟悉了注册阶段的某一条链路,可以开始按照你的接入方式来梳理运行阶段bootstrap的主链路了,此时不建议深挖每个插件的细节。

  4. 炉火纯青

    这个时候你已经对ShenYu的全局有一定认识了,也许在这个阶段你已经发现了一些ShenYu的小bug,或者你觉得ShenYu的某些使用姿势不符合人体工程学,那还等什么?

    到社区看看是否有人遇到了跟你一样的问题,你可以提交一些BUG/ISSUE/PR,社区会尽快回复你的。

  5. 出类拔萃

    随着不断地参与社区,你对社区的贡献越来越多,最后能够帮助他人解决问题,能够指导他人。

    你一直保持好奇,深入学习,能立足于底层。

    你具备一定的大局观,可以从全局的角度看待优化。

    你能够看到问题本质,并解决根本问题。

如何参与Apache ShenYu

  1. 如何成为贡献者

    Apache ShenYu社区特意写了非常全面的贡献者指南

  2. Github Issues

  3. 订阅邮件

    dev-subscribe@ShenYu.apache.org 发送一封邮件;

    发送成功后,您会收到来自 dev-help@ShenYu.apache.org 的回信,请按照邮件的提示回复这封邮件,确认订阅;

    在回复确认后,您会收到一封欢迎邮件,表示您已经成功订阅了邮件。

【Apache ShenYu 2.4.3 版本发布】

· One min read

时隔3个月,Apache ShenYu再次发布2.4.3版本,本次版本内容,有200+的pull Request,30+的贡献者参与,新增了非常多的功能,修复了很多bug,以及优化了很多内容。

新增功能

  • 增加 Http 注册客户端的重试机制。
  • 支持 Content-Type 类型为 octet-stream。
  • 支持 Bootstrap 的URIs 的重定向。
  • 增加本地 API 授权。
  • 支持配置 Dubbo消费者线程池大小。
  • 支持 Divide 插件的失败重试机制。
  • 支持 Webscoket 的客户端配置。
  • 支持 MemoryLimitedLinkedBlockingQueue。
  • 支持 Alibaba Dubbo 插件共享线程池。
  • 支持 gRPC 插件共享线程池。
  • 增加 Metrics 插件。
  • 增加 Cache 插件。
  • 增加 Logging RocketMQ 插件。

优化项

  • 更新 JUnit4 为 JUnit5。
  • 优化 password encryption。
  • 优化和校验 shenyu-admin 模块的接口参数。
  • 优化同步数据时,初始化数据的代码。
  • 增加 LoggingRocketMQ 插件的集成测试。
  • 在 ScheduledExecutorService 类中使用定时轮算法。
  • 重构admin 中注册 URI 的 buildHandle 方法。
  • 优化 Spring Cloud 客户端自动设置端口。
  • 重构 JWT 插件支持多等级 Tokens。
  • 优化网关netty参数自定义可配置

Fix Bug

  • 修复 CommonUpstreamUtils 类初始化时的空指针异常。
  • 修复 Nacos 注册失败时进行判断。
  • 修复登录未注册用户时的空指针异常。
  • 修复重复打印启动日志的问题。
  • 修复重试次数,超时时间不生效的问题。
  • 修复 Token 解析报错的问题。
  • 修复 Websocket 传输大数据异常的问题。
  • 修复 NettyHttpClient 插件在失败时未重试的问题。
  • 修复 CVE-2021-41303 漏洞。
  • 修复判断所有插件包含条件不生效的问题。
  • 修复 Http Headers 丢失数据的问题。
  • 修复 Rewrite 插件不支持 URL 占位符的问题。
  • 修复 Nacos 同步数据异常的问题。
  • 修复当 ContextPath 插件打开时,Websocket 代理失败或者空指针异常的问题。
  • 修复 Http 注册客户端的端口占用检查。

移除项

  • 移除 Monitor 插件。
  • 移除 shenyu-agent 模块。

Metrics 插件使用说明

Metrics 插件 插件是网关用来监控自身运行状态(JVM 相关),请求的响应迟延,QPS、TPS等相关 metrics。

插件的使用

在网关的 pom.xml 文件中添加 metrics 的依赖。

<dependency>
<groupId>org.apache.shenyugroupId>
<artifactId>shenyu-spring-boot-starter-plugin-metricsartifactId>
<version>${project.version}version>
</dependency>

在网关的配置 yaml 文件中编辑如下内容

shenyu:
metrics:
enabled: false #设置为 true 表示开启
name : prometheus
host: 127.0.0.1 #暴露的ip
port: 8090 #暴露的端口
jmxConfig: #jmx配置
props:
jvm_enabled: true #开启jvm的监控指标

具体 Metrics 的指标信息可查看官网说明:https://shenyu.apache.org/zh/docs/plugin-center/observability/metrics-plugin

Cache 插件使用说明

Cache 插件能够缓存目标服务的结果,还可以允许用户配置缓存结果失效时间。

插件的使用

在网关的 pom.xml 文件中添加 Cache 的依赖。

<dependency>
<groupId>org.apache.shenyu</groupId>
<artifactId>shenyu-spring-boot-starter-plugin-cache</artifactId>
<version>${project.version}</version>
</dependency>

适用于数据不会频繁更新、需要大量调用、对于数据一致性要求不高的场景。

Logging RocketMQ 插件使用说明

Apache ShenYu 网关接收客户端请求,向服务端转发请求,并将服务端结果返回给客户端。网关可以记录下每次请求对应的详细信息,例如:请求时间、请求参数、请求路径、响应结果、响应状态码、耗时、上游IP、异常信息等。

Logging-RocketMQ 插件是记录访问日志并将访问日志发送到 RocketMQ 集群的插件.

插件的使用

在网关的 pom.xml 文件中添加依赖。

<dependency>
<groupId>org.apache.shenyu</groupId>
<artifactId>shenyu-spring-boot-starter-plugin-logging-rocketmq</artifactId>
<version>${project.version}</version>
</dependency>

具体配置以及各个参数的作用等信息可查看官网说明:https://shenyu.apache.org/zh/docs/plugin-center/observability/logging-rocketmq

下个版本规划

新增集群方案

  • 新增shenyu-proxy模块,支持ShenYu的集群模式,以及网关的动态扩缩容
  • 新增shenyu-nginx子项目,对接Nginx-upstream模块

新增多语言SDK

多语言的SDK主要是为了让其他类型的语言快速的接入shenyu网关

https://github.com/apache/incubator-shenyu-client-donet

https://github.com/apache/incubator-shenyu-client-golang

https://github.com/apache/incubator-shenyu-client-python

新增 Helm Chart

https://github.com/apache/incubator-shenyu-helm-chart

helm-ci-pipeline

【Apache ShenYu 2.5.1 版本发布】

· One min read

春节刚过,Apache ShenYu便迎来了2.5.1版本。此次发布内容,共有 259 个pull Request,64位贡献者的参与。新增了若干功能,修复了bug,优化了若干内容。

新功能

  1. 添加 brpc 插件
  2. 支持nacos不同命名空间
  3. 优化 mock 插件
  4. 注册中心实例支持eureka
  5. 支持 API 文档
  6. 添加 sentinel 插件的规则处理参数
  7. 添加 e2e 测试引擎
  8. 添加 casdoor插件支持SSO
  9. 添加 logging-tencent-cls 插件
  10. 添加 logging-clickhouse 插件
  11. 添加 logging-pulsar 插件
  12. 添加 key-auth 插件

增强

  1. 优化 motan 客户端注解
  2. 优化 motan 插件配置
  3. 优化 websocket 客户端注解
  4. 优化 springcloud 客户端注解
  5. 优化 springmvc 客户端注解

重构

  1. 重构 API文档的mock请求
  2. 重构 logging-clickhouse 插件
  3. 优化 dubbo相关maven依赖
  4. 重构 sign 插件
  5. 更新 ShenyuExtConfiguration
  6. 移除不必要的单例
  7. 修复并发场景mock数据
  8. 重构 sdk 测试
  9. 重构 DefaultSignService
  10. 重构 shenyu-admin 规则
  11. 优化 ShaUtil
  12. 优化缓存
  13. 修复 ConcurrentModificationException
  14. 修复 etcd 数据同步
  15. 重构 sdk 客户端
  16. 优化请求超时
  17. 重构日志模块
  18. 重构 springcloud 客户端
  19. 重构 Motan插件
  20. 重构 admin 数据同步
  21. 重构 tars 客户端
  22. 重构 alibaba-dubbo 客户端
  23. 重构 springmvc 客户端
  24. 重构 admin 配置
  25. 优化随机算法
  26. 重构负载均衡算法
  27. 重构 logging-kafka 插件

错误修复

  1. 移除多余的 cookie 设置
  2. 修复 appAuth 删除逻辑
  3. 修复 Cryptor-Request 插件
  4. 修复 ext 插件
  5. 修复升级脚本
  6. 修复 Nacos 注册空指针问题
  7. 修复 sandbox json 解析
  8. 修复插件更新时的异常
  9. 修复 postgresql 脚本
  10. 修复 sentinel 插件的异常
  11. 修复 TencentClsLog异常
  12. 修复更新密码异常
  13. 修复选择器分页异常
  14. 修复 request 插件异常
  15. 修复 RateLimiter插件并发处理异常
  16. 修复 sign 插件异常
  17. 修复 context-path 插件异常

特别感谢以下贡献者对 2.5.1版本的支持和参与(排名不分先后)。

dragon-zhang, zhengpeng, mahaitao, 愿凌飞, hdgaadd, dayu, SongTao Zhuang, Misaya295 , Shawn Jim , yunlongn , Will , moremind , RayayChung , Kevin Clair , huanccwang , 柯杨 , Kunshuai Zhu , fantiq , youzipi , class , kyeongsun , 杨阳洋 , Liming Deng , 杨文杰 , xcsnx , hnxiaoyuan , dependabot , xiaoyu , wzhangNJ , Zihao Huang , ywj1352 , pandaapo , WuLang , Nineteen , kyeongsun , ableYang , Runqi Zhao , WeiS , Luke.Z , lahmxu , Sinsy , Daming , BoyuLi4 , jakiuncle , Bowen Li , huanccwang , gitchenjh , DamonXue , Wu Daifu , Jiageng , nuo-promise , Guocheng Tang , likeguo , Sixh-PrFor , throwable , renzhuyan , wangteng , qinghai777 , zly123987123 , 奕仁 , 尔等同学 , qifanyyy , Jairo , ousinka