Skip to main content

System Configuration

The System section controls the HTTP server (Kestrel), storage backends, rate limiting, and circuit breaker behaviour.


Server

Controls the Kestrel web server.

PropertyTypeDefaultDescription
Http.Portint7080HTTP listener port
Https.EnabledboolfalseEnable HTTPS
Https.Portint7443HTTPS listener port
Https.Certificate.PathstringPath to PFX/PEM certificate file
Https.Certificate.PasswordstringCertificate password (omit for passwordless)
MaxConcurrentConnectionslong?nullKestrel max concurrent connections (null = unlimited)
MaxConcurrentUpgradedConnectionslong?nullMax WebSocket / HTTP/2 upgrade connections
KeepAliveTimeoutTimeSpan?00:02:00Connection keep-alive timeout
RequestHeadersTimeoutTimeSpan?00:00:30Time allowed to receive request headers
MaxRequestBodySizeMbint?50Maximum request body size in megabytes

HTTPS Example

"Server": {
"Http": { "Port": 7080 },
"Https": {
"Enabled": true,
"Port": 7443,
"Certificate": {
"Path": "/certs/vectra.pfx",
"Password": "s3cr3t"
}
}
}
note

HTTP and HTTPS ports must be different. Vectra will throw an InvalidOperationException at startup if they match.


Storage

Database

PropertyTypeDefaultDescription
DefaultProviderstring"Sqlite"Active database provider: "Sqlite" or "Postgres"
Providers.Sqlite.ConnectionStringstringSQLite connection string
Providers.Postgres.ConnectionStringstringPostgreSQL connection string
"Database": {
"DefaultProvider": "Sqlite",
"Providers": {
"Sqlite": { "ConnectionString": "Data Source=vectra.db" }
}
}

Cache

PropertyTypeDefaultDescription
DefaultProviderstring"Redis"Active cache provider: "Redis" or "Memory"
Providers.Redis.ConnectionStringstringRedis connection string (e.g., localhost:6379)
Providers.Memoryobject{}In-memory cache (no additional properties)
"Cache": {
"DefaultProvider": "Memory"
}

Rate Limiting

Per-agent token-bucket rate limiter.

PropertyTypeDefaultDescription
EnabledbooltrueEnable / disable rate limiting globally
DefaultRequestsPerMinuteint60Maximum requests per minute per agent

Agents that exceed the limit receive a 429 Too Many Requests response with a Retry-After: 60 header.

"RateLimit": {
"Enabled": true,
"DefaultRequestsPerMinute": 120
}

Circuit Breaker

Protects upstream services from repeated failures.

PropertyTypeDefaultDescription
EnabledbooltrueEnable / disable the circuit breaker
FailureThresholdint5Number of failures before the circuit opens
OpenDurationSecondsint30Duration (seconds) the circuit stays open
SamplingWindowSecondsint60Rolling window for counting failures

When the circuit is open, requests receive a 503 Service Unavailable response.

"CircuitBreaker": {
"Enabled": true,
"FailureThreshold": 3,
"OpenDurationSeconds": 60,
"SamplingWindowSeconds": 120
}