Skip to main content

[Apache ShenYu 2.6.0 Version Release]

· 14 min read

Apache ShenYu#

Apache ShenYu is a responsive API gateway developed using Java Reactor. With its high performance, dynamic and flexible traffic control, hot swap, easy deployment and other features, out of the box to provide users with a full lifecycle of 'API' gateway, including 'API' registration, service proxy, protocol conversion, 'API' documentation and 'API' governance and other functions. Apache ShenYu graduated as an Apache top-level project in 'July 2022'.

website: https://shenyu.apache.org

GitHub: https://github.com/apache/shenyu

Version preview#

Six months later, Apache ShenYu released version 2.6.0, which submitted a total of 280+ Pull requests, added about 20+ new features, added several enhancements, refactored several features, and fixed several bugs. A total of 78 contributors participated, with a cumulative total of 350+ contributors.

version records: https://github.com/apache/shenyu/compare/v2.5.1...v2.6.0

New Feature#

  1. Supports the plug-in upload function and gateway hot load plug-in

the specific use please see: https://shenyu.apache.org/zh/docs/next/developer/custom-plugin

specific pr please see: https://github.com/apache/shenyu/pull/4392

  1. Apollo is supported as the data synchronization and registry
sheneyu:  sync:    apollo:      appId: shenyu      meta: http://localhost:8080      env: dev      clusterName: test      namespace: application

specific pr please see: https://github.com/apache/shenyu/pull/4532

  1. The springboot client can be dynamically configured on the shenyu client

  2. Add the TCP plug-in

the specific use please see: https://shenyu.apache.org/zh/docs/next/plugin-center/proxy/tcp-plugin

specific pr please see: https://github.com/apache/shenyu/pull/4607

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

  1. Support springmvn(boot) to collect api-meta data from shenyu client

specific pr please see: https://github.com/apache/shenyu/pull/4600

  1. Add support for the shenyu ingress controller

the specific use please see: https://shenyu.apache.org/zh/docs/user-guide/kubernetes-controller/build-deploy

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

specific pr please see: 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资源名字
  1. Add a zookeeper, naocs, Apollo, HttpLongPolling, consul as shenyu service discovery

specific pr please see: 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

  1. Add Huawei Cloud lts log collection

specific pr please see: https://github.com/apache/shenyu/pull/4812

  1. Add opengauss database support

specific pr please see: https://github.com/apache/shenyu/pull/4856

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

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

specific pr please see: https://github.com/apache/shenyu/pull/4410

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

  1. Add shenyu matching cache
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

the specific use please see: https://shenyu.apache.org/zh/docs/next/user-guide/property-config/client-property-config

specific pr please see: https://github.com/apache/shenyu/pull/4417

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

  1. Added support for prometheus for shenyu admin

specific pr please see: https://github.com/apache/shenyu/pull/4336

  1. Expose the endpoints of shenyu actuator

Note: You can use pr to view the memory data of shenyu gateway

specific pr please see: https://github.com/apache/shenyu/pull/4637

Check the configuration of actuator:

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

Enhanced#

  1. Add tags attribute to API doc client

the specific use please see: https://shenyu.apache.org/docs/user-guide/api-doc/shenyu-annotation-apidoc

specific pr please see: https://github.com/apache/shenyu/pull/4362

  1. Add Brpc integration tests

specific pr please see: https://github.com/apache/shenyu/pull/4319

3.Brpc supports shared thread pools

specific pr please see: https://github.com/apache/shenyu/pull/4402

  1. Add mapping types for cryptorRequst and cryptorResponse

specific pr please see: https://github.com/apache/shenyu/pull/4418

  1. Encryption plug-in supports multiple field encryption

specific pr please see: https://github.com/apache/shenyu/pull/4435

  1. Add the p2c load balancing algorithm

specific pr please see: https://github.com/apache/shenyu/pull/4451

  1. Generate a plug-in string using base64 and store it in the plug-in data

the specific use please see: https://shenyu.apache.org/zh/docs/next/developer/custom-plugin

specific pr please see: https://github.com/apache/shenyu/pull/4473

  1. Add the shortest response load balancing algorithm

specific pr please see: https://github.com/apache/shenyu/pull/4488

  1. Add a hash load balancing test case

specific pr please see: https://github.com/apache/shenyu/pull/4383

  1. Add the DetailSerivice test case

specific pr please see: https://github.com/apache/shenyu/pull/4450

  1. Provide broad routing policies

Specific configurations are as follows:

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

specific pr please see: https://github.com/apache/shenyu/pull/4522

  1. Add shenyu-common enums package test cases

specific pr please see: https://github.com/apache/shenyu/pull/4541

  1. Add shenyu-common dto package test cases

specific pr please see: https://github.com/apache/shenyu/pull/4549/

  1. Add the model package test case of add shenyu-admin

specific pr please see: https://github.com/apache/shenyu/issues/4540

  1. Add the shenyu match cache test case

specific pr please see: https://github.com/apache/shenyu/pull/4557

  1. Support k8s probe

specific pr please see: https://github.com/apache/shenyu/pull/4567

  1. Add a service package test for shenyu-admin

specific pr please see: https://github.com/apache/shenyu/pull/4579

  1. Add json support to the API documentation

specific pr please see: https://github.com/apache/shenyu/pull/4591

  1. The SPEL of the mock plugin is secure by default

specific pr please see: https://github.com/apache/shenyu/pull/4606

  1. Add ShenyuClientApiDocExecutorSubscriber test cases

specific pr please see: https://github.com/apache/shenyu/pull/4632

  1. Add test cases for shenyu-client-sofa module

specific pr please see: https://github.com/apache/shenyu/pull/4688

  1. Add 'tag relation' to 'shenyu api doc'

specific pr please see: https://github.com/apache/shenyu/pull/4362

  1. Add start and stop scripts for windows

specific pr please see: https://github.com/apache/shenyu/pull/4673

  1. Add a test case for 'ShenyuSdkClientFactory'

specific pr please see: https://github.com/apache/shenyu/pull/4645

  1. Add websocket synchronization support for shenyu e2e springcloud plugin

specific pr please see: https://github.com/apache/shenyu/pull/4698

  1. Support divide plugin automatically offline

specific pr please see: https://github.com/apache/shenyu/pull/4702

  1. Add the springcloud service instance cache

specific pr please see: https://github.com/apache/shenyu/pull/4705

the specific use please see: https://shenyu.apache.org/zh/docs/next/plugin-center/proxy/spring-cloud-plugin

shenyu:    springCloudCache:       enabled: false # 为true是开启springcloud缓存
  1. Changing the password supports i18n

specific pr please see: https://github.com/apache/shenyu/pull/4758

29.shenyu discovery supports websocket synchronization

specific pr please see: https://github.com/apache/shenyu/pull/4768

  1. Upgrade 'springboot' version to '2.7.13'

specific pr please see: https://github.com/apache/shenyu/pull/4783

  1. Add nacos and zookeeper synchronization test for e2e-springcloud

specific pr please see: https://github.com/apache/shenyu/pull/4747

  1. Add 'api doc client' annotation generation property

specific pr please see: https://github.com/apache/shenyu/pull/4845

  1. Support 'zookeeper' client automatically offline

specific pr please see: https://github.com/apache/shenyu/pull/4806

  1. Support 'Apollo client' automatic offline

specific pr please see: https://github.com/apache/shenyu/pull/4855

  1. Support swagger documents and store them in a database

specific pr please see: https://github.com/apache/shenyu/pull/4849

  1. Support 'nacos client' automatic offline

specific pr please see: https://github.com/apache/shenyu/pull/4890

  1. Add the alibaba dubbo e2e test case

specific pr please see: https://github.com/apache/shenyu/pull/4859

  1. Add the apache dubbo e2e test case

specific pr please see: https://github.com/apache/shenyu/pull/4899

  1. Add shenyu spring sdk test cases

specific pr please see: https://github.com/apache/shenyu/pull/4913

  1. Add sofa e2e test

specific pr please see: https://github.com/apache/shenyu/pull/4919

  1. Add a test case for Apollo data synchronization

specific pr please see: https://github.com/apache/shenyu/pull/4918

  1. Add the Connection pool configuration for the database (hakari)

specific pr please see: https://github.com/apache/shenyu/pull/4938

  1. Add 'idea icon' for shenyu

specific pr please see: https://github.com/apache/shenyu/pull/4951

Refactor#

  1. Reconstruct shenyu admin

specific pr please see: https://github.com/apache/shenyu/pull/4355

  1. Optimize the least active balance algorithm

specific pr please see: https://github.com/apache/shenyu/pull/4342

  1. Optimize the compatibility of the first version of shenyu sign plugin

specific pr please see: https://github.com/apache/shenyu/pull/4332

the specific use please see: https://shenyu.apache.org/docs/plugin-center/security/sign-plugin

  1. Optimize the shenyu upstream check logic

specific pr please see: https://github.com/apache/shenyu/pull/4386

  1. Optimize the global version of the project

specific pr please see: https://github.com/apache/shenyu/pull/4394

  1. Optimize the code of 'ShenyuConsulConfigWatch'

specific pr please see: https://github.com/apache/shenyu/pull/4400

  1. Optimize shenyu prefix tree matching logic

specific pr please see: https://github.com/apache/shenyu/pull/4414

  1. Optimize the verification when the rule condition is submitted

specific pr please see: https://github.com/apache/shenyu/pull/4403

  1. Optimize the shenyu-client-websocket client registration code

specific pr please see: https://github.com/apache/shenyu/pull/4462

  1. Add shenyu admin's Micrometer dependent license

specific pr please see: https://github.com/apache/shenyu/pull/4409

  1. Update the maven-assembly-plugin packaging plug-in to version 3.5.0

specific pr please see: https://github.com/apache/shenyu/pull/4673

  1. Optimize the ordering of global plug-ins

specific pr please see: https://github.com/apache/shenyu/pull/4429

  1. Use BearerToken instead of StatelessToken in shenyu admin

specific pr please see: https://github.com/apache/shenyu/pull/4516

  1. Reconstructs the shenyu-logging module

specific pr please see: https://github.com/apache/shenyu/pull/4526

  1. Verify api doc

specific pr please see: https://github.com/apache/shenyu/pull/4564

  1. Optimize shenyu prefix tree and support '*' matching

specific pr please see: https://github.com/apache/shenyu/pull/4569

  1. Optimize the hot loading of plug-ins

specific pr please see: https://github.com/apache/shenyu/pull/4392

  1. Optimize the putPlugin method of 'ShenyuWebHandler'

specific pr please see: https://github.com/apache/shenyu/pull/4598

  1. Refactor Shenyu webfilter

specific pr please see: https://github.com/apache/shenyu/pull/4614

  1. Refactor the oauth2 plguin plug-in

specific pr please see: https://github.com/apache/shenyu/pull/4624

  1. Refactor the continued field of the shenyu selector

specific pr please see: https://github.com/apache/shenyu/pull/4635

  1. Refactor shenyu selection and rule matching cache

specific pr please see: https://github.com/apache/shenyu/pull/4578

  1. Deleted unused generics from the shenyu client

specific pr please see: https://github.com/apache/shenyu/pull/4653

  1. Refactor shenyu's support for sentinel plug-ins

specific pr please see: https://github.com/apache/shenyu/pull/4669

  1. Expose cached data through actuator terminals

specific pr please see: https://github.com/apache/shenyu/pull/4637

https://github.com/apache/shenyu/pull/4658 26. Refactor the checkUserPassword method to boot without printing a known error log

specific pr please see: https://github.com/apache/shenyu/pull/4697

  1. Add parameters for printing logs

specific pr please see: https://github.com/apache/shenyu/pull/4637

  1. Reconstructs shenyu global exception handling

specific pr please see: https://github.com/apache/shenyu/pull/4709

  1. Added shenyu plugin to upload integration test

specific pr please see: https://github.com/apache/shenyu/pull/4679

  1. Optimize grammar candy

specific pr please see: https://github.com/apache/shenyu/pull/4700

  1. Optimize discovery_handler_id of discovery_upstream

specific pr please see: https://github.com/apache/shenyu/pull/4710

  1. Reconstruct the shenyu-plugin module and archive proxy plug-ins by category

specific pr please see: https://github.com/apache/shenyu/pull/4765

  1. Refactor the cache of AlibabaDubboConfigCache

specific pr please see: https://github.com/apache/shenyu/pull/4772

  1. Remove hutool dependencies

specific pr please see: https://github.com/apache/shenyu/pull/4773

  1. Refactor 'ShenyuClientShutdownHook'

specific pr please see: https://github.com/apache/shenyu/pull/4780

  1. Add BaseAnnotationApiBeansExtractor Extractor

specific pr please see: https://github.com/apache/shenyu/pull/4787

  1. Support multi-client registration

specific pr please see: https://github.com/apache/shenyu/pull/4790

  1. Refactoring Shenyu-e2e supports Shenyu's check style

specific pr please see: https://github.com/apache/shenyu/pull/4799

  1. Optimize shenyu client registration logic

specific pr please see: https://github.com/apache/shenyu/pull/4809

  1. Add a domain test for the shenyu divide plugin

specific pr please see: https://github.com/apache/shenyu/pull/4803

  1. Update the extension of the rpc_ext field

specific pr please see: https://github.com/apache/shenyu/pull/4821

  1. Optimize consul connection operations

specific pr please see: https://github.com/apache/shenyu/pull/4832

  1. Refactor the yaml addition of springcloud for shenyu e2e

specific pr please see: https://github.com/apache/shenyu/pull/4837

  1. Add integration tests for the k8s ingress controller

specific pr please see: https://github.com/apache/shenyu/pull/4820

  1. Split the document field of the apidoc detail interface and add fields such as requestHeaders and responseParameters

specific pr please see: https://github.com/apache/shenyu/pull/4865

  1. Add a swagger example project to test the functionality of the API documentation

specific pr please see: https://github.com/apache/shenyu/pull/4825

  1. Optimize the display of shenyu admin's form fields in json format

specific pr please see: https://github.com/apache/shenyu/pull/4873

  1. Reconstruct the observability of shenyu logs

specific pr please see: https://github.com/apache/shenyu/pull/4874

  1. Add the bootstrap boot log

specific pr please see: https://github.com/apache/shenyu/pull/4879

  1. Refactor swagger's api documentation

specific pr please see: https://github.com/apache/shenyu/pull/4892

  1. Upgrade grpc version to 1.53.0

specific pr please see: https://github.com/apache/shenyu/pull/4841

  1. Refactor api metadata handlers

specific pr please see: https://github.com/apache/shenyu/pull/4948

  1. Optimize code and pom dependencies

specific pr please see: https://github.com/apache/shenyu/pull/4945

Bug Fixes#

  1. Optimize the h2 path

specific pr please see: https://github.com/apache/shenyu/pull/4351

  1. Fix the invocation error of the encryption response plug-in

specific pr please see: https://github.com/apache/shenyu/pull/4331

  1. Fix the jdk8 Map computeIfAbsent performance bug

specific pr please see: https://github.com/apache/shenyu/pull/4338

  1. Fix zombieRemovalTimes code

specific pr please see: https://github.com/apache/shenyu/pull/4368

  1. Rectify the sql error after the upgrade

specific pr please see: https://github.com/apache/shenyu/pull/4374

  1. Delete the detectorOfflineLinks tag

specific pr please see: https://github.com/apache/shenyu/pull/4382

  1. Ignore flat pom

specific pr please see: https://github.com/apache/shenyu/pull/4390

  1. Repair the LOG invocation method

specific pr please see: https://github.com/apache/shenyu/pull/4387

  1. Fix the NPE of sheyu-example-springcloud using nacos

specific pr please see: https://github.com/apache/shenyu/pull/4396

  1. Fix Shenyu-admin name type dispute

specific pr please see: https://github.com/apache/shenyu/pull/4340

  1. Restore the load balancing spi resource

specific pr please see: https://github.com/apache/shenyu/pull/4411

  1. Rectify sql script errors

specific pr please see: https://github.com/apache/shenyu/pull/4412

  1. Fix jackson's 24 hour format and time zone

specific pr please see: https://github.com/apache/shenyu/pull/4413

  1. Fix JwtUtils error

specific pr please see: https://github.com/apache/shenyu/pull/4420

  1. Fix dubbo caller cache bug

specific pr please see: https://github.com/apache/shenyu/pull/4433

  1. Delete the lost HOST

specific pr please see: https://github.com/apache/shenyu/pull/4425

  1. Repair SpringMvcClientEventListener test cases

specific pr please see: https://github.com/apache/shenyu/pull/4252

  1. Fix the zombie update PENDING_SYNC error

specific pr please see: https://github.com/apache/shenyu/pull/4430

  1. Repair memory leaks in the windlfu

specific pr please see: https://github.com/apache/shenyu/pull/4486

  1. Fix the rule query failure caused by too many rules

specific pr please see: https://github.com/apache/shenyu/pull/4499

  1. Fix missing actuator dependencies and port errors in sample http

specific pr please see: https://github.com/apache/shenyu/pull/4506

  1. Fix http and https errors on UpstreamCheckUtils

specific pr please see: https://github.com/apache/shenyu/pull/4509

  1. Fix memory leak caused by FileFilter

specific pr please see: https://github.com/apache/shenyu/pull/4507

  1. Fix the zookeeper synchronization error

specific pr please see: https://github.com/apache/shenyu/pull/4906

  1. The memory leak repair MemorySafeWindowTinyLFUMap errors

specific pr please see: https://github.com/apache/shenyu/pull/4524

  1. Fix ApiDoc path missing separator

specific pr please see: https://github.com/apache/shenyu/pull/4528

  1. Fix shenyu trie's NPE

specific pr please see: https://github.com/apache/shenyu/pull/4533

  1. Fix plugin skip error

specific pr please see: https://github.com/apache/shenyu/pull/4589

  1. Rectify the oracle sql error

specific pr please see: https://github.com/apache/shenyu/pull/4595

  1. Fix shenyu admin can not load shenyu icon issue

specific pr please see: https://github.com/apache/shenyu/pull/4605

  1. Fix the hystrix fallback bug

specific pr please see: https://github.com/apache/shenyu/pull/4593

  1. Fix the warm-up time for divide and springcloud

specific pr please see: https://github.com/apache/shenyu/pull/4619

  1. Fix springcloud service selector

specific pr please see: https://github.com/apache/shenyu/pull/4639

  1. Fix shenyu-spring-boot-starter-plugin-mock add spring.factories

specific pr please see: https://github.com/apache/shenyu/pull/4644

  1. Fix shenyu-client-mvc and shenyu-client-springcloud lost ip

specific pr please see: https://github.com/apache/shenyu/pull/4681

  1. Fix empty rule data and selector data in cache

specific pr please see: https://github.com/apache/shenyu/pull/4716

  1. Fix api documentation module update api details error

specific pr please see: https://github.com/apache/shenyu/pull/4720

  1. Fix getting topic from configuration in KafkaLogCollectClient

specific pr please see: https://github.com/apache/shenyu/pull/4756

  1. Fix thread safety issue with loggingConsole plugin

specific pr please see: https://github.com/apache/shenyu/pull/4763

  1. Fix brpc integration test response size

specific pr please see: https://github.com/apache/shenyu/pull/4784

  1. Fix plugn-Dubco-common selector update gray release to remove cache

specific pr please see: https://github.com/apache/shenyu/pull/4762

  1. Fix shenyu admin menu name bug

specific pr please see: https://github.com/apache/shenyu/pull/4805

  1. Fix the problem that shenyu admin cannot configure consul ports

specific pr please see: https://github.com/apache/shenyu/pull/4843

  1. Fix shenyu client metadata and uri cannot be synchronized with apollo to admin

specific pr please see: https://github.com/apache/shenyu/pull/4851

  1. Fix PathVariable annotation url does not match

specific pr please see: https://github.com/apache/shenyu/pull/4852

  1. Fixed an issue where URIs could not be updated in PathPattern mode

specific pr please see: https://github.com/apache/shenyu/pull/4854

  1. Fix the client close method call twice

specific pr please see: https://github.com/apache/shenyu/pull/4867

  1. Fix shenyu error processing consul configuration

specific pr please see: https://github.com/apache/shenyu/pull/4872

  1. Delete the unused configuration from the Request and modifyResponse plug-ins

specific pr please see: https://github.com/apache/shenyu/pull/4882

  1. Fix the http registration metadata error

specific pr please see: https://github.com/apache/shenyu/pull/4889

  1. Fixed an issue where websocket lost user-defined close status

specific pr please see: https://github.com/apache/shenyu/pull/4844

  1. Fix consul register lost meta path property when special symbol

specific pr please see: https://github.com/apache/shenyu/pull/4885

  1. Fix etcd synchronization errors

specific pr please see: https://github.com/apache/shenyu/pull/4911

  1. Rectify multiple synchronization event errors on shenyu admin

specific pr please see: https://github.com/apache/shenyu/pull/4941

  1. Fix Shenyu motan plugin execution error

specific pr please see: https://github.com/apache/shenyu/pull/4934

Contributors#

Special thanks to the following contributors for their support and participation in the '2.6.0' release (in no particular order).

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

Become a contributor#

We welcome every contributor to join ShenYu, and welcome contributors to participate in ShenYu in the spirit of Apache Way!

See the contributor guidelines:

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