Repository navigation
Client Configuration
This document describes the felix-client configuration options and how they are loaded.
Transport-level tuning (QUIC I/O runtimes, ACK frequency, MTU discovery, UDP
buffers) is process-wide and env-driven rather than part of ClientConfig —
see the "QUIC Transport Tuning" section of
Environment Variables.
The performance-critical defaults are already on; no tuning is required.
Running against a cluster — seed brokers, discovery, failover, retries and
redirects — is Running a client against a cluster. None
of it is configured here: it is chosen by using ClusterClient rather than
Client, and by the ReconnectPolicy handed to it.
ClientConfig::from_env_or_yaml(quinn, config_path) uses:
- Optimized defaults first
- Environment variables next
- YAML overrides last (if provided by
config_pathorFELIX_CLIENT_CONFIG)
If a YAML path is provided and cannot be read or parsed, it returns an error.
Set FELIX_CLIENT_CONFIG or pass a path into ClientConfig::from_env_or_yaml(...).
Example:
let quinn = QuinnClientConfig::with_root_certificates(roots)?;
let cfg = ClientConfig::from_env_or_yaml(quinn, Some("client.yml"))?;-
publish_conn_pool(env:FELIX_PUB_CONN_POOL)- Number of QUIC connections for publish lanes.
-
publish_streams_per_conn(env:FELIX_PUB_STREAMS_PER_CONN)- Number of bidirectional publish streams per connection.
-
publish_chunk_bytes(env:FELIX_PUBLISH_CHUNK_BYTES)- Chunk size for large publish writes.
-
publish_queue_depth(env:FELIX_PUBLISH_QUEUE_DEPTH)- Bounded request queue per publish worker. Default:
64.
- Bounded request queue per publish worker. Default:
-
publish_inflight_bytes(env:FELIX_PUBLISH_INFLIGHT_BYTES)- Shared byte budget across all publish workers. Default:
4194304(4 MiB). - Publishers wait for budget before enqueueing and reject a single publish larger than the limit.
- An acked publish holds its budget until the broker's ack arrives (acked publishes are pipelined on the stream), so the budget also caps acked data in flight — not just data queued for writing.
- Shared byte budget across all publish workers. Default:
-
publish_sharding(env:FELIX_PUB_SHARDING)- Sharding mode across publish streams.
- Values:
rrorhash_stream.
-
cache_conn_pool(env:FELIX_CACHE_CONN_POOL)- QUIC connection pool size for cache operations.
-
cache_streams_per_conn(env:FELIX_CACHE_STREAMS_PER_CONN)- Streams per cache connection.
-
event_conn_pool(env:FELIX_EVENT_CONN_POOL)- QUIC connection pool size for subscription event streams.
-
client_sub_queue_capacity(env:FELIX_CLIENT_SUB_QUEUE_CAPACITY)- Per-subscription delivery queue depth. Default:
256.
- Per-subscription delivery queue depth. Default:
-
client_sub_queue_policy(env:FELIX_CLIENT_SUB_QUEUE_POLICY)- Behavior when the delivery queue is full:
block,drop_new, ordrop_old. - Default:
drop_new, which bounds latency and exposes overload through dropped-event telemetry.
- Behavior when the delivery queue is full:
-
event_conn_recv_window(env:FELIX_EVENT_CONN_RECV_WINDOW) -
event_stream_recv_window(env:FELIX_EVENT_STREAM_RECV_WINDOW) -
event_send_window(env:FELIX_EVENT_SEND_WINDOW) -
cache_conn_recv_window(env:FELIX_CACHE_CONN_RECV_WINDOW) -
cache_stream_recv_window(env:FELIX_CACHE_STREAM_RECV_WINDOW) -
cache_send_window(env:FELIX_CACHE_SEND_WINDOW)
All window values are raw bytes.
-
event_router_max_pending(env:FELIX_EVENT_ROUTER_MAX_PENDING)- Max pending subscription registrations/streams held by the event router.
-
max_frame_bytes(env:FELIX_MAX_FRAME_BYTES)- Hard cap on any single frame length.
-
bench_embed_ts(env:FELIX_BENCH_EMBED_TS)- Enables embedding publish timestamps into payloads for end-to-end latency histograms.
publish_conn_pool: 4
publish_streams_per_conn: 2
publish_chunk_bytes: 16384
publish_queue_depth: 64
publish_inflight_bytes: 4194304
publish_sharding: "hash_stream"
cache_conn_pool: 8
cache_streams_per_conn: 4
event_conn_pool: 8
client_sub_queue_capacity: 256
client_sub_queue_policy: "drop_new"
event_conn_recv_window: 268435456
event_stream_recv_window: 67108864
event_send_window: 268435456
cache_conn_recv_window: 268435456
cache_stream_recv_window: 67108864
cache_send_window: 268435456
event_router_max_pending: 16384
max_frame_bytes: 16777216
bench_embed_ts: false- Client throughput is gated by publish parallelism. A single connection with one stream will bottleneck regardless of broker tuning.
- The shared in-flight byte budget prevents additional publish streams from multiplying hidden backlog.
-
publish_sharding=hash_streampreserves per-stream ordering while spreading across workers;rris best for uniform, high-concurrency loads.
Generated from docs/client-config.md in the repository. That file is the source of truth; this page may be behind it.
Architecture & Design
- Broker-internal forwarding protocol
- Felix Architecture
- Felix Wire Protocol (v1)
- Felix semantics
- Felix – Comprehensive Design Document
Storage & Replication
- Durable Storage
- Durable Storage Performance
- Felix Durable Segment Format (v2)
- One core log, many semantics
- Plan: group-commit the cache write path
- Shard replication and leader failover
- The cache is a projection over the log
Control Plane & Cluster
- A formal model of one shard
- Control Plane + RAFT Plan (Draft)
- Metadata Raft
- Subscribe routing: redirect, not proxy
- The Postgres the control plane requires
- The local cluster harness
Clients & Configuration
- Auth Design: OIDC Exchange + Felix Tokens
- Broker Config Examples
- Client Config
- Running a client against a cluster
Security
- Bootstrap security
- Panic and abort audit — broker data path
- RBAC Model (Control Plane)
- Soak and resource-leak report — broker
- Threat model: the broker-internal surface
Performance Investigations
- Real-network performance suite
- Sharding investigation: keyed publishes, io_uring, and a ceiling that would not move
- The 0.4.0 performance matrix
- Throughput investigation: why Felix is slower than raw QUIC
Explorations & History