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
+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
#68Who used Apache ShenYu?102 comments · 2019-06-03#1005Welcome to provide articles on the ShenYu68 comments · 2021-01-18#5529[Task] Add end-to-end (E2E) testing for logging plugins.14 comments · 2024-04-02#7935[Feature][MCP] Track tool contract versions with compatibility diffs and pinning12 comments · 2026-10-21#5288Jwt usage issues11 comments · 2023-11-09#6005[Question] 2.7.0 版本,为什么进入管理页面会自动调度到另外一个ip导致访问报错10 comments · 2025-04-13#5175[Question] can not match rule data dubbo / can not match rule data divide / can not match rule data :xxxRateLimiter(customRateLimiter)9 comments · 2023-09-21#6029[Question] Inquiry about MCP (Model Context Protocol) Support for Dubbo Service Proxy8 comments · 2025-05-23
Latest release
v2.7.2 v2.7.2 2026-11-06What'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