falkordbe. prefix.
Use it when a deployment holds many graphs but only a working subset is active at any moment — multi-tenant workloads, historical datasets, or graphs with periodic access patterns. An idle graph shrinks to a roughly 1-byte in-memory stub while its data waits on disk.
How it works
When you offload a graph, the module serializes it to a.graph dump file and replaces the live key with a stub of a custom graphstub type. Loading reverses the process: the dump is read back into a live graph and the on-disk file is removed.
The design favors safety and availability:
- Stub-first safety. The module installs the stub key before it writes the dump. If serialization fails — for example the disk fills up — it restores the live graph, so clients never see data loss. An internal lock prevents concurrent offload and load operations on the same key.
- Non-blocking I/O. Offload and load both run in background worker threads and release the Redis global lock during disk I/O, so queries against other keys keep running without a latency spike.
- Automatic disk cleanup. Removing a stub in any way —
DEL,UNLINK, TTL expiration, orFLUSHALL— deletes the matching dump file through the type’sunlinkcallback, so offloaded data never leaks disk space. - Self-healing. If a dump file is missing or corrupted, deleting the stub still succeeds and the module logs a warning instead of blocking the keyspace.
- Version-aware dumps. Each dump records the FalkorDB graph encoding version in a small header, so the correct decoder is selected on load. A dump written by an incompatible build fails to load cleanly and leaves the stub intact.
Availability and storage
Graph offloading is part of the FalkorDB Enterprise module, which is bundled into the enterprise database image (falkordb-enterprise-db) and loaded next to the core module through FALKORDB_EXTRA_MODULES_ARGS. Deployments that run the enterprise image have the commands and configuration available with no extra setup.
Every enterprise deployment writes dumps to /data/offload on the data volume:
- The dumps live on the same persistent volume as the graph data, so they survive pod restarts and do not count against the pod’s ephemeral-storage limit.
- Each node has its own data volume, so a primary and its replicas never collide on a dump file name.
- The module creates the directory when it is missing.
The offload directory is fixed per deployment and is not one of the runtime parameters. It is set on the
redis-server command line, so changing it restarts the pods; a reconfigure operation rejects the key. See Parameters & resources for the full explanation.Configure automatic eviction
A background eviction thread can offload idle graphs for you. On each pass it makes the following decision:- If
falkordbe.idle-threshold-msis0, do nothing — background eviction is disabled. - If
falkordbe.memory-pressureis greater than0, checkused_memory / maxmemory. If the ratio does not exceed the watermark, skip this pass — there is no memory pressure yet. - Scan the keyspace for graphs idle longer than
falkordbe.idle-threshold-msand offload them.
falkordbe.memory-pressure to 0.8 therefore means “only reclaim graph memory once the instance is already at 80% of its memory budget”, which turns offloading into a safety valve rather than an always-on process.
Set these values from the Admin UI under Parameters → Enterprise Module Parameters → Graph Offloading, then select Save Enterprise. The change is applied to the running server without a restart. Fields left at their default are not written to
redis.conf. For the exact save flow and how values are applied, see Parameters & resources.
Commands
The module registers four commands. Issue them against the FalkorDB deployment endpoint like any other query, usingredis-cli or a client library.
GRAPH.OFFLOAD fails if the graph does not exist, is already offloaded, or is mid-operation. It writes to a temporary file and atomically renames it into place, so a partial dump is never visible.
Offload and reload a graph
Load-time memory safety
Before loading, the module estimates the graph’s memory footprint from its on-disk size and compares it against available memory (maxmemory - used_memory when maxmemory is set, otherwise free system memory). If the graph will not fit, the load is rejected and the stub and dump are left untouched:
FORCEskips the headroom check. Use it only when you are certain the graph fits in physical RAM.FORCEdoes not trigger eviction.falkordbe.load-evict-budgetlets the load reclaim memory by offloading other live graphs first. For positive budgets, the module scans up to2 × budgetof the least-recently-used live graphs, offloads a best-fit selection until enough memory is free, then completes the load. With-1, the scan is unbounded and eviction can continue until enough memory is reclaimed or no further candidates exist. Evicted graphs become stubs and can be reloaded later. If it still cannot free enough, the same error is returned.
Backups and replication
Offloaded graphs are preserved by backup methods that include the dump payload itself:- Datafile (RDB) and volume-snapshot backups preserve offloaded graphs. During an RDB save the module streams each
.graphfile into the snapshot; on load it reconstructs files under/data/offloadand re-registers stubs. This behavior applies to the backups and restore flows that use datafiles or volume snapshots. - AOF schedules are not sufficient for recovering already-offloaded graphs on their own, because they do not package
/data/offloaddump files into the backup artifact. Use datafile or volume-snapshot backups when offloaded-graph recovery is required. - Replication is per node.
GRAPH.OFFLOADandGRAPH.LOADare not propagated to replicas — each node manages its own memory. Both commands mutate the local keyspace, so run them only on a writable node (for example the primary, or a replica explicitly configured/promoted to accept writes). - Full sync carries offloaded data. When a replica performs a full sync, the primary’s RDB stream includes the dumps; the replica rebuilds the files in its own
/data/offloadand registers the stubs.
Operational guidance
1
Size and monitor the data volume
Dumps share the data volume with graph data. Track volume utilization so offloading cannot fill it — a full disk makes
GRAPH.OFFLOAD fail and restores the graph to RAM. Grow the volume through the scaling flow when needed.2
Use fast storage
Serialization and deserialization are disk-bound. Back the data volume with an SSD or NVMe StorageClass to keep offload and load times low.
3
Keep the default offload path
/data/offload gives each node its own dump directory on its own volume. Do not point it at a shared filesystem (NFS, SMB, EFS): nodes would collide on file names and network latency would slow every operation.4
Gate eviction on memory pressure
In production, pair
falkordbe.idle-threshold-ms with falkordbe.memory-pressure so graphs are only evicted when the node actually needs the memory, and confirm maxmemory is set.Monitor offloaded graphs
UseGRAPH.STUBS to see which graphs are currently on disk and GRAPH.STUBINFO to inspect each dump’s path, size, and file timestamps. For deployment-wide memory and disk metrics, see Monitoring.
Next steps
Parameters & resources
Set the offloading parameters and understand how values are applied.
Scaling
Expand the data volume that backs the offload directory.