Redis Persistence

GET STARTED WITH REDIS

Snapshot (with RDB file)

Redis database backups (RDB files) are hot snapshots that are taken periodically and are meant for point-in-time recovery. An RDB file is literally a dump of all user data stored in an internal, compressed serialization format. Redis can be configured to take automatic snapshots based on time transpired or the amount of changes, as well as generate them on demand. While a backup is generated, it consists of all data since the process was started and includes the changes to the dataset until it has finished.

Redis is an open source in-memory data structure store that is designed to be fast and simple. Built for real-time performance, most requests to Redis complete in less than a millisecond, allowing a single server to handle millions of concurrent requests every second.


To provide the best possible performance, Redis uses Random Access Memory (RAM), or the server's main memory to store all data. Its design, architecture and implementation are aligned to deliver the most from RAM's low and predictable latencies for both read and write operations on the data.


The use of RAM as a primary store enables Redis to deliver unmatched performance, but memory is volatile and its contents are lost in cases of software and hardware failures. While in some use cases the loss of data is tolerable (such as with short-lived data), the ability to recover the dataset with a degree of certainty is a common requirement for databases and caches. To enable the recovery of a dataset after failure, Redis uses a persistent storage that survives a process outage and can be used to read the data from.


Like most aspects of Redis, persisting the data is optional and customizable. A persistent storage medium—whether a local disk or a network-attached block storage device—is far slower compared to main memory and becomes a bottleneck for write requests. Redis has two persistence options that may be used together, individually or not at all: snapshot backups and change logs.

More info can be found via our blog, doc, and whitepaper.

Change Logs (with AOF)

Redis can also persist the dataset by taking a snapshot and appending it with changes as they arrive. This mode of data persistency, known as Append Only File (AOF), provides the ability to recover a dataset up to and including the last known state. Redis can be configured to flush changes to the AOF file every second or with every change. Recovering from an AOF file requires loading its snapshot preamble, and then executing every logged change. As a result and as an AOF grows in size due to changes, so does the time it takes to use it for recovering the dataset. Redis can be set up to rewrite the AOF file based on configurable thresholds or perform this operation on demand.

Tunable Persistence

Persisting the data and changes to it is an expensive process in terms of RAM and IO. Redis offers control over this trade off by providing two optional modes of data persistence that can be used in conjunction or individually for snapshots backups and change logging. The operation of each persistency option, RDB or AOF, can be tuned to meet the needs of data managed by Redis, and their combination addresses a range of persistency requirements.

Redis Enterprise: A Durable Database

Redis Enterprise was designed from the ground up to provide durable database characteristics. When used as-a-Service in the Cloud or VPC, Redis Enterprise is completely aware of the cloud-persistent storage configuration options and avoids using local ephemeral storage for durability purposes. Redis Enterprise allows you to select between multiple data-persistence options such as snapshot (for both backup and durability purposes), AOF-every-second or AOF-every-write and whether data persistence will be executed by the master shards, slave shards or both. Redis Enterprise comes with an enhanced storage engine that allows you to scale almost infinitely while the persistent option is checked. On a benchmark using Dell-EMC VMAX storage, a single server running Redis Enterprise Software was able to achieve the following performance with AOF-every-write enabled: 

Start Your Free Trial

Select Deployment Option:

Downloadable software for any cloud or private data center.

REDIS ENTERPRISE 

SOFTWARE

Fully managed Redis-e database-as-a-service in your virtual private cloud within major public clouds.

REDIS ENTERPRISE VPC

The fastest way to deploy a Redis database.
Fully managed, serverless and hosted database-as-a-service on major public clouds.

REDIS ENTERPRISE CLOUD

© 2019 Redis Labs | TERMS | PRIVACY