Configuration and settings
sxs has two distinct configuration layers:
- Global variables configure the process, database connections, buckets, AMQP, authentication and logging. They are read at boot and cannot vary by space.
- Settings are runtime switches exposed through the settings service. They have an environment default and can usually be overridden per space in the tenant configuration.
A variable in .env is not automatically a setting. Most .env entries are
global variables; only the entries listed in the settings table below are
handled by the settings service.
Global variables
Global variables are read by src/server/init/config.js, src/server/debug.js
and the resource initialization modules. Changing them requires a process
restart.
See sxs, lxs and wxs for how MODES
selects the work a process is allowed to perform. A process without exports
in MODES is export producer-only; the export consumer runs where exports is
enabled. Likewise, a process without workers uses the remote wxs worker queue.
MODES selects capacities, not request classification or execution modes.
A process without workers still serves normal and bulk-resource requests; it
dispatches eligible worker execution to wxs. See
Execution modes and resource profiles.
MongoDB
ClickHouse
AMQP
Buckets
MinIO
Google Cloud Storage
Azure Blob Storage
Authentication and integrations
Logging
Settings
Settings are registered in src/server/init/settings.js. Each setting has:
- an environment variable (
envId); - a camelCase property used in the tenant's space configuration;
- an optional default;
- an optional dataset-annotation override.
The space property is the lower-cased env name camelized. For example:
A space override is written in the space object of the tenant configuration:
Scope and precedence
Precedence when reading a setting:
- environment value (a numeric zero is a valid threshold value);
- space property (a numeric zero is a valid threshold value);
- dataset annotation, when supported;
- default value.
Environment settings are read at boot. Space settings are read from the current tenant configuration, which is refreshed periodically. Worker settings are global-only because the worker pool is created once per process.
Settings reference
The bulk and export worker settings are listed in the settings table because
they use the settings registry, but init/workers.js and
init/exportWorkers.js read them globally at boot. Per-space values are not
consulted for those variables. syncMaxObservations,
exportMaxObservations and exportMaxFileMb are read through the normal
space-aware settings accessor.
The INGESTION_* settings are also global-only: the loader capacity reads
them from the process settings when it claims, renews or recovers ingestions
(see Ingestion queue).
Legacy and non-sxs entries
Some local .env files contain entries that are not read by sxs:
MAX_CODELIST_LENGTH— not read; useMAX_ITEMLIST_LENGTH.WEBFS_API_KEY— used by the separate WeBFs service, not bysxs.
Test and benchmark-only variables
These are not production configuration:
Related documentation
- Execution modes and resource profiles — execution modes, resource profiles and capacities
- Bulk resource profile and worker jobs — classification, worker pool and benchmarks
- Asynchronous exports — export API, queue and Confy statistics
- Ingestion queue — the lxs ingestion queue, statuses, leases and settings
- Output formats — JSON, CSV, native CSV and Parquet
