High-performance, plugin-driven API Gateway written in Koder Lang. Everything passes through, nothing gets in unchecked.
# Route all /api traffic through JWT auth + rate limiting
[[route]]
name = "api-v1"
paths = ["/api/v1"]
upstream = "backend"
[route.plugins.jwt_auth]
algorithm = "RS256"
jwks_url = "https://id.koder.dev/.well-known/jwks.json"
[route.plugins.rate_limit]
limit = 1000
window = 60
algorithm = "sliding_window"
[[upstream]]
name = "backend"
algorithm = "round_robin"
[[upstream.targets]]
host = "10.0.0.1"
port = 8080
Full HTTP/1.1, HTTP/2, gRPC, WebSocket, and GraphQL proxying with connection pooling and keep-alive support.
6 strategies: Round Robin, Weighted Round Robin, Least Connections, IP Hash, Random, and Consistent Hash with virtual nodes.
16 built-in plugins. Write custom plugins in .kd files with hot-loading. Phased execution pipeline with priority ordering.
JWT (RS256/HS256/ES256 + JWKS), OAuth2/OIDC introspection, API Key, HTTP Basic, HMAC signature verification.
4 algorithms: Fixed Window, Sliding Window, Token Bucket, Leaky Bucket. Per-IP, per-consumer, per-route. Cluster-synced.
Automatic failure detection with configurable thresholds. Three states: Closed, Open, Half-Open. Adaptive thresholds.
Active HTTP/TCP health checking with configurable intervals. Passive monitoring of real traffic. Auto-recovery.
In-memory LRU cache with TTL. Cache-Control header support. Per-route cache configuration. Vary header support.
Change routes, upstreams, and plugins without restarting. SIGHUP signal or Admin API. File watcher for auto-reload.
Prometheus metrics endpoint, OpenTelemetry distributed tracing, structured JSON access logs, real-time analytics dashboard.
DNS-based service discovery with SRV/A record support. Static target configuration. Automatic refresh with TTL caching.
Full RESTful Admin API for runtime management. Built-in web dashboard. Create, update, delete routes and upstreams on the fly.
| Feature | Koder Gate | Kong | APISIX | Traefik | KrakenD |
|---|---|---|---|---|---|
| Plugin System | ✔ .kd hot-load | ✔ Lua | ✔ Lua | Middleware | No |
| Load Balancing (6+) | ✔ 6 strategies | ✔ | ✔ | 3 | 2 |
| JWT / OAuth2 / OIDC | ✔ | ✔ | ✔ | JWT only | ✔ |
| Rate Limiting (4 algos) | ✔ | 2 | 3 | 1 | 1 |
| Circuit Breaker | ✔ Adaptive | ✔ | ✔ | ✔ | ✔ |
| gRPC Proxy | ✔ | ✔ | ✔ | ✔ | ✔ |
| WebSocket Proxy | ✔ | ✔ | ✔ | ✔ | ✘ |
| Admin API | ✔ | ✔ | ✔ | ✔ | ✘ |
| Hot Reload | ✔ SIGHUP + API | DB-driven | etcd | ✔ | ✘ |
| OpenTelemetry | ✔ | Plugin | ✔ | ✔ | Plugin |
| Request Validation | ✔ JSON Schema | Plugin | Plugin | ✘ | ✔ |
| Canary Releases | ✔ | ✔ | ✔ | Weighted | ✘ |
| No Database Required | ✔ | ✘ PostgreSQL | ✘ etcd | ✔ | ✔ |
| Single Binary | ✔ | ✘ | ✘ | ✔ | ✔ |
| Written In | Koder Lang | Lua/Go | Lua/Go | Go | Go |
| License | AGPL-3.0 | Apache 2.0 | Apache 2.0 | MIT | Apache 2.0 |
$ kgate serve -c config.toml
$ kgate serve --port 9000 --workers 8
$ kgate serve --log-level debug
$ kgate routes list
$ kgate routes add --name api --path /api --upstream backend
$ kgate routes delete api
$ kgate plugins list
$ kgate plugins enable rate_limit
$ kgate plugins info jwt_auth
$ kgate status
$ kgate health
$ kgate reload
$ kgate config validate