GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - apache/shenyu: Apache ShenYu is a Java native API Gateway for service proxy, protocol conversion and API governance.

BranchesTags
Open more actions menu

Latest commit

 

History

4,729 Commits
4,729 Commits

Folders and files

NameName
Last commit message
Last commit date
.devcontainer
.devcontainer
 
 
.github
.github
 
 
.idea
.idea
 
 
.mvn/wrapper
.mvn/wrapper
 
 
actions
actions
 
 
db
db
 
 
docs
docs
 
 
issue-spec
issue-spec
 
 
licenses
licenses
 
 
script
script
 
 
shenyu-admin-listener
shenyu-admin-listener
 
 
shenyu-admin
shenyu-admin
 
 
shenyu-alert
shenyu-alert
 
 
shenyu-bootstrap-http
shenyu-bootstrap-http
 
 
shenyu-bootstrap
shenyu-bootstrap
 
 
shenyu-client
shenyu-client
 
 
shenyu-common
shenyu-common
 
 
shenyu-disruptor
shenyu-disruptor
 
 
shenyu-dist
shenyu-dist
 
 
shenyu-e2e
shenyu-e2e
 
 
shenyu-examples
shenyu-examples
 
 
shenyu-infra
shenyu-infra
 
 
shenyu-integrated-test
shenyu-integrated-test
 
 
shenyu-kubernetes-controller
shenyu-kubernetes-controller
 
 
shenyu-loadbalancer
shenyu-loadbalancer
 
 
shenyu-plugin
shenyu-plugin
 
 
shenyu-protocol
shenyu-protocol
 
 
shenyu-register-center
shenyu-register-center
 
 
shenyu-registry
shenyu-registry
 
 
shenyu-sdk
shenyu-sdk
 
 
shenyu-spi
shenyu-spi
 
 
shenyu-spring-boot-starter
shenyu-spring-boot-starter
 
 
shenyu-sync-data-center
shenyu-sync-data-center
 
 
shenyu-web
shenyu-web
 
 
.asf.yaml
.asf.yaml
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
.gitpod.Dockerfile
.gitpod.Dockerfile
 
 
.gitpod.yml
.gitpod.yml
 
 
.licenserc.yaml
.licenserc.yaml
 
 
.prowlabels.yaml
.prowlabels.yaml
 
 
AGENTS.md
AGENTS.md
 
 
LICENSE
LICENSE
 
 
MATURITY.md
MATURITY.md
 
 
Makefile
Makefile
 
 
NOTICE
NOTICE
 
 
README.md
README.md
 
 
RELEASE-NOTES.md
RELEASE-NOTES.md
 
 
SECURITY.md
SECURITY.md
 
 
SECURITY_MODEL.md
SECURITY_MODEL.md
 
 
changelog.sh
changelog.sh
 
 
mvnw
mvnw
 
 
mvnw.cmd
mvnw.cmd
 
 
pom.xml
pom.xml
 
 

Repository files navigation

Apache ShenYu

Maven Central release Apache 2.0 license CI status Codecov coverage Docker pulls Contribute with Gitpod Ask DeepWiki

Official website Quick download

apache/shenyu on Trendshift

Overview

Apache ShenYu is a Java-based gateway for service proxying, protocol conversion, and API governance. An extensible plugin chain processes requests, while ShenYu Admin manages and distributes configuration to gateway replicas.

Core Capabilities

Area What ShenYu provides
Plugin routing and extensions An ordered plugin chain for HTTP requests, with selector and rule matching where applicable. Spring Boot starters select plugins; custom Java plugins, SPI implementations, and WASM plugin APIs extend the gateway.
Protocols and upstreams HTTP and Spring Cloud services, WebSocket connections, and Apache Dubbo and gRPC backends. Optional TCP and MQTT listeners provide additional ingress; SOFA and Tars gateway plugins are available as external plugin-store starters.
Registration and discovery Client SDKs register service addresses and API metadata with Admin. Registry integrations support discovery; an optional Kubernetes controller reconciles Ingress and Endpoints resources.
Security and traffic control WAF, signing, authentication plugins, load balancing, rate limiting, and fault tolerance through Resilience4j and Sentinel; deprecated Hystrix remains available as an external plugin (see plugin-store-hystrix).
Caching and transformation In-memory or Redis-backed response caching, URL rewriting, redirection, and request/response transformation.
Dynamic configuration Admin persists plugins, selectors, rules, metadata, and authentication data. WebSocket sync is the default; HTTP long polling, ZooKeeper, Nacos, and etcd are available. Apollo remains available during its deprecation release and is planned to move to an external extension (see Apollo migration). Consul sync is available as an external extension (see plugin-store-consul). Gateway replicas apply updates to their local caches.
Observability Metrics and logging plugins, including Kafka and Elasticsearch destinations; email and DingTalk alerts from Admin.
AI and MCP AI proxy, prompt processing, token limits, sensitive-word filtering, AI request/response transformation, and an MCP server plugin with SSE and Streamable HTTP.

Architecture

Apache ShenYu architecture

Get Started

Start with the English documentation, 中文文档, or the official downloads.

Docker quick start

Use Docker and OpenSSL to start ShenYu Admin, a gateway, and an example HTTP service. Run the commands below in the same shell.

Start the services

docker network create shenyu

export SHENYU_JWT_SECRETKEY="$(openssl rand -hex 32)"
export SHENYU_SYNC_WEBSOCKET_TOKEN="$(openssl rand -hex 32)"
export SHENYU_LOCAL_KEY="$(openssl rand -hex 24)"
export SHENYU_LOCAL_SHA512KEY="$(printf %s "$SHENYU_LOCAL_KEY" | openssl dgst -sha512 -r | awk '{print $1}')"

docker run -d --name shenyu-admin --network shenyu -p 127.0.0.1:9095:9095 \
  -e SHENYU_JWT_SECRETKEY -e SHENYU_SYNC_WEBSOCKET_TOKEN \
  apache/shenyu-admin:latest

docker run -d --name shenyu-demo --network shenyu nginx:stable-alpine

docker run -d --name shenyu-bootstrap --network shenyu -p 127.0.0.1:9195:9195 \
  -e SHENYU_SYNC_WEBSOCKET_URLS=ws://shenyu-admin:9095/websocket \
  -e SHENYU_SYNC_WEBSOCKET_TOKEN \
  -e SHENYU_HEARTBEAT_SERVERLISTS=http://shenyu-admin:9095 \
  -e SHENYU_LOCAL_ENABLED=true -e SHENYU_LOCAL_SHA512KEY \
  apache/shenyu-bootstrap:latest

Admin listens on http://localhost:9095; the gateway listens on http://localhost:9195. Wait for both services to start, then check their health endpoints:

curl -fsS http://localhost:9095/actuator/health
curl -fsS http://localhost:9195/actuator/health

Configure a sample route

The following request configures the divide plugin on this gateway to forward /index.html to the example service:

curl -fsS http://localhost:9195/shenyu/plugin/selectorAndRules \
  -H 'Content-Type: application/json' \
  -H "localKey: ${SHENYU_LOCAL_KEY}" \
  -d '{
    "pluginName": "divide",
    "selectorHandler": "[{\"upstreamUrl\":\"shenyu-demo:80\",\"protocol\":\"http\",\"weight\":100}]",
    "conditionDataList": [
      {"paramType": "uri", "operator": "match", "paramValue": "/index.html"}
    ],
    "ruleDataList": [{
      "ruleHandler": "{\"loadBalance\":\"random\"}",
      "conditionDataList": [
        {"paramType": "uri", "operator": "match", "paramValue": "/index.html"}
      ]
    }]
  }'

This request updates only this gateway instance; it does not write the route to Admin. For centrally managed, durable routes, configure them in Admin with a persistent database instead of the default in-memory H2 database.

SOFA and Tars support is no longer bundled in the default gateway distribution. To run those protocols, install the matching plugin-store starter in the gateway classpath and keep using the existing Admin metadata, client registration SDKs, and examples for protocol configuration.

Verify the route

curl -i http://localhost:9195/index.html

The response should contain the NGINX welcome page served through ShenYu.

Why Apache ShenYu?

ShenYu (神禹) is an honorific name for Xia Yu, an ancient Chinese ruler also known as Da Yu. He is remembered for crossing the Yellow River three times for the benefit of the people and successfully controlling its floods. Alongside Yao and Shun, he is regarded as one of ancient China's three greatest kings.

The name reflects three ideas:

  • It promotes the traditional virtues of Chinese civilization.
  • It echoes a gateway's central role in governing traffic.
  • It expresses the community's commitment to being fair, just, open, and meritocratic, in tribute to ShenYu and in keeping with the Apache Way.

Community and Support

  • Contribute to ShenYu
  • Windows checkout and long-path troubleshooting
  • Split Java client migration and contribution guide
  • Join the development mailing list

Known Users

The Known Users page lists registered users in registration order.

Organizations using Apache ShenYu are welcome to register through GitHub issue #68. Registration is for open source users only.

Star History

Apache ShenYu star history

License

Apache ShenYu is licensed under the Apache License, Version 2.0.

About

Apache ShenYu is a Java native API Gateway for service proxy, protocol conversion and API governance.

shenyu.apache.org/

Topics

api-gatewaydubbo-proxygrpc-proxyhttp-proxyreactor-javasofa-proxyspring-cloud-proxy

Resources

Readme
Apache-2.0 license

Code of conduct

Code of conduct

Security policy

Security policy
Activity
Custom properties

Stars

8.9k stars

Watchers

289 watching

Forks

3.1k forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.