Deployment

This page puts a gateway and its services into production: install, run as a service or in a container, Compose, health and metrics, and a hardening checklist.

Choose the gateway form

FormInstallWhen
The .NET tool stellaops-router-gatewaydotnet tool installConfiguration only; every transport built in
Your own host on StellaOps.Router.Gateway.HostingYour build and release processCustom middleware, a fixed transport set, a container image of your own

Both need the .NET 10 runtime with ASP.NET Core on the machine, or the .NET 10 ASP.NET Core container image.

Install the tool

With the feed configured (Installing Stella Ops packages):

dotnet tool install StellaOps.Router.Gateway.Host --version <x.y.z-yyyyMMddTHHmmssZ> \
  --tool-path /opt/router/tools

Install an exact version on servers, and upgrade on purpose (Upgrading). The tool package carries the gateway and every assembly it runs, with the licence texts of the third-party assemblies it embeds in third-party-licenses/.

Run on Linux with systemd

The tool runs in the foreground and stops on SIGTERM. The working directory holds appsettings.json and, for TLS, the certificate files:

[Unit]
Description=Router gateway
After=network-online.target
Wants=network-online.target

[Service]
Type=simple
User=router-gateway
WorkingDirectory=/etc/router-gateway
ExecStart=/opt/router/tools/stellaops-router-gateway --urls http://0.0.0.0:8080
Environment=DOTNET_ROOT=/usr/lib/dotnet
Environment=ASPNETCORE_ENVIRONMENT=Production
Restart=on-failure
RestartSec=5
TimeoutStopSec=30

[Install]
WantedBy=multi-user.target

Run each service the same way, with a TimeoutStopSec above its DrainDeadline so that requests in flight can finish on a restart.

Run on Windows

The tool does not register with the Windows Service Control Manager. Either run it under a service wrapper that starts a console process, or build your own host, add the package Microsoft.Extensions.Hosting.WindowsServices, call builder.Host.UseWindowsService(), and register the executable with sc.exe create.

Run in a container

Build an image from your own host (the tool’s dependencies are inside its package, so a host project is the simpler image). The host must reference the server package of every transport it offers. For a gateway that offers TLS, the project references StellaOps.Router.Gateway.Hosting and StellaOps.Router.Transport.Tls.Server, and Program.cs passes the TLS server assembly (Router gateway host):

// A gateway that offers TLS only: pass the server assembly of each transport it offers.
var builder = WebApplication.CreateBuilder(args);
builder.AddRouterGatewayHost(typeof(TlsTransportServerPlugin).Assembly);

var app = builder.Build();
app.UseRouterGatewayHost();

The Dockerfile of the sample gateway, the project of Getting started. It is built and run before each release:

# The sample gateway as a container image. Build it from the samples root, the folder that holds
# nuget.config and Directory.Build.props:
#   docker build -f src/Examples.Gateway/Dockerfile -t router-sample-gateway .
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
# The Router release to restore from the Stella Ops feed: one version for every Router package.
ARG ROUTER_PACKAGE_VERSION=1.0.1-20261117T070237Z
WORKDIR /src
COPY nuget.config Directory.Build.props Directory.Build.targets ./
COPY src/Examples.Gateway/Examples.Gateway.csproj src/Examples.Gateway/
RUN dotnet restore src/Examples.Gateway/Examples.Gateway.csproj \
      -p:RouterPackageVersion=$ROUTER_PACKAGE_VERSION
COPY src/Examples.Gateway/ src/Examples.Gateway/
RUN dotnet publish src/Examples.Gateway/Examples.Gateway.csproj -c Release --no-restore -o /app \
      -p:RouterPackageVersion=$ROUTER_PACKAGE_VERSION -p:UseAppHost=false

FROM mcr.microsoft.com/dotnet/aspnet:10.0
WORKDIR /app
COPY --from=build /app .
# The non-root user of the .NET images (UID 1654). The image holds no configuration, certificate or key.
USER app
# HTTP for callers; the transport ports the services connect to: TCP 9100, TLS 9443.
ENV ASPNETCORE_HTTP_PORTS=8080
EXPOSE 8080 9100 9443
# Healthy when /health/ready answers 200: the gateway serves, and every service named in
# Gateway:Health:RequiredMicroservices is connected. The image has no HTTP client (curl, wget): bash sends the request.
HEALTHCHECK --interval=10s --timeout=5s --start-period=30s --retries=3 \
  CMD ["bash", "-c", "exec 3<>/dev/tcp/127.0.0.1/8080 && printf 'GET /health/ready HTTP/1.1\\r\\nHost: localhost\\r\\nConnection: close\\r\\n\\r\\n' >&3 && read -r status <&3 && [[ $status == *' 200 '* ]]"]
ENTRYPOINT ["dotnet", "Examples.Gateway.dll"]
  • Build context. The folder that holds nuget.config, which takes StellaOps.* from the Stella Ops feed (Installing Stella Ops packages), and the projects under src/. The samples’ Directory.Build.props sets the target framework and the version property RouterPackageVersion; for a project that writes the target framework and the versions in its project file, leave Directory.Build.props and Directory.Build.targets out of the first COPY. A .dockerignore keeps build output and certificates out of the context:

    # The images build from the samples root. Keep build output and certificates out of the build context.
    **/bin/
    **/obj/
    tls/
    
  • Version. The build argument ROUTER_PACKAGE_VERSION pins one Router release for every Router package. Build another with --build-arg ROUTER_PACKAGE_VERSION=<x.y.z-yyyyMMddTHHmmssZ>.

  • Without a network. Map StellaOps.* to the packages/ folder of the offline archive (Use the archive as a local feed), copy the folder into the build context, and take the other packages from a mirror your organisation approves.

  • User. The image runs as app, the non-root user of the .NET images (UID 1654).

  • Ports. 8080 for callers over HTTP; 9100 (TCP) and 9443 (TLS) for the services.

  • Health. The HEALTHCHECK asks /health/ready. The .NET images have no curl or wget, so bash sends the request.

  • TLS by configuration. The sample’s Program.cs passes only the TCP assembly, and its project also references StellaOps.Router.Transport.Tls.Server. Naming that assembly in Gateway:TransportPlugins:ImageResidentAssemblies loads the TLS transport without a code change (Run with Compose).

The image holds no configuration, certificate or key. Pass them when the container starts, as environment variables and mounted files; Run with Compose has a complete set.

  • Inside a container, the transport listens on 0.0.0.0 so that the published port reaches it. Publish the transport port (9443 for TLS) only on the network the services use, never to callers.
  • Mount certificates and keys from your platform’s secret store; never build them into the image. A .pfx file needs Gateway__Transports__Tls__ServerCertificatePassword, passed from the secret store as well.
  • Each side accepts the other’s certificate only when it chains to a certificate authority the container trusts (Transports). For a certificate authority of your own, set SSL_CERT_FILE to its certificate: the .NET runtime of the Linux images then trusts it, and still trusts the system certificates in /etc/ssl/certs.
  • Authenticate callers with your OpenID Connect provider: Authentication__Schemes__Bearer__Authority, __ValidIssuer and __ValidAudience (Router gateway host).
  • TCP and UDP are for development only: they need STELLAOPS_ROUTER_ALLOW_INSECURE_TRANSPORTS=true and carry requests unencrypted.
  • Deploy images by digest, not by tag.

Run a service in a container

A service needs the .NET runtime image, not the ASP.NET Core one, and it opens no port: it connects out to the gateway. The Dockerfile of the sample billing service:

# The sample billing service as a container image. Build it from the samples root, the folder that
# holds nuget.config and Directory.Build.props:
#   docker build -f src/Examples.Billing.Microservice/Dockerfile -t router-sample-billing .
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
# The Router release to restore from the Stella Ops feed: one version for every Router package.
ARG ROUTER_PACKAGE_VERSION=1.0.1-20261117T070237Z
WORKDIR /src
COPY nuget.config Directory.Build.props Directory.Build.targets ./
COPY src/Examples.Billing.Microservice/Examples.Billing.Microservice.csproj src/Examples.Billing.Microservice/
RUN dotnet restore src/Examples.Billing.Microservice/Examples.Billing.Microservice.csproj \
      -p:RouterPackageVersion=$ROUTER_PACKAGE_VERSION
COPY src/Examples.Billing.Microservice/ src/Examples.Billing.Microservice/
RUN dotnet publish src/Examples.Billing.Microservice/Examples.Billing.Microservice.csproj -c Release --no-restore \
      -o /app -p:RouterPackageVersion=$ROUTER_PACKAGE_VERSION -p:UseAppHost=false

# A service on the generic host needs the .NET runtime, not ASP.NET Core.
FROM mcr.microsoft.com/dotnet/runtime:10.0
WORKDIR /app
COPY --from=build /app .
# The non-root user of the .NET images (UID 1654). The image holds no configuration, certificate or key.
USER app
# No EXPOSE: the service opens no port. It connects out to the gateway's transport port.
ENTRYPOINT ["dotnet", "Examples.Billing.Microservice.dll"]

In production the service connects over TLS with a client certificate. The sample services choose the transport from configuration: without a Router:Transport:Tls section they register the TCP client (Getting started); with it, the TLS client, with the options bound from the section:

// Production: TLS, with the client certificate and the other TLS options from Router:Transport:Tls.
if (tls.Exists())
{
    builder.Services.AddTlsTransportClient(options =>
    {
        tls.Bind(options);
        options.Host = gatewayHost;
        options.Port = gatewayPort;
    });
}

Give the container these settings, and mount its certificate and key read-only from the secret store:

SettingValue
Router__Host, Router__PortThe gateway’s host name, which its certificate must carry, and its TLS port (9443)
Router__Transport__Tls__ClientCertificatePathThe client certificate: a .pfx or .p12 file, or a .pem, .crt or .cer file
Router__Transport__Tls__ClientCertificateKeyPathThe private key file of a PEM client certificate
Router__Transport__Tls__ClientCertificatePasswordThe password of a .pfx or .p12 file, from the secret store
SSL_CERT_FILEThe certificate of a private certificate authority that issued the gateway’s certificate
Router__InstanceIdA stable name per instance (Microservice SDK)

Stopping. On SIGTERM the service reports Draining to the gateway, waits up to its DrainDeadline (25 seconds by default) for the requests in flight, and exits with code 0. Docker kills a container 10 seconds after SIGTERM unless it is given longer, so give every service a stop period above its DrainDeadline: stop_grace_period in Compose (35s in the samples), --stop-timeout for docker run, TimeoutStopSec for systemd. Otherwise requests in flight are cut off on every restart.

Run with Compose

The samples’ compose.yaml runs the gateway and the billing service of Getting started, and a second service, inventory, from the Dockerfiles above. It sits in the folder that holds nuget.config and the projects under src/. With only the two projects of Getting started, remove the inventory service and the line Gateway__Health__RequiredMicroservices__1; for a service of your own, add an entry like billing.

Run it from that folder, with the .NET 10 SDK and Docker:

  1. Create the tokens, and export the key that signs them, with dotnet user-jwts (Getting started, Step 2):

    TOKEN=$(dotnet user-jwts create --project src/Examples.Gateway --audience router-gateway \
      --scope invoices:write --scope invoices:read --scope router:routing:read --output token)
    export ROUTER_JWT_SIGNING_KEY=$(dotnet user-jwts key --project src/Examples.Gateway \
      | sed -n "s/^Signing Key: '\(.*\)'$/\1/p")
    
  2. Build the images and start the containers:

    docker compose up --build --wait
    

    Expected result: the command returns once the gateway is healthy, that is, once both services are connected.

  3. Call both services through the gateway:

    curl -i http://localhost:8080/invoices/INV-001 -H "Authorization: Bearer $TOKEN"
    curl -i http://localhost:8080/items -H "Authorization: Bearer $TOKEN"
    

    Expected result: 200 and an invoice, then 200 and a list of items.

  4. Stop and remove the containers: docker compose down.

compose.yaml:

# The sample gateway and two services on a private network. From the samples root:
#
#   ROUTER_JWT_SIGNING_KEY=<base64 signing key> docker compose up --build --wait
#
# SAMPLE ONLY: the gateway and the services talk TCP, which is unencrypted and needs
# STELLAOPS_ROUTER_ALLOW_INSECURE_TRANSPORTS=true on both ends. Add compose.tls.yaml for TLS with client
# certificates, the production form.
name: router-samples

x-build-args: &build-args
  # The Router release the images restore from the Stella Ops feed.
  ROUTER_PACKAGE_VERSION: ${ROUTER_PACKAGE_VERSION:-1.0.1-20261117T070237Z}

services:
  gateway:
    build:
      context: .
      dockerfile: src/Examples.Gateway/Dockerfile
      args: *build-args
    environment:
      ASPNETCORE_ENVIRONMENT: Production
      # SAMPLE ONLY: the TCP transport.
      STELLAOPS_ROUTER_ALLOW_INSECURE_TRANSPORTS: "true"
      # In a container the transport listens on every address of the container.
      Gateway__Transports__Tcp__BindAddress: 0.0.0.0
      # /health/ready answers 200 only while both services are connected.
      Gateway__Health__RequiredMicroservices__0: billing
      Gateway__Health__RequiredMicroservices__1: inventory
      # Callers' tokens, checked with a symmetric signing key as dotnet user-jwts issues them. In
      # production, set Authentication__Schemes__Bearer__Authority to your OpenID Connect provider instead.
      Authentication__Schemes__Bearer__ValidIssuer: ${ROUTER_JWT_ISSUER:-dotnet-user-jwts}
      Authentication__Schemes__Bearer__ValidAudiences__0: router-gateway
      Authentication__Schemes__Bearer__SigningKeys__0__Issuer: ${ROUTER_JWT_ISSUER:-dotnet-user-jwts}
      Authentication__Schemes__Bearer__SigningKeys__0__Value: ${ROUTER_JWT_SIGNING_KEY:?set ROUTER_JWT_SIGNING_KEY to the base64 signing key of the tokens}
    ports:
      # The gateway's HTTP port is the only published port, on the loopback address of the host.
      - "127.0.0.1:${ROUTER_GATEWAY_PORT:-8080}:8080"
    networks: [edge, router]
    healthcheck:
      # The image's check of /health/ready, more often, with time for the services to connect.
      interval: 5s
      start_period: 60s

  billing:
    build:
      context: .
      dockerfile: src/Examples.Billing.Microservice/Dockerfile
      args: *build-args
    environment:
      DOTNET_ENVIRONMENT: Production
      # SAMPLE ONLY: the TCP transport.
      STELLAOPS_ROUTER_ALLOW_INSECURE_TRANSPORTS: "true"
      Router__Host: gateway
      Router__Port: 9100
      Router__InstanceId: billing-01
    networks: [router]
    # Started after the gateway, not after it is healthy: the gateway is ready only once the services are
    # connected. A service connects again on its own until the gateway answers.
    depends_on:
      gateway:
        condition: service_started
    # Longer than DrainDeadline (25 seconds by default), so requests in flight finish on a stop.
    stop_grace_period: 35s

  inventory:
    build:
      context: .
      dockerfile: src/Examples.Inventory.Microservice/Dockerfile
      args: *build-args
    environment:
      DOTNET_ENVIRONMENT: Production
      # SAMPLE ONLY: the TCP transport.
      STELLAOPS_ROUTER_ALLOW_INSECURE_TRANSPORTS: "true"
      Router__Host: gateway
      Router__Port: 9100
      Router__InstanceId: inventory-01
    networks: [router]
    depends_on:
      gateway:
        condition: service_started
    stop_grace_period: 35s

networks:
  # The network of the published HTTP port.
  edge: {}
  # The gateway and the services only, with no route out of the host.
  router:
    internal: true

Sample only, and replaced in production:

  • TCP between the gateway and the services, with STELLAOPS_ROUTER_ALLOW_INSECURE_TRANSPORTS; production uses TLS (below).
  • The token signing key in an environment variable; production sets Authentication__Schemes__Bearer__Authority to its OpenID Connect provider.
  • Building on start (--build); production deploys built images by digest.

Production form already:

  • The services are on a network with no route out of the host (internal: true), shared only with the gateway; the gateway’s HTTP port is the only published port.
  • The gateway’s health check is its readiness, which waits for the services in Gateway:Health:RequiredMicroservices. The services therefore start after the gateway has started, not after it is healthy.
  • Each service has a stop grace period above its DrainDeadline.

TLS with client certificates

compose.tls.yaml turns TCP off and TLS on, with a client certificate for each service. It needs a certificate authority and the certificates it issued. For a test, create throwaway ones:

sh create-test-certificates.sh
docker compose -f compose.yaml -f compose.tls.yaml up --build --wait

Without openssl on the machine, run the script in the .NET SDK image:

docker run --rm --user "$(id -u):$(id -g)" -v "$PWD:/samples" -w /samples \
  mcr.microsoft.com/dotnet/sdk:10.0 sh create-test-certificates.sh

The calls of step 3 then reach the services over TLS. compose.tls.yaml:

# The production form of the transport: TLS with client certificates (mTLS) in place of TCP. From the
# samples root:
#
#   sh create-test-certificates.sh
#   ROUTER_JWT_SIGNING_KEY=<base64 signing key> docker compose -f compose.yaml -f compose.tls.yaml up --build --wait
#
# The directory ROUTER_TLS_DIR (default ./tls) holds ca.crt, the certificate authority that issued the
# certificates, and the certificate and key of the gateway and of each service; create-test-certificates.sh
# writes throwaway ones. Each container gets its own files only, read-only under /run/secrets. Never build
# certificates or keys into an image.
services:
  gateway:
    environment:
      STELLAOPS_ROUTER_ALLOW_INSECURE_TRANSPORTS: "false"
      Gateway__Transports__Tcp__Enabled: "false"
      # The TLS server transport: its assembly is in the image, and this setting loads it.
      Gateway__TransportPlugins__ImageResidentAssemblies__0: StellaOps.Router.Transport.Tls.Server
      Gateway__Transports__Tls__Enabled: "true"
      Gateway__Transports__Tls__BindAddress: 0.0.0.0
      Gateway__Transports__Tls__Port: 9443
      # The certificate names the host the services connect to (DNS name "gateway").
      Gateway__Transports__Tls__ServerCertificatePath: /run/secrets/gateway.crt
      Gateway__Transports__Tls__ServerCertificateKeyPath: /run/secrets/gateway.key
      # A service without a client certificate from a trusted authority cannot connect.
      Gateway__Transports__Tls__RequireClientCertificate: "true"
      # Trust the certificate authority, beside the system certificates in /etc/ssl/certs.
      SSL_CERT_FILE: /run/secrets/router-ca.crt
    secrets:
      - { source: router-ca, target: router-ca.crt }
      - { source: gateway-certificate, target: gateway.crt }
      - { source: gateway-key, target: gateway.key }

  billing:
    environment:
      STELLAOPS_ROUTER_ALLOW_INSECURE_TRANSPORTS: "false"
      Router__Port: 9443
      # A Router:Transport:Tls section switches the service to TLS (Program.cs).
      Router__Transport__Tls__ClientCertificatePath: /run/secrets/billing.crt
      Router__Transport__Tls__ClientCertificateKeyPath: /run/secrets/billing.key
      SSL_CERT_FILE: /run/secrets/router-ca.crt
    secrets:
      - { source: router-ca, target: router-ca.crt }
      - { source: billing-certificate, target: billing.crt }
      - { source: billing-key, target: billing.key }

  inventory:
    environment:
      STELLAOPS_ROUTER_ALLOW_INSECURE_TRANSPORTS: "false"
      Router__Port: 9443
      Router__Transport__Tls__ClientCertificatePath: /run/secrets/inventory.crt
      Router__Transport__Tls__ClientCertificateKeyPath: /run/secrets/inventory.key
      SSL_CERT_FILE: /run/secrets/router-ca.crt
    secrets:
      - { source: router-ca, target: router-ca.crt }
      - { source: inventory-certificate, target: inventory.crt }
      - { source: inventory-key, target: inventory.key }

secrets:
  router-ca:
    file: ${ROUTER_TLS_DIR:-./tls}/ca.crt
  gateway-certificate:
    file: ${ROUTER_TLS_DIR:-./tls}/gateway.crt
  gateway-key:
    file: ${ROUTER_TLS_DIR:-./tls}/gateway.key
  billing-certificate:
    file: ${ROUTER_TLS_DIR:-./tls}/billing.crt
  billing-key:
    file: ${ROUTER_TLS_DIR:-./tls}/billing.key
  inventory-certificate:
    file: ${ROUTER_TLS_DIR:-./tls}/inventory.crt
  inventory-key:
    file: ${ROUTER_TLS_DIR:-./tls}/inventory.key
  • The gateway loads the TLS server transport from its image by configuration, and requires a client certificate: a service without one is refused (certificate_required_but_missing in the gateway’s log).
  • Each container receives its own certificate and key, and the certificate authority, as Compose secrets, read-only under /run/secrets; no container sees another’s key.
  • SSL_CERT_FILE makes each side trust the certificate authority. A service that does not trust it refuses the gateway (chain_error_and_self_signed_disallowed in the service’s log).
  • The services connect to the host name gateway, the DNS name in the gateway’s certificate.

create-test-certificates.sh writes a certificate authority, the gateway’s server certificate and a client certificate per service, valid for 30 days, and deletes the authority’s key. The keys are readable by every user, because the containers run as UID 1654; give production keys to that user alone.

#!/bin/sh
# Throwaway certificates for trying compose.tls.yaml: a test certificate authority, the gateway's server
# certificate for the DNS name "gateway", and a client certificate for each service. For tests only: in
# production the certificates come from your own certificate authority.
#
#   sh create-test-certificates.sh [directory]        (default ./tls; needs openssl)
#
# Without openssl, run it in the .NET SDK image:
#   docker run --rm -v "$PWD:/samples" -w /samples mcr.microsoft.com/dotnet/sdk:10.0 sh create-test-certificates.sh
set -eu
dir=${1:-tls}
days=30
mkdir -p "$dir"
cd "$dir"

# The certificate authority. Its key signs the other certificates and is deleted at the end.
printf '%s\n' '[req]' 'distinguished_name = dn' 'prompt = no' 'x509_extensions = ext' \
  '[dn]' 'CN = Router sample test CA' \
  '[ext]' 'basicConstraints = critical, CA:TRUE' 'keyUsage = critical, keyCertSign, cRLSign' \
  'subjectKeyIdentifier = hash' > ca.cnf
openssl req -x509 -config ca.cnf -newkey ec -pkeyopt ec_paramgen_curve:prime256v1 -nodes \
  -keyout ca.key -out ca.crt -days "$days" 2>/dev/null

# issue <name> <extended key usage> [subject alternative name]
issue() {
  printf '%s\n' '[req]' 'distinguished_name = dn' 'prompt = no' '[dn]' "CN = $1" > "$1.cnf"
  printf '%s\n' 'basicConstraints = critical, CA:FALSE' 'keyUsage = critical, digitalSignature' \
    "extendedKeyUsage = $2" 'authorityKeyIdentifier = keyid' > "$1.ext"
  if [ -n "${3:-}" ]; then
    printf 'subjectAltName = %s\n' "$3" >> "$1.ext"
  fi
  openssl req -new -config "$1.cnf" -newkey ec -pkeyopt ec_paramgen_curve:prime256v1 -nodes \
    -keyout "$1.key" -out "$1.csr" 2>/dev/null
  openssl x509 -req -in "$1.csr" -CA ca.crt -CAkey ca.key -set_serial "0x$(openssl rand -hex 16)" \
    -days "$days" -sha256 -extfile "$1.ext" -out "$1.crt" 2>/dev/null
  rm -f "$1.cnf" "$1.ext" "$1.csr"
}
issue gateway serverAuth DNS:gateway
issue billing clientAuth
issue inventory clientAuth
rm -f ca.cnf ca.key

# The containers run as UID 1654, which must be able to read the files. That is acceptable for throwaway
# keys only: give production keys to that user alone.
chmod 644 ./*.crt ./*.key
echo "Test certificates in $dir: ca.crt, gateway, billing and inventory (.crt and .key), valid $days days."

Health

PathUse it forAnswers
/health/liveLiveness probe200 while the process runs
/health/readyReadiness probe, load balancer health200 when the gateway can serve; 503 until every service in Gateway:Health:RequiredMicroservices is connected
/health/startupStartup probe200 once started
/healthOperatorsThe overall state, with the informational licence object

Set Gateway:Health:RequiredMicroservices to the services without which the gateway should not take traffic.

Metrics

/metrics serves Prometheus metrics: request counts and latencies, connected instances, routing weights and the licence Endpoint gauge (stellaops_router_licence_endpoints). Scrape it from an internal network; it needs no token.

The TLS transport counts rejected certificates in the instrument router_tls_validate_rejected_total of the .NET meter StellaOps.Router.Transport.Tls, which /metrics does not include. Collect it with an OpenTelemetry metrics exporter or another meter listener in your host.

Logs

The gateway and the services log through Microsoft.Extensions.Logging. Useful lines:

LineMeaning
Connection registered: ... service=<name> ... with <n> endpointsA service instance connected.
Instance <id> ... marked Degraded / marked UnhealthyHeartbeats are late or missing.
Request <id> to <service> timed out after <timeout>The gateway answered 504.
Router licence linesThe licence monitor’s status.

Hardening checklist

Apply the security checklist, and:

  • [ ] An exact tool or package version, upgraded on purpose.
  • [ ] The gateway runs as a dedicated, unprivileged user.
  • [ ] ASPNETCORE_ENVIRONMENT=Production; no appsettings.Development.json on servers.
  • [ ] Readiness probes use /health/ready, with RequiredMicroservices set.
  • [ ] Each service’s stop timeout is above its DrainDeadline.
  • [ ] Containers run as a non-root user, and receive certificates and keys read-only from the secret store, each container only its own.
  • [ ] Gateway:Transports:<Name>:Port is set explicitly for every enabled transport.
  • [ ] Logs and metrics are collected centrally.