API Gateway data-plane - High-performance Rust API Gateway
1.9K
The Data Plane is the request proxy that routes incoming traffic to upstream services based on configuration from the Control Plane.
docker run -d \
--name api-gateway-data-plane \
-p 8000:8000 \
-e APP_SYNC__CONTROL_PLANE_URL=http://control-plane:8080 \
roryfig/api-gateway-data-plane:latest
| Tag | Description |
|---|---|
latest | Latest stable release |
vX.Y.Z | Specific version (e.g., v1.0.0) |
vX.Y | Latest patch of minor version |
vX | Latest minor of major version |
Required:
Optional:
| Variable | Default | Description |
|---|---|---|
APP_SYNC__CONTROL_PLANE_URL | http://localhost:8080 | Control Plane URL |
APP_SYNC__SYNC_INTERVAL | 10 | Sync interval (seconds) |
| Variable | Default | Description |
|---|---|---|
APP_SERVER_HOST | 0.0.0.0 | Bind address |
APP_SERVER_PORT | 8000 | HTTP port |
| Variable | Default | Description |
|---|---|---|
APP_AUTH_ENABLED | true | Enable authentication |
APP_AUTH_JWT_SECRET | - | JWT secret (must match Control Plane) |
APP_AUTH_JWT_ALGORITHM | HS256 | JWT algorithm |
| Variable | Default | Description |
|---|---|---|
APP_LOGGING_LEVEL | info | Log level |
APP_LOGGING_FORMAT | json | Output format |
| Variable | Default | Description |
|---|---|---|
APP_TELEMETRY_ENABLED | false | Enable tracing |
APP_TELEMETRY_OTLP_ENDPOINT | - | OTLP endpoint |
| Variable | Default | Description |
|---|---|---|
APP_CORS_ENABLED | true | Enable CORS |
APP_CORS_ALLOWED_ORIGINS | * | Allowed origins |
APP_CORS_ALLOW_CREDENTIALS | false | Allow credentials |
| Variable | Default | Description |
|---|---|---|
APP_RATE_LIMITING_ENABLED | true | Enable rate limiting |
APP_RATE_LIMITING_USE_REDIS | false | Distributed limiting |
APP_RATE_LIMITING_REQUESTS_PER_MINUTE | 1000 | Request limit |
| Variable | Default | Description |
|---|---|---|
APP_CACHING_ENABLED | false | Enable caching |
APP_CACHING_TTL_SECONDS | 300 | Cache TTL |
| Variable | Default | Description |
|---|---|---|
APP_TLS_ENABLED | false | Enable HTTPS |
APP_TLS_PORT | 8443 | HTTPS port |
APP_TLS_CERT_PATH | - | Certificate path |
APP_TLS_KEY_PATH | - | Private key path |
| Variable | Default | Description |
|---|---|---|
APP_REDIS_URL | - | Redis URL |
| Variable | Default | Description |
|---|---|---|
APP_CIRCUIT_BREAKER_FAILURE_THRESHOLD | 5 | Failures before open |
APP_CIRCUIT_BREAKER_TIMEOUT_SECONDS | 60 | Recovery timeout |
# config/default.yaml
server:
host: 0.0.0.0
port: 8000
sync:
control_plane_url: http://control-plane:8080
sync_interval: 10
logging:
level: info
format: json
telemetry:
enabled: true
otlp_endpoint: http://jaeger:4317
cors:
enabled: true
allowed_origins: "https://myapp.com"
allow_credentials: true
rate_limiting:
enabled: true
use_redis: true
caching:
enabled: true
ttl_seconds: 300
auth:
enabled: true
jwt_algorithm: HS256
redis:
url: redis://redis:6379
circuit_breaker:
failure_threshold: 5
timeout_seconds: 60
docker run -d \
-v $(pwd)/config:/app/config:ro \
-e APP_AUTH_JWT_SECRET=your-secret \
-e APP_ENV=production \
roryfig/api-gateway-data-plane:latest
version: '3.8'
services:
control-plane:
image: roryfig/api-gateway-control-plane:latest
# ... control plane config
data-plane:
image: roryfig/api-gateway-data-plane:latest
ports:
- "8000:8000"
environment:
APP_SYNC__CONTROL_PLANE_URL: http://control-plane:8080
APP_AUTH_JWT_SECRET: ${JWT_SECRET}
APP_REDIS_URL: redis://redis:6379
APP_RATE_LIMITING_USE_REDIS: "true"
APP_CACHING_ENABLED: "true"
depends_on:
- control-plane
deploy:
replicas: 3
curl http://localhost:8000/health
Content type
Helm
Digest
sha256:42286c424…
Size
5.8 kB
Last updated
7 months ago
helm pull oci://registry-1.docker.io/roryfig/api-gateway-data-plane --version 0.0.0-main.99fec92b