Skip to content

Configuration Reference

Use this page as the single configuration map for both DatasoleServer and DatasoleClient.

Server options

All fields are optional in new DatasoleServer(options).

WebSocket per-message deflate is not a server option: it remains disabled; compression uses datasole’s application-level framing only.

OptionTypeDefaultNotes
pathstring'/__ds'WebSocket/runtime asset base path
authHandlerAuthHandlerFnallow-allUpgrade authentication hook
stateBackendStateBackendnew MemoryBackend()Shared backend for all server primitives
backendConfigBackendConfigundefinedDeclarative backend config
rateLimiterRateLimiternew DefaultRateLimiter(backend)Frame-level limiter; optional injection
executorPartial<ExecutorOptions>{ model: 'async' }Async/thread/thread-pool execution
rateLimitRateLimitConfig{ defaultRule: { windowMs: 60000, maxRequests: 100 } }Per-connection frame limiting
sessionSessionOptions{ flushThreshold: 10, flushIntervalMs: 5000 }Session persistence tuning
maxConnectionsnumber10000Hard cap for concurrent WS clients
maxCrdtKeysnumber1000Cap for tracked CRDT keys
maxEventNameLengthnumber256Input guardrail for event names

See full server examples in Server API.

Client options

All fields are optional except url in new DatasoleClient(options).

OptionTypeDefaultNotes
urlstringrequiredBase host (ws:// or http:// accepted)
pathstring'/__ds'WS/runtime asset path
authAuthCredentials{}auth.token becomes ?token=... query
useWorkerbooleantrueKeep true for browser apps
workerUrlstring${path}/datasole-worker.iife.min.jsAuto-served by server at path
useSharedArrayBufferbooleanfalseRequires COOP/COEP
reconnectbooleantrueEnable automatic reconnect
reconnectIntervalnumber1000Backoff base interval (ms)
maxReconnectAttemptsnumber10Reconnect attempt cap

See full client examples in Client API.