apache /shenyu

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

★ 8,921⑂ 3,114👁 289⑃ 5,007● 3,466▤ 17
JavaApache-2.0Created 2018-07-11shenyu.apache.org/
Download: v2.7.2v2.7.2 ↓2.7.22026-11-06
+0
Daily
8,921
stars
3,114
forks
289
watchers
5,007
prs
3,466
issues
17
releases

README

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

bash
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 -

Top issues

Latest release

v2.7.2 v2.7.2 2026-11-06
What's Changed

Apache ShenYu 2.7.2 includes the complete changes from v2.7.1 through the approved RC4 candidate.

 AI and gateway fixes

 Replay one-shot request bodies safely in Request Transformer and preserve downstream execution errors.
 Honor fail-closed sensitive-word inspection when Redis is unavailable.
 Decode JSON text before sensitive-word inspection, including Unicode escapes.
 Scope Token Limiter usage accounting to provider protocol fields.
 Improve AI proxy, MCP, cache, retry, HTTP client, WebSocket, registry, and gateway lifecycle behavior.

 Platform and dependency updates

 

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON