API gateway for the NETGRIF Application Engine: HTTP/gRPC routing, nodes, Redis.
277
API gateway for the NETGRIF Application Engine (NAE). It routes HTTP and gRPC traffic to engine instances, keeps track of nodes and the processes they host, and centralizes routing rules, authentication and observability for a NETGRIF deployment.
routes.json): path, methods, order, target URI, headers and body
predicates./api/workflow, /api/task, /api/petrinet, /api/uri, ...)./manage for health, metrics, Prometheus, loggers, logs, beans, env and more./opt/netgrif/gateway/modules.10001), SIGTERM shutdown.A Redis instance and a reachable NETGRIF admin node are required. The REST port advertised to the admin node
(NETGRIF_GATEWAY_NODE_REST_PORT) must be reachable from the admin, so map the container's HTTP port accordingly.
docker run -d --name netgrif-gateway \
-p 8800:8080 \
-p 9900:9900 \
-e NETGRIF_GATEWAY_NODE_HOST=gateway.example.com \
-e NETGRIF_GATEWAY_NODE_REST_PORT=8800 \
-e NETGRIF_GATEWAY_DATA_REDIS_HOST=redis \
-e NETGRIF_GATEWAY_NODE_ADMIN_NODE_GRPC_HOST=admin \
-e NETGRIF_GATEWAY_NODE_ADMIN_NODE_HTTP_HOST=admin \
netgrif/netgrif-gateway:latest
| Port | Protocol | Purpose |
|---|---|---|
| 8080 | HTTP | Gateway REST API (Spring Boot server) |
| 9900 | gRPC | Gateway gRPC server |
| 8800 | HTTP | Default REST port advertised to the admin node |
All settings use Spring Boot relaxed binding. The most common environment variables:
| Variable | Default | Description |
|---|---|---|
NETGRIF_GATEWAY_NODE_NAME | Netgrif Gateway | Node name shown in the admin |
NETGRIF_GATEWAY_NODE_ZONE | default | Zone used by routing |
NETGRIF_GATEWAY_NODE_PROTOCOL | http | Protocol advertised for this node |
NETGRIF_GATEWAY_NODE_HOST | localhost | Hostname/IP advertised to the admin node |
NETGRIF_GATEWAY_NODE_REST_PORT | 8800 | REST port advertised to the admin node |
NETGRIF_GATEWAY_NODE_GRPC_PORT | 9900 | gRPC server port |
NETGRIF_GATEWAY_NODE_ADMIN_NODE_GRPC_HOST | localhost | Admin node gRPC host |
NETGRIF_GATEWAY_NODE_ADMIN_NODE_GRPC_PORT | 9999 | Admin node gRPC port |
NETGRIF_GATEWAY_NODE_ADMIN_NODE_HTTP_HOST | localhost | Admin node HTTP host |
NETGRIF_GATEWAY_NODE_ADMIN_NODE_HTTP_PORT | 8888 | Admin node HTTP port |
NETGRIF_GATEWAY_DATA_REDIS_HOST | localhost | Redis host |
NETGRIF_GATEWAY_DATA_REDIS_PORT | 6379 | Redis port |
NETGRIF_GATEWAY_DATA_REDIS_USERNAME | — | Redis username |
NETGRIF_GATEWAY_DATA_REDIS_PASSWORD | — | Redis password |
NETGRIF_GATEWAY_DATA_REDIS_SSL | false | Use TLS for Redis |
NETGRIF_GATEWAY_DATA_REDIS_SESSION_NAMESPACE | netgrif | Redis session namespace |
NETGRIF_GATEWAY_ROUTING_ROUTES_FILE | routes.json | Path to the routing rules file |
NETGRIF_GATEWAY_ROUTING_MAX_REQUEST_BODY_SIZE | 50MB | Max buffered request body |
SPRING_PROFILES_ACTIVE | — | private, public, admin |
OTEL_SDK_DISABLED | true | Enable OpenTelemetry export |
OTEL_EXPORTER | http://localhost:4317 | OTLP collector endpoint |
Redis Sentinel: NETGRIF_GATEWAY_DATA_REDIS_SENTINEL_MASTER and NETGRIF_GATEWAY_DATA_REDIS_SENTINEL_NODES
(host:port,host:port).
| Path | Purpose |
|---|---|
/opt/netgrif/gateway/modules | Plugin/module JARs (modules/libs for libraries) |
/opt/netgrif/gateway/storage | Local persistent storage |
/opt/netgrif/gateway/log | Log files (gateway.log) |
GET /manage/health/liveness, GET /manage/health/readinessGET /manage/healthGET /manage/metriccurl -fsS http://localhost:8800/manage/health
NETGRIF Community License 2.0: free for development, testing, evaluation, education, and other non-production use. Production use requires a commercial license from NETGRIF, s.r.o. See netgrif.com/license.
docker pull netgrif/gateway:1.1.1