provisioning/schemas/platform/common/server.ncl

59 lines
1.7 KiB
Text

# HTTP Server Configuration Schema
# Common schema for HTTP server settings across all services
let constraints = import "./constraints.ncl" in
{
ServerConfig = {
# Bind address (127.0.0.1 for local, 0.0.0.0 for all interfaces)
host | String | default = "127.0.0.1",
# Listen port (validated: 1024-65535)
port | Number | constraints.port_standard,
# Worker thread count (CPU-bound operations)
workers | Number | optional,
# TCP keep-alive timeout in seconds (0 = disabled)
keep_alive | Number | optional,
# Maximum concurrent TCP connections
max_connections | Number | optional,
# Request timeout in milliseconds
request_timeout | Number | optional,
# Enable graceful shutdown
graceful_shutdown | Bool | default = true,
# Graceful shutdown timeout in seconds
shutdown_timeout | Number | optional,
},
# Server config with high port constraint >= 9000 (for platform services except MCP)
ServerConfigHighPort = {
# Bind address (127.0.0.1 for local, 0.0.0.0 for all interfaces)
host | String | default = "127.0.0.1",
# Listen port (must be >= 9000 for platform services)
port | Number | constraints.port_high,
# Worker thread count (CPU-bound operations)
workers | Number | optional,
# TCP keep-alive timeout in seconds (0 = disabled)
keep_alive | Number | optional,
# Maximum concurrent TCP connections
max_connections | Number | optional,
# Request timeout in milliseconds
request_timeout | Number | optional,
# Enable graceful shutdown
graceful_shutdown | Bool | default = true,
# Graceful shutdown timeout in seconds
shutdown_timeout | Number | optional,
},
}