K

Keystone Gateway

Multi-tenant routing
without the complexity

High-performance reverse proxy with embedded Lua scripting. One binary, YAML config, Lua scripts. That's it.

Quick Start
# Get it running
git clone https://github.com/ygalsk/keystone-gateway.git
cd keystone-gateway
make dev

# Gateway runs on :8080
curl localhost:8080/admin/health

Why Keystone Gateway?

Embedded Lua

Define routes in Lua scripts, no recompilation needed

🏢

Multi-tenant

Route by domain, path, or both

🚀

Performance

Thread-safe Lua pools, HTTP/2, connection pooling

💎

Simple

One binary, YAML config, Lua scripts

How It Works

1

Configure tenants

Define who gets routed where

2

Write Lua scripts

Define routes and middleware

3

Start gateway

Routes traffic based on domain/path

4

Monitor

Check /admin/health for status

Quick Start

Configuration

# config.yaml
tenants:
  - name: "api"
    domains: ["localhost"]
    lua_routes: "api"
    services:
      - name: "backend"
        url: "http://localhost:3001"

Lua Script

-- scripts/api.lua
chi_route("GET", "/hello", function(request, response)
    response:write("Hello World")
end)

Start: ./keystone-gateway -config config.yaml

Full Quick Start Guide

Real-world Examples

Microservices Gateway

Route /users/ to user service, /orders/ to order service

View Example →

Load Balancing

Automatic round-robin across multiple backend services

View Example →

Authentication

JWT middleware for API protection

View Example →

Philosophy

Keep it simple. Get it working. Make it fast.

Keystone Gateway is a reverse proxy with embedded Lua scripting. One binary, YAML config, Lua scripts. No external dependencies, no complex setup, no microservice hell.