Skip to main content

Limits and defaults

Server limits and their defaults. Every one is a flag; see Configuration for the matching CELERIANT_ environment variables.

LimitDefaultFlag
Max client request size (compressed and uncompressed)16 MiB--max-request-size
Max response size64 MiB--max-response-size
Max inter-node request size64 MiB--internode-max-request-size
Max requested watch latency2000 ms--max-requested-latency-ms
Max watch subscribers (per shard)16384--max-watch-subscribers
Max schema definition size16 KiB--max-schema-size-bytes
List page size2000 entities--list-page-size
Max list scan duration2000 ms--list-max-duration-ms
Max concurrent list operations (per shard)16--list-max-concurrent
Max concurrent backward metablock scans (per shard)64--read-max-concurrent
Max TLS handshakes in flight (per shard, per port)8--handshake-concurrency
Inter-shard channel size8192--mesh-channel-size
Slow-client / idle timeout30 s--client-connection-timeout-ms
Max open files (per shard)1000--max-open-files
WAL file size1 GiB--shard-log-preallocate-bytes
Cache memory80% of detected memory--memory-consumption-percent

Fixed by the protocol

These are not flags.

  • Fixed-size requests: 1007 bytes. Read, details, trim, delete, watch, list and Identify bodies must fit in one 1024-byte frame. A delete naming many aggregates or a watch with large filter sets hits this first. See Wire protocol.
  • Identify nonce window: at most 2 minutes old, at most 60 s in the future.
  • Compression threshold: variable-size bodies under 1024 bytes are sent uncompressed.
  • Aggregate versions are 1-based. An expected_version of 0 asserts the aggregate has no events yet, for a conditional create.

Fixed at first start

The server records these in the data root on first start and refuses to start if they later change:

  • Shards: --num-shards, default the CPU count.
  • Routing rule: --routing-rule, default aggregate_id.
  • Timestamp precision: --timestamp-precision, default milliseconds; microseconds and nanoseconds also available. --timestamp-epoch-offset-secs too.
  • Coordinator shard: --reserve-coordinator-shard.
  • WAL compression: --wal-compression-level (default 3) and --wal-dictionary-name.

Client defaults

The clients cap requests on their own side, below the server's value.

Setting.NET CeleriantPoolOptionsRust PoolOptions
Max request sizeMaxRequestSize 10 MB (10,000,000 bytes)max_request_size 10 MB
Size checked on0.8.0: compressed length only; 0.9.0: uncompressed and compresseduncompressed and compressed length
Max response sizeMaxResponseSize 64 MiBmax_response_size 64 MiB
Connect timeoutConnectionTimeout 5 sconnection_timeout 5 s
Request timeoutRequestTimeout 30 srequest_timeout 30 s
Idle evictionIdleTimeout 25 sidle_timeout 25 s
Connections per nodeMaxConnections 10max_connections_per_node 10

A default .NET or Rust client rejects writes between 10 MB and 16 MiB that the server would accept; raise MaxRequestSize or with_max_request_size. Rust checks the uncompressed length before sending, as the server does, so compression never lets a request past the cap. The published .NET 0.8.0 checks only the compressed length, so a payload that compresses under 10 MB but expands past 16 MiB dies at the server as a dropped connection; 0.9.0 (unreleased) checks the uncompressed length too. Idle eviction sits under the server's 30 s idle timeout on purpose. See Clients.

There is no fixed cap on the number of aggregates or events.