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:
Environment Variables
Configuration values can use environment variables with optional defaults:${VAR_NAME:default_value} or ${VAR_NAME} (required).
Common Configurations
Development
When doing development it is common to use built-in adapters with persistentfile_based storage,
and non-persistent in_memory storage.
iii-config.yaml
Production
While iii’s built-infile_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.
iii-config.yaml
Configuration Reference
Engine WebSocket port for SDK/worker connections.
List of modules to enable. Each entry requires a
class identifier and an optional config object.Modules
REST API Module
REST API Module
Class:
modules::api::RestApiModuleExposes HTTP endpoints for triggers and the core API surface. Functions with HTTP triggers are served through this module.TCP port for the HTTP server.
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.
Maximum concurrent HTTP requests the server will handle.
Cross-Origin Resource Sharing configuration for browser clients.
Stream Module
Stream Module
Class:
modules::stream::StreamModuleReal-time WebSocket pub/sub for live data streaming to clients. Clients connect via WebSocket to receive pushed updates on subscribed channels.TCP port for WebSocket connections.
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).
State Module
State Module
Class:
modules::state::StateModulePersistent key-value storage for function state across invocations. Functions use ctx.state.get / ctx.state.set to read and write stateful data.Storage backend for state data.
Queue Module
Queue Module
Class:
modules::queue::QueueModuleBackground job processing with retries, dead-letter queues, and concurrency control. Functions enqueue jobs; subscribers process them asynchronously.Job queue backend.
PubSub Module
PubSub Module
Class:
modules::pubsub::PubSubModuleIn-process event fanout for decoupled function communication. Functions publish events; multiple subscribers receive them immediately.PubSub backend.
Cron Module
Cron Module
Class:
modules::cron::CronModuleTime-based job scheduling using cron expressions. Functions with cron triggers execute on schedule.Cron scheduling backend.
Observability Module
Observability Module
Class:
modules::observability::OtelModuleOpenTelemetry tracing, metrics, logs, and alerting. Provides visibility into function execution, performance, and errors.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 when configured.Advanced sampling — fine-grained control over which traces to keep.
Maximum spans to retain in memory (when exporter is
memory or both). Higher = more history for local debugging, more memory usage.Enable metrics collection for counters, gauges, and histograms.
Metrics storage. Options:
memory (queryable via API), otlp (send to collector).How long (seconds) to retain metrics before expiration.
Maximum metric data points to store. Prevents unbounded memory growth.
Enable 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.
Batch size for OTLP log export. Larger batches = fewer network calls, higher latency.
How often (ms) to flush logs to the 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.Console output format. Options:
default (human-readable with colors), json (structured).HTTP Functions Module
HTTP Functions Module
Class:
modules::http_functions::HttpFunctionsModuleEnables HTTP-invoked functions (outbound HTTP calls from the engine). Required for functions registered with HttpInvocationConfig. The engine makes the HTTP request on behalf of the function and enforces URL security policies.URL security policies for outbound requests.
For local development, you can relax security by setting
block_private_ips: false and require_https: false to allow localhost targets.Exec Module
Exec Module
Class:
modules::shell::ExecModuleSpawns external processes (SDK workers) and watches for file changes. Useful for setups where workers need to run alongside the engine on the same host, or from frameworks like Motia.Directories to watch for file changes. Changes trigger process restart.
Command and arguments to execute. First element is the command, rest are arguments.
Bridge Client Module
Bridge Client Module
Class:
modules::bridge_client::BridgeClientModuleConnects this engine to a remote iii instance for cross-instance function invocation. Enables distributed architectures and function federation.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 the remote engine (local calls invoke remote functions).
Telemetry Module
Telemetry Module
Class:
modules::telemetry::TelemetryModuleAnonymous product usage analytics for iii development. Helps the team understand usage patterns and prioritize features.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 is 6 hours.