Configuration
Vox is configured through the options passed to AddVox and to the storage registrations. builder.AddVox reads the
Vox section of the .NET configuration system into them first, so VoxOptions.Deployment.WorkerId is
Vox:Deployment:WorkerId, and what the code sets wins, see configuration.
Take secrets from a secret store, see security. This page lists the options
for hosting an installation; the guides explain when to change them. Options of a feature, eg of users, search or Vox
Serve, are described with that feature.
Deployment
VoxOptions.Deployment, see deployments.
| Option | Type | Default | |
|---|---|---|---|
DeploymentId | string | none | New for every deployment, the same on all its hosts. Unset: one deployment, always active. At most 200 characters, without / |
BuildId | string | none | The deployed version, for diagnostics |
WorkerId | string | On Azure App Service WEBSITE_SITE_NAME and WEBSITE_INSTANCE_ID, otherwise the machine name | The host's identity within the deployment, see worker ids. At most 256 characters |
ApiKey | string | none | The key of the deployment endpoints, which refuse every request without it |
HeartbeatInterval | TimeSpan | 5 s | How often a host reports its heartbeat |
LivenessTimeout | TimeSpan | 60 s | How long a host may be silent before it's taken for gone. At least a minute |
ActivationTimeout | TimeSpan | 3 min | How long an activation may take before it fails. Longer than LivenessTimeout and HeartbeatInterval together |
MaxRetryDelay | TimeSpan | 30 s | The longest wait between attempts to read the deployment state during an outage |
Background work
VoxOptions.Processing unless stated otherwise, see background work.
| Option | Type | Default | |
|---|---|---|---|
MaxDegreeOfParallelism | int | half the cores, at least 1 | The workers of a host's background work together |
ConcurrentRuns | int | 2 | Runs of the processing of changes that a host keeps going at once |
EntityBatchSize | int | 500 | The most entities a host claims at once |
IdleCheckInterval | TimeSpan | 30 s | How often each loop checks for work when nothing woke it |
LeaseDuration | TimeSpan | 2 min | How long a stopped host's claims and leases are kept before other hosts take the work over |
MaxEvaluationAge | TimeSpan | 10 min | The longest an evaluation may take before it's evaluated again |
VoxOptions.SerialProcessing | bool | false | Process one entity at a time, in one run |
VoxOptions.OutboxJobSchedule | cron | */30 * * * * * | The fallback schedule of the projection publications' incremental jobs |
Entity storage
VoxOptions.EntityStorage, see storage per entity type.
| Option | Type | Default | |
|---|---|---|---|
UseStorage<TEntity>(name) | method | none | Stores an entity type in the named storage |
DefaultStorageName | string | the Entity Framework storage | The storage of ordinary entity types without a selection |
TransientStorageName | string | the first Redis entity storage | The storage of transient entity types without a selection |
Database storage
The options of AddSqlServerStorage, AddPostgresStorage and AddSqliteStorage, see
infrastructure.
| Option | Type | Default | |
|---|---|---|---|
ConnectionString | string | ConnectionStrings:Vox; on SQLite App_Data/vox.db | Vox's database |
NexusConnectionString | string | ConnectionStrings:Nexus | Nexus's database. Unset: Vox's database, or on SQLite a file next to it, eg vox-nexus.db |
ConfigureNexusConnection | bool | true | Registers Nexus's connection on the same provider; false leaves it to the application |
ConfigureEntityFramework | delegate | none | Sets the Entity Framework storage options below, eg RequireAppliedModel |
ConfigureProvider | delegate | none | The provider's own options for Vox's database, eg a command timeout |
Entity Framework storage
The options of AddEntityFrameworkStorage, which the storage packages register, and which another provider registers
itself, see infrastructure.
| Option | Type | Default | |
|---|---|---|---|
ConfigureDbContext | delegate | set by the storage package | Selects the database provider and connection, eg db.UseSqlServer(connection) |
StorageName | string | entity-framework | The name that UseStorage selects it by |
TablePrefix | string | Vox_ | The prefix of Vox's tables |
AllowDestructiveMigrations | bool | false | Lets migrations drop the tables and columns that the model no longer uses |
RequireAppliedModel | bool | false | Checks at startup that the model in code was applied, eg by vox migrate, instead of applying it, see migrating in production |
Redis entity storage
The options of AddRedisEntityStorage(name, ...), see Redis for transient entities.
| Option | Type | Default | |
|---|---|---|---|
ConnectionString | string | none | A StackExchange.Redis connection string |
ConnectionFactory | delegate | none | An application-owned connection instead of a connection string |
Database | int | the connection's default | The Redis database number |
KeyPrefix | string | vox | The prefix of the storage's keys |