Skip to content

Performance Tuning

This page documents the operator-tunable knobs that affect Fleans throughput. For provider selection and full configuration reference, see Streaming and Persistence.

Three knobs on KafkaStreamingOptions:

KnobDefaultWhat it controls
Fleans:Streaming:Kafka:QueueCount8Orleans-side pulling-agent count — one consumer per queue, each subscribed to one topic. Matches Redis:TotalQueueCount semantics.
Fleans:Streaming:Kafka:NumPartitions1Kafka-side per-topic partition count at topic creation. Independent of QueueCount — does not multiply Orleans consumer parallelism. Forward-only via kafka-topics --alter --partitions N.
Fleans:Streaming:Kafka:ReplicationFactor1Per-topic broker replication. Set to 3 in multi-broker clusters for durability.

Production deployments: see #474 for security (SASL/TLS), durability (idempotent producer), and operational (DLQ, lag metrics) gaps not yet shipped.

One knob:

KnobDefaultWhat it controls
Fleans:Streaming:Redis:TotalQueueCount8Orleans-side queue count for the Redis stream provider. Each silo’s pulling agents spread across this many queues. FIFO is guaranteed per stream; cross-instance traffic distributes across TotalQueueCount Redis queues.

Redis streaming is supported via a third-party stream-provider package (not in-repo). Helm chart support for Redis streaming knobs is tracked in #610.

QueueNames list length (default 8 entries). Tune by populating Fleans__Streaming__AzureQueue__QueueNames__0..N environment variables.

The user-task list query is paginated via Sieve and applies the assignee/candidate-group filter at the SQL level on PostgreSQL (via FromSqlInterpolated + JSON-text LIKE). The PostgreSQL path (PostgresUserTaskFilterStrategy) avoids materializing the full table. SQLite users with similar-scale workloads should switch to PostgreSQL via FLEANS_PERSISTENCE_PROVIDER=Postgres.

EfCoreEventStore.ReadEventsAsync honors a configurable row limit. The default is MaxEventsPerLoad = 1000 (from FleansPersistenceOptions).

KnobDefaultWhat it controls
Persistence:MaxEventsPerLoad1000Maximum number of events loaded per grain-activation replay. If a workflow exceeds this limit, the silo logs: “Increase Persistence:MaxEventsPerLoad if this is intentional.”

For typical workflow volumes, the default is appropriate. Only tune this if you see the warning message in silo logs for workflows with unusually long event histories.