shenyu
Apache ShenYu is a Java native API Gateway for service proxy, protocol conversion and API governance.
Apache ShenYu is an open-source API gateway that routes HTTP traffic to multiple backend services with real-time plugin management, JWT and OAuth 2.0 security, rate limiting, and observability built in.
Apache ShenYu is a gateway that sits in front of your web services and acts as a single entry point for all incoming traffic. If you have multiple backend services, ShenYu receives requests from clients and forwards them to the right service, handling the routing decisions so your services do not have to talk to each other directly.
The project supports a wide range of backend technologies: it can forward requests to services built with Spring Cloud, gRPC, Dubbo, WebSocket, MQTT, and others. That means teams using different technologies can still route all their traffic through one place, with ShenYu translating between protocols where needed.
On top of routing, ShenYu adds a layer of controls. It supports security features like JWT tokens and OAuth 2.0 for verifying who is allowed in, rate limiting to prevent any one caller from overwhelming a service, and a web application firewall plugin. It also has observability features, meaning it can record traces and metrics so you can see what is happening across your services.
Configuration is handled through a visual dashboard where you can set routing rules, manage permissions, and control traffic without restarting anything. Changes you make in the dashboard are picked up by the gateway in real time, keeping downtime to a minimum. The plugin system is hot-swappable, meaning you can add or remove plugins while the gateway is still running.
Getting started requires Java 17 or newer. A Docker-based quick start is provided in the README, which spins up two containers, one for the admin dashboard and one for the actual request-handling component, and has you routing traffic in a few commands.
Where it fits
- Set up a single entry point for all your microservices with routing rules you can change in real time without restarts.
- Add JWT authentication and rate limiting to existing backend services without modifying their code.
- Route traffic to services built with different technologies like Spring Cloud, gRPC, and Dubbo through one gateway.
- Monitor traffic and trace requests across services using ShenYu's built-in observability plugin.