Appearance
ADR-001: Apache APISIX as Layer 1 API Gateway
Status
Accepted — 2026-03-21
Context
We need a high-performance API gateway capable of 50,000 TPS at P99 < 50ms, with extensible plugin architecture, native rate limiting, and multi-tenant support.
Options evaluated
- Apache APISIX — Nginx + Lua-based, etcd config store, native Lua plugin API
- Kong — Nginx + Lua-based, PostgreSQL/Cassandra config store, mature ecosystem
- Envoy — C++, xDS API, high performance but complex config and plugin development
- Traefik — Go-based, auto-discovery, simpler but less extensible for custom logic
Decision
Use Apache APISIX as the Layer 1 API gateway engine.
Rationale
- Performance: APISIX benchmarks show 2-3x higher throughput than Kong due to etcd vs database overhead. Proven at 50k+ TPS in production deployments.
- Plugin DX: Lua plugins in APISIX have a simpler lifecycle model (access/header_filter/body_filter/log phases) compared to Envoy's C++ or WASM filters.
- Config store: etcd is lighter than PostgreSQL (Kong) and purpose-built for configuration distribution.
- No database dependency: Unlike Kong, APISIX doesn't need a relational database, reducing operational complexity.
- Active development: Apache top-level project with regular releases.
Trade-offs
- Smaller community than Kong or Envoy
- Fewer third-party plugins available (mitigated by custom Lua plugin architecture)
- Dashboard is less polished than Kong Manager
Consequences
- All Layer 1 plugins will be written in Lua
- etcd becomes a critical dependency — must be monitored and backed up
- Team needs Lua proficiency for plugin development