---
title: "Storage comparison"
description: "Explains the storage comparison table and selection guide for choosing a persistence backend."
---

## Comparison table [#comparison]

| 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 [#guide]

**Test / temporary**

Use memory. It is the simplest and works everywhere.

**Single server**

Use files. Minimal setup, good for small to medium data.

**Shared / large-scale**

Use S3-compatible storage. It supports multipart transfers.

**Browser**

Use OPFS for large bytes, and IndexedDB for structured data such as strings and objects.

## Combination examples [#combinations]

**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.

:::tip
See the multi-storage guide for design. Read priority follows registration order, so register the fastest backend first.
:::

## Environment notes [#environments]

:::warning
Node.js-only packages don't work in browsers, and browser-only packages don't work in Node.js. To share code, build clients per environment.
:::

- Persistent storages need capacity, permission, and network planning. See each package reference for details.
