Configuration
This page lists every setting Strata reads from configuration, in both languages, with its type, its default and what it does. Every default on this page comes from the code of release 0.9.0-preview.2. Host Strata in a service shows how to use the settings: registering the stores, the graph and the drivers, and running them.
Where settings come from
Section titled “Where settings come from”In .NET, Datalium.Strata.Hosting reads the Strata section of IConfiguration. AddStrata() binds Strata:Runs, and each registration binds its own section: AddSqliteCheckpoints() binds Strata:Sqlite, AddWakeDriver<TState>() binds Strata:Wake, and so on. A section that nothing registers is never read.
- Any configuration source works:
appsettings.json, environment variables (Strata__Wake__Interval), command-line arguments, a secret store. - Each registration also takes a delegate, applied after configuration:
AddRetention(o => o.OlderThan = TimeSpan.FromDays(30)). - The Postgres and Redis stores take their connection from
ConnectionStringsby default:ConnectionStrings:stratafor Postgres andConnectionStrings:strata-redisfor Redis. - Configuration is bound by reflection when the options are first read. If you publish with trimming, set the options in delegates.
- The wake and recovery options are named by the state type, so every graph’s wake driver reads the same
Strata:Wake. To give two graphs different wake settings, use the delegates.
In Rust, datalium-strata-host has StrataSettings, a set of serde structs. You read it from any format serde reads, such as JSON, TOML, or the environment through a config crate. Then you call open() on a store’s section, and pass the driver sections to the Host. Nothing is read for you.
- The keys are
snake_case:wake.batch_sizeisStrata:Wake:BatchSizein .NET. - Every section and every key has a default, so a file only says what differs.
{}is a valid settings file. - The run defaults aren’t applied for you. Pass
settings.runs.config()to your own runs and to each driver withwith_config. - The driver sections are the driver types themselves (
WakeDriver,RecoveryDriver,RetentionDriver,MemoryRetentionDriver), so you can also build them in code withWakeDriver::new().with_interval(...).
Both languages ignore keys they don’t know. A misspelled key, such as Intervall, is silently skipped, and the setting keeps its default.
Durations
Section titled “Durations”The two languages write durations differently, and each refuses the other’s format.
| .NET | Rust | |
|---|---|---|
| Format | A TimeSpan string: [d.]hh:mm:ss[.fffffff] |
A number of seconds, or a number followed by ms, s, m, h or d |
| 50 milliseconds | "00:00:00.050" |
"50ms" or 0.05 |
| 30 seconds | "00:00:30" |
"30s" or 30 |
| 1 hour | "01:00:00" |
"1h" |
| 30 days | "30.00:00:00" |
"30d" |
| Not set | Leave the key out | Leave the key out, or null |
In Rust, a number can have a fraction (2.5, "1.5 s"), and a negative number is a parse error. A .NET string such as "00:00:05" fails to parse in Rust, and "5s" fails to bind in .NET:
.NET: Failed to convert configuration value '5s' at 'Strata:Wake:Interval' to type 'System.TimeSpan'.Rust: '00:00:05' is not a duration: use a number of seconds, or a number with ms, s, m, h or dStores
Section titled “Stores”A container in .NET has one checkpoint store. The Postgres and Redis sections also serve the history and memory stores on the same database. For which store to use, see Choose a store.
SQLite
Section titled “SQLite”.NET: Strata:Sqlite. Rust: sqlite. Read by AddSqliteCheckpoints(), AddSqliteHistory() and AddSqliteMemory() in .NET, and by open(), open_history() and open_memory() in Rust.
| .NET | Rust | Type | Default | Meaning |
|---|---|---|---|---|
Path |
path |
string | none, required | The database file. The checkpoint, history and memory stores share it. |
GroupCommit |
group_commit |
section | off | Group commit. The SQLite store always runs one flush at a time. |
Deltas |
deltas |
section | off | Delta checkpoints. |
Offload |
offload |
section | off | Value offload. |
Use SQLite covers the store.
Postgres
Section titled “Postgres”.NET: Strata:Postgres. Rust: postgres. Read by AddPostgresCheckpoints(), AddPostgresHistory() and AddPostgresMemory() in .NET, and by open(), open_history() and open_memory() in Rust.
| .NET | Rust | Type | Default | Meaning |
|---|---|---|---|---|
ConnectionString |
url |
string | none | .NET: an Npgsql connection string or a postgres:// URL. Rust: a postgres://user:pass@host:port/db URL. |
ConnectionStringName |
— | string | strata |
The name in ConnectionStrings to read when ConnectionString isn’t set. |
DataSourceKey |
— | string | none | Use the keyed NpgsqlDataSource you registered under this key. The store doesn’t own it. |
UseRegisteredDataSource |
— | bool | false |
Use the unkeyed NpgsqlDataSource you registered. The store doesn’t own it. |
| — | pool_size |
integer | 16 |
The most connections each store keeps. In .NET, set Maximum Pool Size in the connection string. |
AutoMigrate |
auto_migrate |
bool | true |
Bring the tables up to date when the store opens. When false, the store only checks them, and a database that is behind is refused. |
Retry |
retry |
section | 4 attempts | Retries for calls that fail for a transient reason. |
GroupCommit |
group_commit |
section | off | Group commit. |
Deltas |
deltas |
section | off | Delta checkpoints. |
Offload |
offload |
section | off | Value offload. |
In .NET the connection is the first of these that is set: DataSourceKey, UseRegisteredDataSource, ConnectionString, then the connection string named by ConnectionStringName. The memory store uses this section’s AutoMigrate and Retry, and in Rust its pool_size too.
Use Postgres covers connection strings and URLs, the pool and when the tables are migrated.
.NET: Strata:Redis. Rust: redis. Read by AddRedisCheckpoints(), AddRedisHistory() and AddRedisMemory() in .NET, and by open(), open_history() and open_memory() in Rust.
| .NET | Rust | Type | Default | Meaning |
|---|---|---|---|---|
ConnectionString |
url |
string | none | .NET: a redis:// URL or a StackExchange.Redis configuration string. Rust: a redis://[:password@]host[:port][/db] URL. |
ConnectionStringName |
— | string | strata-redis |
The name in ConnectionStrings to read when ConnectionString isn’t set. |
UseRegisteredMultiplexer |
— | bool | false |
Use the IConnectionMultiplexer you registered. The stores don’t own it. |
Prefix |
prefix |
string | strata |
The key namespace. Keys are {prefix}:checkpoints:…. |
FinishedThreadTtl |
finished_thread_ttl |
duration | none (off) | Let a thread’s keys expire this long after it completes or ends. At least 1 millisecond. |
Retry |
retry |
section | 4 attempts | Retries. |
Deltas |
deltas |
section | off | Delta checkpoints. |
Offload |
offload |
section | off | Value offload. |
Redis has no group commit. The checkpoint, history and memory stores share one connection. Use Redis covers the store, and Let finished threads expire covers FinishedThreadTtl.
.NET: Strata:Postgres:Retry and Strata:Redis:Retry. Rust: postgres.retry and redis.retry.
| .NET | Rust | Type | Default | Meaning |
|---|---|---|---|---|
MaxAttempts |
max_attempts |
integer | 4 |
The most times a call is made, the first included. 1 never repeats. .NET refuses 0. Rust treats 0 as 1. |
InitialDelay |
initial_delay |
duration | 50 ms | The wait before the first repeat, doubled before each later one. |
MaxDelay |
max_delay |
duration | 2 s | The longest wait between two attempts. |
See Set retries.
Group commit
Section titled “Group commit”.NET: Strata:Sqlite:GroupCommit and Strata:Postgres:GroupCommit. Rust: sqlite.group_commit and postgres.group_commit.
| .NET | Rust | Type | Default | Meaning |
|---|---|---|---|---|
Enabled |
enabled |
bool | false |
Flush saves that arrive together in one write. |
MaxBatch |
max_batch |
integer | 256 |
The most saves one flush takes. At least 1. |
MaxConcurrentFlushes |
max_concurrent_flushes |
integer | 4 |
How many flushes run at once. At least 1. SQLite always runs one. |
See Turn on group commit.
Deltas
Section titled “Deltas”.NET: Strata:Sqlite:Deltas, Strata:Postgres:Deltas and Strata:Redis:Deltas. Rust: the same under sqlite, postgres and redis.
| .NET | Rust | Type | Default | Meaning |
|---|---|---|---|---|
Enabled |
enabled |
bool | false |
Store each running checkpoint as the changes to the row before it. |
FullEvery |
full_every |
integer | 16 |
Store every this-many rows of a thread whole. At least 2. |
CachedThreads |
cached_threads |
integer | 10000 |
How many threads’ latest rows the store remembers. At least 1. |
See How deltas work.
Offload
Section titled “Offload”.NET: Strata:Sqlite:Offload, Strata:Postgres:Offload and Strata:Redis:Offload. Rust: the same under sqlite, postgres and redis.
| .NET | Rust | Type | Default | Meaning |
|---|---|---|---|---|
Enabled |
enabled |
bool | false |
Store large values once, in a blob store, and refer to them. |
Threshold |
threshold |
integer | 65536 |
The size in bytes of a value’s JSON from which it is offloaded. At least 1. |
Path |
path |
string | none | The directory of a filesystem blob store. Not set: the blobs go in the store’s own database. |
In .NET, an ICheckpointBlobStore you register is used instead of Path. Setting both is refused. In Rust, a blob store other than the filesystem one is given in code, with the store’s options. See How offload works.
Strata Cloud
Section titled “Strata Cloud”.NET only: Strata:Cloud, read by AddCloudCheckpoints(), for the Strata Cloud private beta. Rust’s StrataSettings has no Cloud section: you build StrataCloudOptions::new(base_url, api_key) in code, with the same timeout defaults.
| .NET | Type | Default | Meaning |
|---|---|---|---|
BaseUrl |
URI | none, required | Cloud’s address, without /v1. |
ApiKey |
string | none, required | The SDK API key. Set it from a secret store or the Strata__Cloud__ApiKey environment variable, not in a settings file. |
ConnectTimeout |
duration | 3 s | How long a connection attempt may take. |
RequestTimeout |
duration | 30 s | How long a request may take. |
The decision worker (AddDecisionWorker<TState>()) takes its options in code. See Use Strata Cloud.
.NET: Strata:Runs, read by AddStrata(). Rust: runs, turned into a RunConfig by settings.runs.config().
| .NET | Rust | Type | Default | Meaning |
|---|---|---|---|---|
Lease:Owner |
lease.owner |
string | host name / process ID | Who holds the threads this process runs. |
Lease:Ttl |
lease.ttl |
duration | none | How long a lease lasts unless renewed. A run renews it every third of the ttl. Not set: runs take no lease. |
The default owner is {machine name}/{process ID} in .NET. In Rust it’s {HOSTNAME}/{process ID}, with COMPUTERNAME when HOSTNAME isn’t set, and host when neither is.
Every worker on a thread uses leases, or none does. In .NET, the StrataRunner<TState> and every driver use these defaults. In Rust, they apply only where you pass the config. See Thread leases and Choose the owner and the ttl.
Run scheduler
Section titled “Run scheduler”.NET: Strata:Scheduler, read by AddScheduler(). Rust: scheduler, an optional section: settings.scheduler is None unless the source has it. Open it with scheduler.open(), then pass it to your runs with settings.runs.config_with(&scheduler).
| .NET | Rust | Type | Default | Meaning |
|---|---|---|---|---|
Name |
name |
string | default |
The scheduler’s name on its metrics. Not empty. |
MaxConcurrent |
max_concurrent |
integer | 16 |
How many runs hold a slot at once. At least 1. |
MaxQueued |
max_queued |
integer | 1024 |
How many runs may wait for a slot. |
MaxQueueTime |
max_queue_time |
duration | none | How long a run may wait for a slot. Not set: as long as it takes. More than zero. |
Reservations |
reservations |
list | empty | Slots kept for a priority and above: each item has MinPriority / min_priority and Slots / slots (at least 1). One item per priority. |
TenantKey |
tenant_key |
string | tenant |
The run metadata key that names a run’s tenant. Not empty. |
TenantLimit |
tenant_limit |
integer | none | How many runs of one tenant hold slots at once. Not set: no limit. |
TenantLimits |
tenant_limits |
map | empty | Limits for particular tenants, in place of TenantLimit. 0 pauses a tenant. |
TenantMaxQueued |
tenant_max_queued |
integer | none | How many runs of one tenant may wait. Not set: no limit beyond MaxQueued. |
The reservations together must leave at least one slot free for every priority. See Limit each process with the run scheduler.
Drivers
Section titled “Drivers”The drivers are the loops the host runs for you. Run the background drivers explains what each one does. A round that fills its batch goes again at once. The interval is the wait once a round has caught up.
Wake driver
Section titled “Wake driver”.NET: Strata:Wake, read by AddWakeDriver<TState>(). Rust: wake, passed to Host::wake.
| .NET | Rust | Type | Default | Meaning |
|---|---|---|---|---|
Interval |
interval |
duration | 5 s | The wait between rounds. A timer or timeout fires at most this long after it is due. More than zero. |
BatchSize |
batch_size |
integer | 100 |
The most threads one listing looks at. 1 to 1000. |
Metadata |
metadata |
map | empty | Only threads whose latest checkpoint’s metadata has every pair. |
MatchGraph |
match_graph |
bool | true |
A graph with an identity wakes only the threads it wrote. |
Priority |
priority |
integer | .NET: 0. Rust: none |
The priority of the runs it wakes, for the run scheduler. In Rust, not set means the run config’s priority. |
See Wait for events and timers.
Recovery driver
Section titled “Recovery driver”.NET: Strata:Recovery, read by AddRecoveryDriver<TState>(). Rust: recovery, passed to Host::recover.
| .NET | Rust | Type | Default | Meaning |
|---|---|---|---|---|
Interval |
interval |
duration | 30 s | The wait between rounds. A dead run is recovered at most this long after its lease runs out. More than zero. |
BatchSize |
batch_size |
integer | 100 |
The most threads recovered before the driver lists again. 1 to 1000. |
StaleAfter |
stale_after |
duration | none | How old a running checkpoint must be before its thread is recovered. Required when runs take no lease. |
MaxRecoveries |
max_recoveries |
integer | none | The most times a thread is recovered without a node committing in between. |
MaxConcurrency |
max_concurrency |
integer | 8 |
How many threads it checks and recovers at once. At least 1; 1 recovers one at a time. Each recovery re-runs the node that was in flight, on top of the process’s own runs, so set it lower for a process close to its model’s rate limit or its database pool. Since 0.9.0-preview.3. |
Metadata |
metadata |
map | empty | Only threads whose latest checkpoint’s metadata has every pair. |
MatchGraph |
match_graph |
bool | true |
A graph with an identity recovers only the threads it wrote. |
Priority |
priority |
integer | .NET: 0. Rust: none |
The priority of the runs it recovers, for the run scheduler. |
See How Strata decides a thread is dead, and Recovering a thread for MaxConcurrency.
Retention driver
Section titled “Retention driver”.NET: Strata:Retention, read by AddRetention(). Rust: retention, passed to Host::retain.
| .NET | Rust | Type | Default | Meaning |
|---|---|---|---|---|
Interval |
interval |
duration | 1 h | The wait between rounds. More than zero. |
BatchSize |
batch_size |
integer | 1000 |
The most threads one purge deletes. 1 to 1000. A round purges until a batch comes back short. |
OlderThan |
older_than |
duration | none, required | How long a thread is kept after its latest checkpoint. More than zero. |
States |
states |
list | empty: completed and ended |
The thread states to purge. |
The state names are interrupted, failed, cancelled, resumed, completed, ended and running. The two languages read them differently:
- .NET binds them to
CheckpointThreadState, ignoring case (Completedorcompleted). A name it doesn’t know is dropped without an error, and if every name is dropped, the default applies. - Rust wants the lowercase names exactly. A name it doesn’t know,
Completedincluded, stops the host from starting.
See Purge on a schedule.
Long-term memory
Section titled “Long-term memory”Memory store
Section titled “Memory store”.NET: Strata:Memory, read by AddInMemoryMemory(), AddPostgresMemory(), AddSqliteMemory(), AddRedisMemory() and AddMemory(). Rust: memory, read by open_memory(&settings.memory) on the postgres, sqlite or redis section, or by settings.memory.open_in_memory(). The connection is the store section’s.
| .NET | Rust | Type | Default | Meaning |
|---|---|---|---|---|
Dimensions |
dimensions |
integer | none, required | The length of every vector: the embedding model’s. 1 to 16,000. 0 counts as not set. |
Index:Kind |
index.kind |
None or Hnsw |
None |
The vector index of the Postgres and Redis stores. Either case works in both languages. SQLite and in-memory stores always search exactly. |
Index:M |
index.m |
integer | 16 |
HNSW links per node, 2 to 100. Read only for HNSW. |
Index:EfConstruction |
index.ef_construction |
integer | 64 |
HNSW candidates kept while the index is built: at least twice M, at most 1000. Read only for HNSW. |
Table |
table |
string | memory_records |
The Postgres or SQLite table. |
Prefix |
prefix |
string | the Redis Prefix |
The Redis key namespace. Blank means the Redis section’s prefix. |
Extension |
— | string | vec0 |
The sqlite-vec extension the .NET SQLite store loads. Rust has sqlite-vec compiled in. |
Model |
— | string | <provider>/<model> from the embedding generator |
The label of the helper’s vectors. |
TenantKey |
— | string | tenant |
The run metadata key the helper reads a tenant from. |
.NET checks the HNSW ranges when the host starts and makes a Postgres or Redis memory store. Rust passes m and ef_construction to pgvector or Redis as they are. A Postgres HNSW index takes at most 2,000 dimensions.
Model and TenantKey are .NET only because the Rust memory helper is in datalium-strata-ai, which datalium-strata-host doesn’t depend on: you build Memory yourself and call with_model and with_tenant_key. See Run it in a host in the long-term memory guide.
Memory retention driver
Section titled “Memory retention driver”.NET: Strata:Memory:Retention, read by AddMemoryRetention(). Rust: memory.retention, passed to Host::retain_memory.
| .NET | Rust | Type | Default | Meaning |
|---|---|---|---|---|
Interval |
interval |
duration | 1 h | The wait between rounds. More than zero. |
BatchSize |
batch_size |
integer | 1000 |
The most records one purge deletes. 1 to 1000. |
OlderThan |
older_than |
duration | none, required | How long a memory is kept after it was last written. More than zero. |
Namespace |
namespace |
string | none | Purge only this namespace. Not set: every namespace. |
Tenant |
tenant |
string | none | Purge only this tenant. "" means only records without a tenant. Not set: every tenant. |
Set in code, not in settings
Section titled “Set in code, not in settings”These have no configuration keys:
- Health checks.
AddHealthChecks(tags, timeout)in .NET: the store probe’s timeout is 5 seconds unless you pass one. In Rust,check_store(&store, timeout)takes it. See Check health. - Instrumentation.
AddInstrumentation()in .NET takes no options. Rust needs no call: install atracingsubscriber and ametricsrecorder. See Export traces and metrics with OpenTelemetry. - The Strata Cloud decision worker.
AddDecisionWorker<TState>(sp => new DecisionWorkerOptions<TState> { ... })in .NET, andHost::taskin Rust. - The services, observer and metadata of runs. Add them to
StrataRunner<TState>.CreateOptions()in .NET, or to theRunConfigin Rust.
What stops the host from starting
Section titled “What stops the host from starting”The host checks its settings before any driver starts. In .NET, StartAsync throws and no driver starts. In Rust, Host::run returns Err(HostError) and starts nothing, and a store’s open() returns its error where you call it.
| Check | .NET message | Rust message |
|---|---|---|
A retention driver with no OlderThan, or zero |
the retention driver needs Strata:Retention:OlderThan: … |
the retention driver needs an older_than: … |
A memory retention driver with no OlderThan, or zero |
the memory retention driver needs Strata:Memory:Retention:OlderThan: … |
the memory retention driver needs an older_than: … |
| A driver interval of zero | the recovery driver's Interval must be more than zero |
the recovery driver's interval must be more than zero |
| A batch size outside 1–1000 | the wake driver's BatchSize must be between 1 and 1000 |
the wake driver's batch_size must be between 1 and 1000 |
A recovery driver’s MaxConcurrency of zero |
the recovery driver's MaxConcurrency must be at least 1 |
the recovery driver's max_concurrency must be at least 1 |
A recovery driver with neither a lease ttl nor StaleAfter |
the recovery driver needs Strata:Runs:Lease:Ttl or Strata:Recovery:StaleAfter: … |
the recovery driver needs a lease in its run config or a stale_after: … |
A recovery driver for a graph not compiled with CheckpointPolicy.EveryNode |
the recovery driver for Refund needs a graph compiled with CheckpointPolicy.EveryNode: … |
the same, with CheckpointPolicy::EveryNode |
| A retention state name the language doesn’t know | not refused: the name is dropped | the retention driver doesn't know the thread state 'Completed' |
A SQLite store with no Path |
Strata's SQLite store has no file: set Strata:Sqlite:Path |
Strata's SQLite store has no file: set sqlite.path |
| A Postgres or Redis store with no connection | Strata's Postgres store has no connection: … |
Strata's Postgres store has no url: set postgres.url |
A Cloud store with no BaseUrl or ApiKey |
Strata Cloud has no address: set Strata:Cloud:BaseUrl |
— |
A memory store with no Dimensions |
Strata's memory store has no dimensions: set Strata:Memory:Dimensions |
Strata's memory store has no dimensions: set memory.dimensions |
| A memory index kind other than none or HNSW | Failed to convert configuration value 'ivf' at 'Strata:Memory:Index:Kind' … |
Strata's memory index kind 'ivf' is unknown: use none or hnsw |
| Scheduler reservations that leave no free slot | the reservations keep 2 of 2 slots: … |
the same |
A store option out of range, such as FullEvery below 2 |
FullEvery ('1') must be greater than or equal to '2'. |
deltas' full every must be at least 2 |
Offload with both a Path and a registered ICheckpointBlobStore |
Strata's offload has two blob stores: … |
— |
A store that can’t be reached, a Postgres database that is behind with AutoMigrate off, and a memory store that lacks pgvector, sqlite-vec or the Redis Query Engine stop the host too. The drivers also need a store that lists threads (wake and recovery) or purges (retention). See What the drivers need.
Keys in one language only
Section titled “Keys in one language only”| Only in .NET | Why |
|---|---|
Postgres:ConnectionStringName, DataSourceKey, UseRegisteredDataSource |
.NET takes connections from ConnectionStrings and the container. Rust has postgres.url. |
Redis:ConnectionStringName, UseRegisteredMultiplexer |
The same. Rust has redis.url. |
Cloud |
datalium-strata-host doesn’t depend on datalium-strata-cloud. Build StrataCloudOptions in code. |
Memory:Extension, Memory:Model, Memory:TenantKey |
Rust has sqlite-vec compiled in, and you build the memory helper yourself. |
| Only in Rust | Why |
|---|---|
postgres.pool_size |
.NET uses Npgsql’s pool: set Maximum Pool Size in the connection string. |
A full appsettings.json
Section titled “A full appsettings.json”This file sets every section, so you can copy from it. A host reads only the sections of what it registers: keep the store section you use and the drivers you add. Here the Cloud ApiKey is left out, to come from a secret store.
{ "ConnectionStrings": { "strata": "Host=localhost;Port=5432;Username=strata;Password=strata;Database=strata", "strata-redis": "localhost:6379" }, "Strata": { "Sqlite": { "Path": "strata.db", "GroupCommit": { "Enabled": true, "MaxBatch": 256 }, "Deltas": { "Enabled": true, "FullEvery": 16, "CachedThreads": 10000 }, "Offload": { "Enabled": true, "Threshold": 65536, "Path": "blobs" } }, "Postgres": { "ConnectionStringName": "strata", "AutoMigrate": false, "Retry": { "MaxAttempts": 4, "InitialDelay": "00:00:00.050", "MaxDelay": "00:00:02" }, "GroupCommit": { "Enabled": true, "MaxBatch": 256, "MaxConcurrentFlushes": 4 }, "Deltas": { "Enabled": true }, "Offload": { "Enabled": true, "Threshold": 65536 } }, "Redis": { "ConnectionStringName": "strata-redis", "Prefix": "orders", "FinishedThreadTtl": "7.00:00:00", "Retry": { "MaxAttempts": 4 }, "Deltas": { "Enabled": false }, "Offload": { "Enabled": false } }, "Cloud": { "BaseUrl": "https://cloud.example.com", "ConnectTimeout": "00:00:03", "RequestTimeout": "00:00:30" }, "Runs": { "Lease": { "Owner": "orders-1", "Ttl": "00:00:30" } }, "Scheduler": { "MaxConcurrent": 16, "MaxQueued": 1024, "MaxQueueTime": "00:00:10", "Reservations": [ { "MinPriority": 5, "Slots": 2 } ], "TenantKey": "tenant", "TenantLimit": 4, "TenantLimits": { "acme": 8 } }, "Wake": { "Interval": "00:00:05", "BatchSize": 100, "Metadata": { "app": "orders" }, "MatchGraph": true, "Priority": 0 }, "Recovery": { "Interval": "00:00:30", "BatchSize": 100, "StaleAfter": "00:05:00", "MaxRecoveries": 3, "Priority": 10 }, "Retention": { "Interval": "01:00:00", "BatchSize": 1000, "OlderThan": "30.00:00:00", "States": [ "Completed", "Ended", "Failed" ] }, "Memory": { "Dimensions": 1536, "Index": { "Kind": "Hnsw", "M": 16, "EfConstruction": 64 }, "TenantKey": "tenant", "Retention": { "Interval": "01:00:00", "BatchSize": 1000, "OlderThan": "365.00:00:00", "Namespace": "incidents" } } }}A full strata.json
Section titled “A full strata.json”The same settings for Rust. Parse it into StrataSettings with serde_json::from_str, then open the store section you use and pass the driver sections to the Host.
{ "sqlite": { "path": "strata.db", "group_commit": { "enabled": true, "max_batch": 256 }, "deltas": { "enabled": true, "full_every": 16, "cached_threads": 10000 }, "offload": { "enabled": true, "threshold": 65536, "path": "blobs" } }, "postgres": { "url": "postgres://strata:strata@localhost:5432/strata", "auto_migrate": false, "pool_size": 16, "retry": { "max_attempts": 4, "initial_delay": "50ms", "max_delay": "2s" }, "group_commit": { "enabled": true, "max_batch": 256, "max_concurrent_flushes": 4 }, "deltas": { "enabled": true }, "offload": { "enabled": true, "threshold": 65536 } }, "redis": { "url": "redis://localhost:6379", "prefix": "orders", "finished_thread_ttl": "7d", "retry": { "max_attempts": 4 }, "deltas": { "enabled": false }, "offload": { "enabled": false } }, "runs": { "lease": { "owner": "orders-1", "ttl": "30s" } }, "scheduler": { "max_concurrent": 16, "max_queued": 1024, "max_queue_time": "10s", "reservations": [ { "min_priority": 5, "slots": 2 } ], "tenant_key": "tenant", "tenant_limit": 4, "tenant_limits": { "acme": 8 } }, "wake": { "interval": "5s", "batch_size": 100, "metadata": { "app": "orders" }, "match_graph": true }, "recovery": { "interval": "30s", "batch_size": 100, "stale_after": "5m", "max_recoveries": 3, "priority": 10 }, "retention": { "interval": "1h", "batch_size": 1000, "older_than": "30d", "states": [ "completed", "ended", "failed" ] }, "memory": { "dimensions": 1536, "index": { "kind": "hnsw", "m": 16, "ef_construction": 64 }, "retention": { "interval": "1h", "batch_size": 1000, "older_than": "365d", "namespace": "incidents" } }}Demo 28, hosting, reads a smaller file of each kind (C#, Rust).
Related
Section titled “Related”- Host Strata in a service: registering the stores and drivers that read these settings.
- Choose a store: which store section to use.
- Control storage size: retention, deltas and offload.
- Run multiple workers: leases and the run scheduler.
- Known limitations: what the stores don’t do yet.