Skip to main content

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.

OptionTypeDefault
DeploymentIdstringnoneNew for every deployment, the same on all its hosts. Unset: one deployment, always active. At most 200 characters, without /
BuildIdstringnoneThe deployed version, for diagnostics
WorkerIdstringOn Azure App Service WEBSITE_SITE_NAME and WEBSITE_INSTANCE_ID, otherwise the machine nameThe host's identity within the deployment, see worker ids. At most 256 characters
ApiKeystringnoneThe key of the deployment endpoints, which refuse every request without it
HeartbeatIntervalTimeSpan5 sHow often a host reports its heartbeat
LivenessTimeoutTimeSpan60 sHow long a host may be silent before it's taken for gone. At least a minute
ActivationTimeoutTimeSpan3 minHow long an activation may take before it fails. Longer than LivenessTimeout and HeartbeatInterval together
MaxRetryDelayTimeSpan30 sThe longest wait between attempts to read the deployment state during an outage

Background work​

VoxOptions.Processing unless stated otherwise, see background work.

OptionTypeDefault
MaxDegreeOfParallelisminthalf the cores, at least 1The workers of a host's background work together
ConcurrentRunsint2Runs of the processing of changes that a host keeps going at once
EntityBatchSizeint500The most entities a host claims at once
IdleCheckIntervalTimeSpan30 sHow often each loop checks for work when nothing woke it
LeaseDurationTimeSpan2 minHow long a stopped host's claims and leases are kept before other hosts take the work over
MaxEvaluationAgeTimeSpan10 minThe longest an evaluation may take before it's evaluated again
VoxOptions.SerialProcessingboolfalseProcess one entity at a time, in one run
VoxOptions.OutboxJobSchedulecron*/30 * * * * *The fallback schedule of the projection publications' incremental jobs

Entity storage​

VoxOptions.EntityStorage, see storage per entity type.

OptionTypeDefault
UseStorage<TEntity>(name)methodnoneStores an entity type in the named storage
DefaultStorageNamestringthe Entity Framework storageThe storage of ordinary entity types without a selection
TransientStorageNamestringthe first Redis entity storageThe storage of transient entity types without a selection

Database storage​

The options of AddSqlServerStorage, AddPostgresStorage and AddSqliteStorage, see infrastructure.

OptionTypeDefault
ConnectionStringstringConnectionStrings:Vox; on SQLite App_Data/vox.dbVox's database
NexusConnectionStringstringConnectionStrings:NexusNexus's database. Unset: Vox's database, or on SQLite a file next to it, eg vox-nexus.db
ConfigureNexusConnectionbooltrueRegisters Nexus's connection on the same provider; false leaves it to the application
ConfigureEntityFrameworkdelegatenoneSets the Entity Framework storage options below, eg RequireAppliedModel
ConfigureProviderdelegatenoneThe 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.

OptionTypeDefault
ConfigureDbContextdelegateset by the storage packageSelects the database provider and connection, eg db.UseSqlServer(connection)
StorageNamestringentity-frameworkThe name that UseStorage selects it by
TablePrefixstringVox_The prefix of Vox's tables
AllowDestructiveMigrationsboolfalseLets migrations drop the tables and columns that the model no longer uses
RequireAppliedModelboolfalseChecks 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.

OptionTypeDefault
ConnectionStringstringnoneA StackExchange.Redis connection string
ConnectionFactorydelegatenoneAn application-owned connection instead of a connection string
Databaseintthe connection's defaultThe Redis database number
KeyPrefixstringvoxThe prefix of the storage's keys