---
title: "Storage engines"
description: "What a storage engine does for SurrealDB. How to think about choosing one."
canonical_url: "https://surrealdb.com/docs/integrate/embedding/storage-engines"
section: "Embedding SurrealDB"
surrealdb_version: "4.x"
last_modified: "2026-11-18T02:09:16Z"
---

> Full SurrealDB documentation index: https://surrealdb.com/docs/llms.txt

# Storage engines

What a storage engine does for SurrealDB. How to think about choosing one.

SurrealDB sits on top of a storage engine - the component that persists keys and values on disk (or in memory) inside transactions. The query engine speaks SurrealQL; the storage engine decides how durability, concurrency, and replication behave underneath.

Different engines optimise for different deployment shapes. A single embedded process cares about latency and simplicity; a distributed cluster cares about fault tolerance and horizontal capacity. The engine you pick ties your operational playbook to concrete behaviours such as compaction, backup and recovery.

**SurrealDB 4.x**

Typical options you will see in SurrealDB deployments include SurrealKV for on-disk storage, which is the only on-disk engine from SurrealDB 4.0 and suits embedded and local-first workloads where lower resident memory and simpler in-process behaviour are priorities, and SurrealMX (`memory`) for in-process or server in-memory workloads. In a browser, SurrealKV stores its files in the Origin Private File System (OPFS). RocksDB and IndexedDB were removed in SurrealDB 4.0, and SurrealKV converts data from either when it opens it.

**SurrealDB 3.x**

Typical options you will see in SurrealDB deployments include RocksDB for mature local disk storage in write-heavy server workloads, SurrealMX (`memory`) for in-process or server in-memory workloads, and SurrealKV for embedded and local-first workloads where lower resident memory and simpler in-process behaviour are priorities.

In-memory modes are ideal for tests and scratch work, and can also be used in embedded deployments when you enable Redis-like SurrealMX persistence. See [Deployment models](/docs/operate/self-hosted/deployment-models.md) for how engines map to hosting models.

To choose an engine, start from your hosting model (embedded, single server, cluster) and read about [deployment models](/docs/operate/self-hosted/deployment-models.md) together with [architecture](/docs/learn/data-models/architecture.md). Then follow the embedding guides for your language under [embedding SurrealDB](/docs/integrate/embedding.md) for what your SDK supports today - capabilities vary by platform and release.
