Repository navigation
v0.22.0
Read worker threads on by default
v0.22.0 serves record reads on worker threads, one per spare core, from a single process. Cluster mode is deprecated. Read the upgrade notes: each worker costs memory, and VAULTBASE_READ_WORKERS=0 keeps the old single-thread behaviour.
Changes
- Record reads run on worker threads by default. The server starts one read worker per spare core (
VAULTBASE_READ_WORKERS, default: cores minus one, at most 8); each has its own database connection and serves record list and get-one requests, while writes, auth, admin, files, realtime and user code stay on the main thread. A collection or settings change on the main thread reaches the workers at once, a write tells them which tables it touched, the Monitoring page shows their per-step latencies and query shapes alongside the main thread's, andGET /api/v1/_/metricsgainsread_workers. A worker that dies is dropped and its in-flight requests fail; a forwarded request with no reply within 30 s fails with 503. vaultbase clusteris deprecated. Read worker threads use every core from one process, with one set of rate limits and realtime connections and cache invalidation that reaches every thread. It still works and prints a deprecation line at start; a later release removes it.
Upgrade notes
- Each read worker costs roughly 50–100 MB (its own JavaScript heap and SQLite page cache). Set
VAULTBASE_READ_WORKERS=0to keep everything on one thread, or a number to size the pool. In-memory databases and cluster workers never start read workers. - The first read of a collection after start, and the first after a collection change, is served on the main thread while it refills its collection cache; later ones go to a worker.
Full Changelog: v0.21.3...v0.22.0