Skip to main content

Federation configuration

[federation]​

Forwarding to Context Sources, and this broker's identity among them.

[federation.forwarding]​

How requests reach context sources: fan-out, timeouts and the addresses a source may resolve into.
[federation.forwarding]
max_concurrent = 16
connect_timeout = "3s"
request_timeout = "5s"
private_addresses = "allowed"
allowed_addresses = []
denied_addresses = []

federation.forwarding.max_concurrent​

positive integerrestart to apply

The most forwarded requests one operation has in flight at once.

Default
16
Must be
0 < max_concurrent
Environment variable
ANDROMEDA__FEDERATION__FORWARDING__MAX_CONCURRENT

federation.forwarding.connect_timeout​

non-zero durationrestart to apply

How long connecting to a context source may take.

Default
"3s"
Must be
0 < connect_timeout ≤ federation.forwarding.request_timeout
Environment variable
ANDROMEDA__FEDERATION__FORWARDING__CONNECT_TIMEOUT

federation.forwarding.request_timeout​

non-zero durationrestart to apply

How long a forwarded request may take before it counts as failed, connecting and reading the answer included. A registration's own management.timeout takes precedence.

Default
"5s"
Must be
0 < request_timeout < request_limits.timeout
Environment variable
ANDROMEDA__FEDERATION__FORWARDING__REQUEST_TIMEOUT

federation.forwarding.private_addresses​

stringrestart to apply

Whether a context source whose endpoint resolves into private or reserved address space is contacted. Checked against the address actually resolved, not the host name. federation.forwarding.allowed_addresses exempts addresses from "refused", and federation.forwarding.denied_addresses refuses addresses whatever this is set to. A redirect from a context source is never followed, whatever this is set to. Allowed by default because context sources commonly run beside the broker on a private network; set "refused" when clients you do not trust create registrations.

Default
"allowed"
Allowed values
"allowed"Any endpoint the broker's network reaches is contacted.
"refused"An endpoint whose resolved address is loopback, private or reserved is refused, so a client-supplied endpoint cannot aim the broker at internal hosts. The refusal is recorded as a failed request.
Environment variable
ANDROMEDA__FEDERATION__FORWARDING__PRIVATE_ADDRESSES

federation.forwarding.allowed_addresses​

list of stringrestart to apply

IP addresses and subnets ("10.8.0.0/16", "10.3.0.17", "fd00:1234::/48") that a context source may resolve into even though federation.forwarding.private_addresses is "refused". Empty by default. An entry in federation.forwarding.denied_addresses takes precedence.

Default
[]
Environment variable
ANDROMEDA__FEDERATION__FORWARDING__ALLOWED_ADDRESSES

federation.forwarding.denied_addresses​

list of stringrestart to apply

IP addresses and subnets ("203.0.113.0/24", "198.51.100.9") that a context source must not resolve into, public ones included and whatever federation.forwarding.private_addresses is set to. Empty by default. Takes precedence over federation.forwarding.allowed_addresses.

Default
[]
Environment variable
ANDROMEDA__FEDERATION__FORWARDING__DENIED_ADDRESSES

[federation.query]​

What a federated query means and how much it may gather from context sources: the splitEntities default, the result caps and how aggregated temporal reads are gathered.
[federation.query]
split_entities = "complete"
max_entities = 10000
max_source_rows = 30000
max_instances = 100000
aggregation = "overlapping-instances"

federation.query.split_entities​

stringrestart to apply

What splitEntities means when a request or subscription leaves it unset.

Default
"complete"
Allowed values
"split"A single entity may be split across context sources, so filters are applied only after its parts are re-assembled.
"complete"Every context source holds complete entities, so filters can be applied by each source.
Environment variable
ANDROMEDA__FEDERATION__QUERY__SPLIT_ENTITIES

federation.query.max_entities​

positive integerrestart to apply

The most distinct entities one federated query gathers from the local store and every context source together. An entity several sources answer counts once, and one only an auxiliary source answers counts too. A query that would gather more is refused with 403 TooManyResults rather than answered with a truncated collection.

Default
10000
Must be
0 < max_entities
Environment variable
ANDROMEDA__FEDERATION__QUERY__MAX_ENTITIES

federation.query.max_source_rows​

positive integerrestart to apply

The most entities the context sources of one federated query send together, duplicates included: an entity three sources answer counts three times, and auxiliary sources count too. A query whose sources send more is refused with 403 TooManyResults.

Default
30000
Must be
0 < federation.query.max_entities ≤ max_source_rows
Environment variable
ANDROMEDA__FEDERATION__QUERY__MAX_SOURCE_ROWS

federation.query.max_instances​

positive integerrestart to apply

The most attribute instances one federated temporal query gathers from the context sources whose history it reads to the end, as an aggregated representation of an entity held in several parts needs. A query that would gather more is refused with 403 TooManyResults.

Default
100000
Must be
0 < max_instances
Environment variable
ANDROMEDA__FEDERATION__QUERY__MAX_INSTANCES

federation.query.aggregation​

stringrestart to apply

How a distributed temporal query asking for aggregatedValues reads its context sources. An entity held by more than one part is aggregated by this broker over the instances of every part. "overlapping-instances" asks the sources for their aggregates and asks again only for the instances of the entities more than one part holds: cheapest when parts rarely overlap. "instances" asks for every instance in one round trip: faster when most entities are held by several sources, at the cost of moving and holding every instance.

Default
"overlapping-instances"
Allowed values
"instances"Ask the context sources for every instance of the queried window and aggregate every entity they answer here. One round trip, but every instance travels to and is held by this broker. Suits deployments where most entities are held by several sources.
"overlapping-instances"Ask the context sources for their aggregates, keep the aggregate of an entity only one part holds, and ask again for the instances of the entities more than one part holds. A second round trip only when parts overlap, and only their instances travel.
Environment variable
ANDROMEDA__FEDERATION__QUERY__AGGREGATION

[federation.response_cache]​

The per-tenant cache of forwarded GET responses.
[federation.response_cache]
max_entries = 1024

federation.response_cache.max_entries​

positive integerrestart to apply

The most forwarded GET /entities and GET /entities/{id} answers each tenant's cache holds, for registrations that set management.cacheDuration. An answer served from the cache carries a 110 warning.

Default
1024
Must be
0 < max_entries
Environment variable
ANDROMEDA__FEDERATION__RESPONSE_CACHE__MAX_ENTRIES

[federation.cooldown]​

How a context source is held back after a failed forwarded request.
[federation.cooldown]
mode = "disabled"
retry_interval = "1s"
max_retry_interval = "1day"

federation.cooldown.mode​

stringrestart to apply

How a source is held back after a failed forwarded request. The default, "disabled", holds back only registrations that set management.cooldown.

Default
"disabled"
Allowed values
"disabled"Only a registration's own management.cooldown holds a source back.
"constant"Every failure holds the source back for federation.cooldown.retry_interval.
"exponential"Each failure of an unbroken run of failures doubles the hold, from federation.cooldown.retry_interval up to federation.cooldown.max_retry_interval, with random jitter of up to the hold itself added.
Environment variable
ANDROMEDA__FEDERATION__COOLDOWN__MODE

[federation.identity]​

The identity the broker reports at /ngsi-ld/v1/info/sourceIdentity and uses to detect forwarding loops.
[federation.identity]
# source_id = "urn:ngsi-ld:ContextSourceIdentity:broker-a"
# source_alias = "broker-a"

federation.identity.source_id​

IRIrestart to apply

The id the broker reports at /ngsi-ld/v1/info/sourceIdentity. Must be an IRI. Left out, it is urn:ngsi-ld:ContextSourceIdentity: followed by the alias in effect, as federation.identity.source_alias describes.

Default
Not set. Example: "urn:ngsi-ld:ContextSourceIdentity:broker-a"
Environment variable
ANDROMEDA__FEDERATION__IDENTITY__SOURCE_ID

federation.identity.source_alias​

stringrestart to apply

The name the broker adds to the Via header of every request it forwards. A request whose Via already holds this name is treated as a forwarding loop, so every broker in a federation needs its own. Must be an HTTP token, as a Via entry requires. Left out, it is the host of server.public_url without its port, such as broker.example.org, and without a server.public_url, or with an IPv6 one, the machine's host name. The broker refuses to start when neither gives a token. Set it when two brokers share a host name.

Default
Not set. Example: "broker-a"
Environment variable
ANDROMEDA__FEDERATION__IDENTITY__SOURCE_ALIAS

[federation.identity.extras]​

Instance-specific information the broker reports verbatim as the NGSI-LD contextSourceExtras member at /ngsi-ld/v1/info/sourceIdentity, with the enabled extensions listed beside it. Its keys are reported exactly as written and none is reserved, since the member is raw JSON that is never interpreted. Set in the file only. A date-time, inf or nan, which JSON cannot spell, is refused when the broker starts. Left out, contextSourceExtras lists only the enabled extensions, and is absent when none is enabled.