Skip to main content

Server configuration

[server]​

The data-plane listener that serves the NGSI-LD API, and its HTTP/3 sibling.
[server]
host = "0.0.0.0"
port = 1056
transport = "plaintext"
# public_url = "https://broker.example.org/"
graceful_drain_timeout = "30s"
announced_close_timeout = "1s"
request_head_timeout = "30s"
idle_timeout = "3m"

server.host​

stringrestart to apply

The address the API listens on. The --host command-line flag overrides it.

Default
"0.0.0.0"
Environment variable
ANDROMEDA__SERVER__HOST

server.port​

positive integerrestart to apply

The TCP port the API listens on. The --port command-line flag overrides it.

Default
1056
Must be
0 < port
Also required
Environment variable
ANDROMEDA__SERVER__PORT

server.transport​

stringrestart to apply

Whether the API listener serves plaintext or terminates TLS with the [tls] certificate. One port speaks one or the other, never both.

Default
"plaintext"
Allowed values
"plaintext"Serves plaintext HTTP/1.1 and HTTP/2, for a deployment behind a reverse proxy or load balancer that terminates TLS. NGSI-LD calls plaintext HTTP not recommended.
"tls"Terminates TLS in the broker with the [tls] certificate and serves HTTP/1.1 and HTTP/2 over it.
Environment variable
ANDROMEDA__SERVER__TRANSPORT

server.public_url​

URLrestart to apply

The address clients and peers reach the API at, path prefix included, such as https://broker.example.org/context-broker. Every absolute URL the broker hands out is built on it, including stored @context URLs, and forwarded subscriptions name it as the endpoint their notifications come back to. Left out, URLs are built on the origin each request reveals, with no prefix, and subscriptions are not forwarded to context sources.

Default
Not set. Example: "https://broker.example.org/"
Environment variable
ANDROMEDA__SERVER__PUBLIC_URL

server.graceful_drain_timeout​

durationrestart to apply

How long open connections get to finish their requests once shutdown begins. Connections still open after it are closed. The whole stop takes at most this plus notifications.evaluation.drain_timeout from the stop signal, 60 seconds by default, however many tenants are loaded: the tenants and the background tasks share what the connections leave, and whatever still runs then is abandoned and logged. Give the broker the two together plus 10 seconds to stop before your orchestrator kills it; Docker and Podman wait only 10 seconds unless told otherwise.

Default
"30s"
Environment variable
ANDROMEDA__SERVER__GRACEFUL_DRAIN_TIMEOUT

server.announced_close_timeout​

non-zero durationrestart to apply

How long an HTTP/1.1 connection stays open, unread, after a response that announced Connection: close, so the client reads the response before the connection goes. Such a response refuses an upload the broker did not read.

Default
"1s"
Must be
0 < announced_close_timeout < server.graceful_drain_timeout
Environment variable
ANDROMEDA__SERVER__ANNOUNCED_CLOSE_TIMEOUT

server.request_head_timeout​

non-zero durationrestart to apply

How long a connection to the API or management listener gets to send a complete request head, counted from when it opens until its first request, and over HTTP/1.1 from the first byte of each later request. When part of an HTTP/1.1 head has arrived, the broker answers 408 Request Timeout before it closes the connection; otherwise it closes the connection without an answer. A new HTTP/2 connection gets the same time to open its first request.

Default
"30s"
Must be
0 < request_head_timeout
Environment variable
ANDROMEDA__SERVER__REQUEST_HEAD_TIMEOUT

server.idle_timeout​

non-zero durationrestart to apply

How long a connection to the API or management listener may stay open with no request in flight before the broker closes it. An HTTP/2 connection is sent a GOAWAY first. Keep it above how long a reverse proxy in front keeps idle upstream connections, commonly 60 to 120 seconds, so the proxy closes an idle connection first and never sends a request on one the broker is closing.

Default
"3m"
Must be
0 < idle_timeout
Environment variable
ANDROMEDA__SERVER__IDLE_TIMEOUT

[server.http3]​

The optional HTTP/3 listener on the same host and port as the API.
[server.http3]
mode = "disabled"
advertisement_lifetime = "1day"

server.http3.mode​

stringrestart to apply

Whether HTTP/3 is served beside the TCP listener. HTTP/3 has no plaintext form, so enabling it needs tls.certificate and tls.private_key whatever server.transport says.

Default
"disabled"
Allowed values
"disabled"Binds no QUIC endpoint and advertises no HTTP/3.
"enabled"Serves HTTP/3 over UDP on the same host and port as the API, with the [tls] certificate, and advertises it in an Alt-Svc header.
Environment variable
ANDROMEDA__SERVER__HTTP3__MODE

server.http3.advertisement_lifetime​

durationrestart to apply

How long a client may remember the Alt-Svc header that announces HTTP/3, sent as its ma parameter.

Default
"1day"
Environment variable
ANDROMEDA__SERVER__HTTP3__ADVERTISEMENT_LIFETIME