Storage comparison
Explains the storage comparison table and selection guide for choosing a persistence backend.
Comparison table
| Feature | @unikvs/memory |
@unikvs/fs.node |
@unikvs/fs.bun |
@unikvs/redis.bun |
@unikvs/s3.node |
@unikvs/s3.bun |
@unikvs/opfs |
@unikvs/indexeddb |
|---|---|---|---|---|---|---|---|---|
| Environment | All | Node.js | Bun | Bun | Node.js | Bun | Browser | Browser |
| Persistence | None. | Yes. | Yes. | Yes. | Yes. | Yes. | Yes. | Yes. |
| Supported data | Any value. | Bytes. | Bytes. | Bytes. | Bytes. | Bytes. | Bytes. | Any value. |
| Streams | Limited. | Supported. | Supported. | Supported. | Supported. | Supported. | Supported. | Check limitations. |
| Primary use | Test / temporary. | Single server. | Single server. | Shared / cache. | Shared / large-scale. | Shared / large-scale. | Large-scale browser. | Structured browser. |
See each package reference for details. @unikvs/writeonly is not a destination but a wrapper that makes an existing storage unreadable, so it is not included in the comparison table.
Selection guide
Use memory. It is the simplest and works everywhere.
Use files. Minimal setup, good for small to medium data.
Use S3-compatible storage. It supports multipart transfers.
Use OPFS for large bytes, and IndexedDB for structured data such as strings and objects.
Combination examples
Memory + Files
Combines fast reads with persistence.
Files + S3
Combines single-server responsiveness with the redundancy of shared storage.
IndexedDB + OPFS
Separates structured data and binary data backends in the browser.
Primary + write-only archive
Combines a readable storage with a backup that cannot be read back.
Environment notes
- Persistent storages need capacity, permission, and network planning. See each package reference for details.