Configure the Engine
Complete reference for iii-config.yaml with all modules, adapters, and options.
Goal
Configure iii functionality through its config file to enable modules, functionality, set up adapters, and customize behavior.
Overview
The config file controls:
- Engine settings - WebSocket port for SDK connections
- Modules - Features like HTTP endpoints, queues, state, cron, observability
- Adapters - Storage backends (file, memory, Redis, RabbitMQ, etc.)
Specifying the config file
Configs can be specified to iii at startup with either the -c or --config flag:
iii -c iii-config.yamlEnvironment Variables
Configuration values can use environment variables with optional defaults:
port: ${III_PORT:49134}
endpoint: ${OTEL_ENDPOINT:http://localhost:4317}
redis_url: ${REDIS_URL} # No default - must be setSyntax: ${VAR_NAME:default_value} or ${VAR_NAME} (required).
Common Configurations
Development
When doing development it is common to use built-in adapters with persistent file_based storage,
and non-persistent in_memory storage.
port: 49134
modules:
- class: modules::api::RestApiModule
config:
port: 3111
- class: modules::state::StateModule
config:
adapter:
class: modules::state::adapters::KvStore
config:
store_method: file_based # or in_memory
file_path: ./data/state_store
- class: modules::queue::QueueModule
config:
queue_configs:
default:
max_retries: 5
concurrency: 5
type: standard
adapter:
class: modules::queue::BuiltinQueueAdapter
config:
store_method: file_based # or in_memory
file_path: ./data/queue_storeProduction
While iii's built-in file_based adapters can be used in production it's common to swap them out for other
adapters that are built for purpose such as Redis, or RabbitMQ.
Don't use in_memory in production
Do not use in_memory storage in production. in_memory storage does not persist between engine restarts if used can cause irrecoverable data loss.
port: ${III_PORT:49134}
modules:
- class: modules::api::RestApiModule
config:
port: ${HTTP_PORT:3111}
- class: modules::state::StateModule
config:
adapter:
class: modules::state::adapters::RedisAdapter
config:
redis_url: ${REDIS_URL}
- class: modules::queue::QueueModule
config:
queue_configs:
default:
max_retries: 5
concurrency: 5
type: standard
adapter:
class: modules::queue::RabbitMQAdapter
config:
amqp_url: ${AMQP_URL}
# class: modules::queue::RedisAdapter
# config:
# redis_url: ${REDIS_URL}
- class: modules::cron::CronModule
config:
adapter:
class: modules::cron::RedisCronAdapter
config:
redis_url: ${REDIS_URL}
- class: modules::observability::OtelModule
config:
enabled: true
exporter: otlp
endpoint: ${OTEL_ENDPOINT}
level: warn
format: jsonFull Configuration Reference
Interactive reference for iii-config.yaml. Click sections to expand.
Engine Settings
Engine WebSocket port for SDK/worker connections.
Default: 49134
TCP port for the HTTP server. Default: 3111
Network interface to bind. Use 0.0.0.0 for all interfaces, 127.0.0.1 for localhost only.
Maximum time (ms) before an HTTP request times out. Default: 30000
Maximum concurrent HTTP requests the server will handle. Default: 1024
Cross-Origin Resource Sharing configuration for browser clients.
TCP port for WebSocket connections. Default: 3112
Network interface to bind. Use 0.0.0.0 for all interfaces, 127.0.0.1 for localhost only.
Function that validates stream connection/subscription requests (e.g., auth checks).
Set to null or omit to allow all connections.
Storage backend for stream state (subscriptions, message history).
Alternative adapters:
Alternative adapters:
Alternative adapters:
Alternative adapter:
Alternative adapter:
Master switch for all observability features.
Service name in traces/metrics/logs. Used for filtering in observability backends.
Service version tag. Useful for correlating deployments with telemetry changes.
Namespace/environment label (e.g., production, staging, development).
Trace export destination. Options: memory (queryable via API), otlp (send to collector), both
OTLP collector endpoint. Required when exporter is otlp or both.
Common endpoints: Jaeger (4317), Grafana Tempo (4317), Honeycomb, Datadog.
Base sampling ratio (0.0-1.0). 1.0 = sample all traces, 0.1 = sample 10%.
Overridden by advanced sampling rules below when configured.
Advanced sampling - fine-grained control over which traces to keep.
Maximum spans to retain in memory. Used when exporter is memory or both.
Higher = more history for local debugging, more memory usage.
Metrics collection for counters, gauges, histograms.
Metrics storage. Options: memory (queryable via API), otlp (send to collector)
How long (seconds) to retain metrics before expiration. Default: 3600 (1 hour)
Maximum metric data points to store. Prevents unbounded memory growth.
Log collection and storage.
Log export destination. Options: memory (queryable via API), otlp (send to collector), both
Maximum log records to retain in memory.
How long (seconds) to retain logs before expiration. Default: 3600 (1 hour)
Batch size for OTLP log export. Larger batches = fewer network calls, higher latency.
How often (ms) to flush logs to OTLP collector.
Log sampling ratio (0.0-1.0). 1.0 = keep all logs, 0.5 = keep 50%.
Also print SDK logs to engine console for local debugging.
Alert rules - trigger actions when metrics cross thresholds.
Engine console log level. Options: trace, debug, info, warn, error
trace = most verbose, error = only errors.
Alias for level (deprecated, use level instead).
Console output format. Options: default (human-readable with colors), json (structured)
Local development alternative — relaxes security to allow localhost targets:
Directories to watch for file changes. Changes trigger process restart.
Command and arguments to execute. First element is command, rest are args.
WebSocket URL of the remote iii engine to connect to.
Unique identifier for this client in the remote engine's registry.
Human-readable name for logging and observability.
Functions to expose to the remote engine (remote can call local functions).
Functions to forward to remote engine (local calls invoke remote functions).
Enable/disable anonymous telemetry. Set to false to opt out.
API key for telemetry backend (leave empty for anonymous tracking).
Separate API key for SDK telemetry events.
How often (seconds) to send heartbeat events. Default: 21600 (6 hours)