SurrealDB
Frona AI uses SurrealDB 3.0 as its database, running embedded inside the engine process with RocksDB as the storage backend. There’s no separate database server to manage.
How it works
Section titled “How it works”SurrealDB runs in-process. It starts when the engine starts and stops when the engine stops. Data is stored on disk at the path configured by FRONA_DATABASE_PATH (default: data/db).
This approach keeps the deployment simple. You don’t need to set up, connect to, or manage a separate database service.
Configuration
Section titled “Configuration”| Variable | Default | Description |
|---|---|---|
FRONA_DATABASE_PATH | data/db | Path to the database files |
Data storage
Section titled “Data storage”The database uses RocksDB under the hood, which stores data as a set of files in the configured directory. These files include:
- Data files (SST files)
- Write-ahead logs (WAL)
- Manifest files
Persistence
Section titled “Persistence”To persist data across container restarts, mount the database directory as a Docker volume:
volumes: - ./data:/app/dataWithout this, data is lost when the container is removed.
Performance
Section titled “Performance”RocksDB is optimized for fast writes and efficient storage. For most deployments, the default settings work well.
If you’re running on an SSD (recommended), you’ll get the best performance. HDD storage works but may be noticeably slower under load.
Backups
Section titled “Backups”See Backups for how to back up the database.