Learn how to deploy and start the Router in Production.
wgc router token create
CLI command.
/health
. The health check reports if the router is alive.
/health/live
and /health/ready
:
200
when the router is up. The readiness handler returns 200
only when the router is ready to serve requests.
GRACE_PERIOD_SECONDS=20
SHUTDOWN_DELAY_SECONDS=30
Pod
terminationGracePeriodSeconds=60
200
and the container is inTERMINATION
state any new traffic from being redirected to the instance is prevented.
GRACE_PERIOD_SECONDS
becomes interesting when the router updates its schema. This is also the time the server has to gracefully shut down old clients before the switch is enforced.
0.0.0.0
e.g LISTEN_ADDR=0.0.0.0:3002.
This is also required when trying to access Prometheus metrics from outside the docker network. Use PROMETHEUS_LISTEN_ADDR="0.0.0.0:8088"
to make the endpoint accessible.
JSON_LOG
environment variable. For development, we recommend setting this off because the logs are more friendly rendered.
DEV_MODE=true
or GRAPH_API_TOKEN
. In the latter case, we will exchange a public key from the control plane to ensure that only authorized requests from the Studio can access ART requests. This enables safe debugging of your router in production.
Therefore DEV_MODE=true
should NOT be set when deploying your router to production.
/config.yaml
in our official Docker image. You can overwrite the path by setting the CONFIG_PATH
environment variable.
-v
flag.
BUILDPLATFORM
, TARGETOS
, TARGETARCH
arguments, those are needed when building multi-arch images. You can remove them if you don’t need them.