explaingit

apache/shenyu

8,796JavaAudience · ops devopsComplexity · 4/5LicenseSetup · moderate

TLDR

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.

Mindmap

mindmap
  root((Apache ShenYu))
    What It Does
      API gateway and router
      Protocol translation
      Real-time config changes
    Security Controls
      JWT authentication
      OAuth 2.0 support
      Web application firewall
    Traffic Management
      Rate limiting
      Load balancing
      Hot-swap plugins
    Observability
      Distributed tracing
      Metrics collection
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Set up a single entry point for all your microservices with routing rules you can change in real time without restarts.

USE CASE 2

Add JWT authentication and rate limiting to existing backend services without modifying their code.

USE CASE 3

Route traffic to services built with different technologies like Spring Cloud, gRPC, and Dubbo through one gateway.

USE CASE 4

Monitor traffic and trace requests across services using ShenYu's built-in observability plugin.

Tech stack

JavaSpring CloudgRPCDockerDubbo

Getting it running

Difficulty · moderate Time to first run · 30min

Requires Java 17 or newer, Docker-based quick start spins up two containers for the admin dashboard and the gateway.

Apache 2.0, use freely for any purpose including commercial, modify and distribute, as long as you include the license and copyright notice.

In plain English

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.

Copy-paste prompts

Prompt 1
Show me the Docker Compose setup to get Apache ShenYu running with its admin dashboard and gateway container.
Prompt 2
How do I add a JWT authentication rule in Apache ShenYu to protect a specific API route from unauthenticated requests?
Prompt 3
How do I configure rate limiting in Apache ShenYu to prevent a single caller from overwhelming a backend service?
Prompt 4
How do I add a new routing rule in the Apache ShenYu dashboard to forward traffic from one path to a Spring Cloud backend service?
Open on GitHub → Explain another repo

← apache on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.