Menu 0.6.0 preview

Operate

Relay limits and quotas

This page states the relay’s limits in the Developer Preview as trueseal-relay ADR-0012 decides them, with the size limit of trueseal-sync ADR-0025 and the TTL ceiling of ADR-0034. The client’s response to each refusal is on Delivery issues.

Keying

  • Push Sessions carry no sender identity, so no limit is keyed on a sender.
  • Every limit is keyed on the recipient Inbox, the Device key, or a global count.
  • No limit reads, stores or is keyed on an IP address. Per-IP limiting belongs at the Operator’s firewall or reverse proxy.

Defaults

LimitDefaultWhen exceededKind
Blobs per Inbox10,000 Blobsinbox fullTemporary
Bytes per Inbox268,435,456 bytes (256 MiB)inbox fullTemporary
Push rate per recipientToken bucket, 20 pushes per second sustained, bursts of 500rate limitedTemporary
Concurrent connections per listener1,000 connectionsConnection closed
Concurrent Receive Sessions per Device key4 Receive SessionsNew session refused
Envelope sizeDerived from the Protocol Size Limit, 61,440 bytes (60 KiB) of Sync bodytoo largePermanent
TTL30 daysBlob reaped
  • Refusal codes carry no content.
  • On a temporary refusal the client keeps the outbox entry and retries with backoff. No delivery issue is raised.
  • On too large the client removes the outbox entry and raises sendFailed(messageId, tooLarge).

Deadlines and liveness

ItemValue
Noise handshake deadline, both listeners10 seconds
Push Session deadline, accept to close30 seconds
Client heartbeat on a Receive SessionEvery 25 seconds; the relay echoes it
Receive Session idle close75 seconds with no frame received

The client starts heartbeats. The relay does not.

Retention

  • A Blob stays in its Inbox until the recipient sends DeliverAck, which the client sends after its handler finishes (trueseal-sync ADR-0026), or until the TTL.
  • The reaper deletes expired Blobs every hour by default.
  • A reaped Blob is reported to neither device.

Changing limits

  • The Operator can change every value.
  • The envelope size limit (the Relay Size Limit) and the TTL can only be lowered.
  • The relay refuses to start with a size limit above the Protocol Size Limit.
  • The relay refuses to start with a TTL above 30 days: the Replay Window (60 days) minus the client Outbox expiry (30 days), so a message pushed on its last outbox day still arrives inside the Replay Window.
  • An app using a relay with a lower Relay Size Limit passes a matching lower maxPayloadBytes to open(). maxPayloadBytes counts the body; the Relay Size Limit counts the sealed envelope.
SettingVariableFormat
TTLTRUESEAL_RELAY_TTLGo duration, e.g. 720h
Reap intervalTRUESEAL_RELAY_REAP_INTERVALGo duration, e.g. 1h
Connections per listenerTRUESEAL_RELAY_MAX_CONNECTIONSInteger
Relay Size LimitTRUESEAL_RELAY_MAX_ENVELOPE_BYTESInteger bytes of the protobuf Envelope

Accepted attack

Anyone who knows a Device’s public key can use up that Device’s quota and delay its delivery. This is a targeted availability attack. The relay does not prevent it. Confidentiality and integrity of the queued Blobs are unaffected.