Skip to content

Gateway configuration examples

The api-gateway repository includes small, runnable setups. Each one has a gateway.yaml, a tiny echo backend and a docker-compose.yml, so you can start it, send requests and read the logs in a few minutes.

You need Docker with Compose and curl. Clone the repository, go into an example folder and start it:

Terminal
git clone https://github.com/nocleye/api-gateway.git
cd api-gateway/examples/hello-gateway
docker compose up --build

Only the gateway publishes a port (8080). The backend is reachable only through the gateway. Send requests from a second terminal, and stop everything with docker compose down. Each example’s README has the exact requests to try.

hello-gateway

One echo backend behind the gateway. Shows how a request is matched to a route, how the path is rewritten, and how to follow it in the logs.

What it shows v0.5.0-beta

  • Servers and routes
  • Longest-prefix route matching
  • Path rewrite (remove and add prefix)

rate-limit-basics

The same echo backend with usage control. Shows how a global limit and a route limit combine, and what changes between Cascade and Strict.

What it shows v0.5.0-beta

  • Client ID rule by IP
  • Usage control rules (global and route limits)
  • Global default rules
  • Route-level limits
  • Cascade and Strict usage control modes