Shenyu
Java-native API gateway for HTTP, gRPC, Dubbo, and WebSocket services
Replaces Kong Konnect, Apigee, Wso2 Api Manager

Who it's for
Teams running multiple Spring Cloud or Dubbo microservices can register service addresses via ShenYu's client SDKs and manage routing, authentication, and rate limiting from a single Admin console. The plugin chain applies policies across all registered services without custom proxy code.
If your services are entirely in a non-Java stack (Go, Node.js, Python) and you need language-native middleware without a JVM dependency, a lighter-weight gateway may fit better.
ShenYu's support for HTTP, gRPC, Dubbo, WebSocket, and MQTT lets platform engineers apply a single governance layer across heterogeneous service backends. Rate limiting, WAF rules, and observability plugins cover all protocols from one Admin interface without per-protocol tools.
If your entire stack is HTTP/REST and you need a simple reverse proxy with no JVM dependency, a lightweight HTTP-only gateway like Caddy is simpler to operate.
Teams looking to exit per-call or per-node pricing from Kong Konnect, Apigee, or WSO2 can move API governance to ShenYu on existing compute infrastructure. The Admin console covers authentication, rate limiting, and observability without a managed-service subscription.
If your organization requires vendor SLA guarantees, managed compliance certifications, or 24/7 enterprise support, a commercial managed gateway remains the lower-risk choice.
The AI proxy plugin handles prompt processing, token limits, and sensitive-word filtering. The MCP server plugin with SSE and Streamable HTTP support makes ShenYu a gateway layer for services exposing Model Context Protocol endpoints alongside standard microservice traffic.
If your AI gateway needs are limited to LLM provider routing without broader multi-protocol service mesh requirements, a dedicated LLM gateway is more focused and simpler to configure.
The problem
Managing API traffic across a microservice landscape becomes expensive and limiting when you rely on commercial gateway platforms. Kong Konnect and Apigee charge per API call or per gateway node, meaning costs grow with traffic and lock pricing to vendor contracts. WSO2 API Manager carries significant operational overhead and licensing complexity for teams that want to govern internal service-to-service calls alongside public API exposure. The deeper challenge is protocol heterogeneity. Most enterprises do not run pure HTTP/REST stacks; they have legacy Dubbo RPC services, gRPC backends, WebSocket connections, and MQTT devices all needing a unified governance point. Commercial gateways typically require plugin licenses or additional tiers to support non-HTTP protocols, while self-managed Java teams are left writing custom proxy code or deploying multiple gateway products side by side.
How it works
Routes HTTP/REST, Apache Dubbo, gRPC, WebSocket, and MQTT traffic through a single gateway entry point. A Kubernetes controller reconciles Ingress and Endpoints resources for cloud-native deployments. SOFA and Tars proxy support is available via external plugin-store starters.
An ordered plugin chain processes every request, with Spring Boot starters selecting built-in plugins. Custom Java plugins, SPI implementations, and WASM plugin APIs extend the gateway without forking core code. New plugin capabilities load dynamically without a gateway restart.
WAF, JWT, OAuth 2.0, request signing, and authentication plugins protect APIs at the edge. Rate limiting and circuit breaking via Resilience4j and Sentinel keep services stable under variable load, and load balancing distributes traffic across upstream instances.
A visual management console handles plugin configuration, selector and rule editing, metadata, and authentication data. Configuration changes sync to all gateway replicas over WebSocket by default; HTTP long polling, ZooKeeper, Nacos, and etcd are available as alternative sync transports.
Metrics and logging plugins ship data to Kafka and Elasticsearch destinations. Email and DingTalk alerts notify on-call teams from Admin when thresholds are crossed. Response caching (in-memory or Redis-backed), URL rewriting, and request/response transformation are available as plugins.
An AI proxy plugin handles prompt processing, token limits, and sensitive-word filtering for AI-backed services. An MCP server plugin with SSE and Streamable HTTP transport provides a gateway layer for services exposing Model Context Protocol endpoints alongside standard API traffic.
Features
- Multi-Protocol Proxy
- Extensible Plugin Chain
- Security and Traffic Control
- ShenYu Admin Console
- Observability and Alerting
- AI Proxy and MCP Server
How to install
Self-hosting uses Docker to deploy the Admin server and gateway bootstrap container as two networked services.
docker network create shenyu
docker run -d --name shenyu-admin --network shenyu -p 9095:9095 apache/shenyu-admin:latest
docker run -d --name shenyu-bootstrap --network shenyu -p 9195:9195 -e SHENYU_SYNC_WEBSOCKET_URLS=ws://shenyu-admin:9095/websocket apache/shenyu-bootstrap:latestRecommended for this setup
Strengths
- Apache-2.0 license with no per-call fees: Licensed under Apache-2.0, ShenYu runs on your infrastructure without API-call charges or per-node license fees. Unlike Kong Konnect's usage-based pricing or Apigee's Google Cloud billing, you pay only for compute. Commercial use is unrestricted; the license imposes no limits on internal or external API traffic volume.
- Java-native design for Spring Cloud and Dubbo stacks: Written in Java with reactive async processing, ShenYu integrates into Spring Cloud and Dubbo service registries without language-boundary friction. Teams can register service addresses via the provided client SDKs and begin routing without a gateway rewrite or separate protocol translation layer.
- Unified protocol governance across a heterogeneous stack: HTTP, Dubbo, gRPC, WebSocket, and MQTT share one routing and governance layer. Organizations with heterogeneous service backends avoid deploying a separate gateway per protocol, keeping security rules, rate limits, and routing policies in one Admin console rather than spread across multiple tools.
- Active Apache top-level project with production users: Apache ShenYu holds Apache top-level project status, which requires Apache Software Foundation governance. The repository had over 8,900 stars and 3,100 forks as of October 2026, with an active commit history. A Known Users page lists organizations that have voluntarily registered their production deployments.
Trade-offs
- Multi-container deployment setup: A production ShenYu deployment requires two services running together: shenyu-admin and shenyu-bootstrap. Both containers need matching JWT and sync tokens configured at startup, and Admin requires a persistent database to replace its default H2 in-memory store before going to production. Teams expecting a single-container install will need to plan a multi-service setup.
- JVM resource footprint: ShenYu runs on the JVM, so each deployment node needs a Java runtime. Memory footprint and startup time are higher than gateway tools written in Go or Rust. Teams without Java expertise on the operations side may find JVM tuning (heap sizing, GC configuration) adds unfamiliar overhead, especially when co-locating Admin and the gateway on the same host.
- 357 open issues on GitHub: With 357 open issues, some edge-case protocol configurations and plugin interactions may involve known bugs. Teams evaluating ShenYu for Dubbo, MQTT, or WASM plugin use should test their specific protocol stack in a staging environment before placing the gateway on a critical path.
Tech stack
FAQ
Yes. Apache ShenYu is licensed under Apache-2.0, which permits unrestricted commercial use, modification, and self-hosting with no fees. You pay only for the compute resources your Admin server and gateway bootstrap containers run on.
ShenYu natively supports HTTP/REST, Apache Dubbo, gRPC, WebSocket, and MQTT. TCP and optional SOFA and Tars proxy support are available via external plugin-store starters. This protocol range sets ShenYu apart from most open source gateways, which focus on HTTP and gRPC alone.
Kong Konnect is a managed API gateway with usage-based pricing and a hosted control plane. ShenYu is Apache-2.0-licensed and fully self-hosted. ShenYu has stronger native support for Java/Dubbo backends and carries no per-call fees; Kong has a larger commercial plugin marketplace and an established managed-service track record. If you need a vendor-managed control plane, Kong is the better fit; if you need self-hosted Dubbo or MQTT routing with no subscription, ShenYu covers it.
Yes. An optional Kubernetes controller reconciles Ingress and Endpoints resources, so ShenYu can discover and route to services registered in Kubernetes without manual Admin configuration. You can also run shenyu-admin and shenyu-bootstrap as Kubernetes Deployments using their official Docker images.
ShenYu Admin persists plugins, selectors, rules, and authentication data. Changes sync to gateway replicas using WebSocket by default. HTTP long polling, ZooKeeper, Nacos, and etcd are available as alternative sync transports for teams already running those coordination services.