-
v0.6.5 Stable
released this
2026-02-26 13:45:57 +00:00 | 2 commits to main since this releaseVSKI v0.6.5
Features
Workflow Execution on Replicas
Replicas can now execute workflows locally using their own
workflows.dbdatabase. Sinceworkflows.dbandstats.dbare excluded from replication, each replica maintains independent workflow state while still having access to synced user data fromdefault.db.This enables:
- Distributed workflow processing - Workers can run on any replica
- Load distribution - Offload workflow execution from master
- Local stats collection - Each replica tracks its own statistics
Configuration
No additional configuration required. Workflows automatically work on replicas when:
- Replica has its own
workflows.db(created automatically) - Workflow endpoints are excluded from read-only middleware
# Replica configuration REPLICA_MODE=replica MASTER_URL=https://master.example.com SYNC_INTERVAL=60 # Workflows run locally on replica # Workers connect to replica's /api/workflow/ws endpointFile Replication for Replicas
When using local storage (not S3), replicas can now automatically sync uploaded files from the master server. This ensures file attachments are available on replica servers alongside the database data.
How It Works
- File Journal: Master server tracks file operations (add/delete) in a
_file_journaltable - Automatic Sync: After each database sync, replicas fetch and apply file changes
- Dual Cleanup Strategy:
- Ack-based: Journal entries are removed after replicas confirm sync
- Time-based: Entries older than the retention period are automatically cleaned up
Configuration
# Master server - file journal is created automatically when: # - Not in replica mode # - Not using S3 storage FILE_SYNC_RETENTION_DAYS=7 # Default: 7 days # Replica server - file sync is enabled automatically when: # - REPLICA_MODE=replica # - Not using S3 storage REPLICA_MODE=replica MASTER_URL=https://master.example.com SYNC_INTERVAL=60New Replica Endpoints
Endpoint Description GET /api/replica/files?since=<id>List file journal entries since the given ID GET /api/replica/file/*pathDownload a file from the master server POST /api/replica/files/ackAcknowledge synced files (triggers cleanup) Technical Details
- File journal is stored in
default.dband replicates with the database - Sync happens immediately after each database sync cycle
- Files are verified with SHA256 checksum during transfer
- Journal cleanup runs every 24 hours on the master
New Environment Variables
Variable Default Description FILE_SYNC_RETENTION_DAYS7Days to retain file journal entries (time-based cleanup) Technical Details
Files Changed
internal/config/config.go- AddedFileSyncRetentionDaysconfig optioninternal/db/db.go- Added_file_journaltable and indexinternal/replica/file_journal.go- New file journal service with cleanup schedulerinternal/replica/syncer.go- Added file sync methodsinternal/replica/types.go- Added file sync request/response typesinternal/api/replica.go- Added file sync endpointsinternal/services/storage.go- Added journal recording for file operationsinternal/api/records.go- Record deletion now triggers file cleanupinternal/app/bootstrap.go- Wired up file journal and cleanup scheduler
Breaking Changes
None. File replication is automatic when using local storage in replica mode. S3 storage continues to handle file replication independently.
Migration
No migration required. The
_file_journaltable is created automatically on startup for master servers using local storage.Downloads
-
Source code (ZIP)
0 downloads
-
Source code (TAR.GZ)
0 downloads
-
vski
0 downloads ·
2026-02-26 13:46:02 +00:00 · 6.5 MiB -
vski-standalone
0 downloads ·
2026-02-26 13:46:03 +00:00 · 6.7 MiB