Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.draskencloud.com/llms.txt

Use this file to discover all available pages before exploring further.

Concept

The gateway uses a three-level hierarchy for routing traffic to backends:
App → Version → Revision → Backend
LevelPurpose
AppTop-level service registered on the gateway
VersionPublic API version (v1, v2, 2026-01) — maps to a gateway path
RevisionConcrete backend deployment — holds the upstream URL and policy

Versions

A version represents a public-facing API version. Requests to /payments/v1/* are matched by a version with gateway_path = /payments/v1.

Create a Version

curl -X POST http://localhost:9090/api/v1/apps/{app_id}/versions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_ADMIN_TOKEN" \
  -d '{
    "version": "v1"
  }'
The gateway_path is auto-derived as <app.gateway_path>/v1. Override it explicitly:
{
  "version": "v1",
  "gateway_path": "/payments/v1"
}

Version Status

StatusBehaviour
activeAccepts traffic normally
deprecatedAccepts traffic, logs a deprecation warning
retiredReturns 410 Gone to all requests
curl -X PATCH http://localhost:9090/api/v1/apps/{app_id}/versions/{version_id} \
  -H "Content-Type: application/json" \
  -d '{"status": "deprecated"}'

Revisions

A revision holds the actual backend connection details. Multiple revisions can be active simultaneously for canary / weighted routing.

Create a Revision

curl -X POST http://localhost:9090/api/v1/apps/{app_id}/versions/{version_id}/revisions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_ADMIN_TOKEN" \
  -d '{
    "revision": "r1",
    "backend_scheme": "https",
    "backend_host": "api.internal.example.com",
    "backend_port": 443,
    "backend_base_path": "/",
    "strip_gateway_path": true,
    "traffic_weight": 100,
    "health_check_path": "/health"
  }'

Revision Fields

FieldDefaultDescription
revisionrequiredLabel (e.g. r1, canary)
backend_schemehttpshttp or https
backend_hostrequiredUpstream hostname
backend_port443Upstream port
backend_base_path/Path prefix prepended on the upstream request
strip_gateway_pathtrueStrip the version’s gateway_path before forwarding
traffic_weight100Relative weight for weighted routing
health_check_pathPath used by the circuit breaker health probe
default_policyPolicy applied to all requests through this revision

Activate a Revision

curl -X POST http://localhost:9090/api/v1/apps/{app_id}/versions/{version_id}/revisions/{revision_id}/activate \
  -H "Authorization: Bearer YOUR_ADMIN_TOKEN"

Canary / Weighted Routing

Run two revisions simultaneously with weighted traffic splitting:
# 90% to stable
curl -X PATCH .../revisions/{stable_id} -d '{"traffic_weight": 90}'

# 10% to canary
curl -X PATCH .../revisions/{canary_id} -d '{"traffic_weight": 10}'
Both must have is_current: true. The gateway distributes traffic proportionally.

Path Forwarding

With strip_gateway_path: true (default):
Request:  GET /payments/v1/invoices
Upstream: GET /invoices
With strip_gateway_path: false:
Request:  GET /payments/v1/invoices
Upstream: GET /payments/v1/invoices