I want to setup 2 instances of Redis because I have different requirements for the data I want to store in Redis. While I sometimes do not mind losing some data that are used primarly as cached data, I want to avoid to lose some data in some cases like when I use python RQ that stores into Redis the jobs to execute.

I mentionned below the main settings to achieve such a goal. 

What do you think? 

Did I forget anything important?

1) Redis as a cache

```
# Snapshotting to not rebuild the whole cache if it has to restart
# Be reasonable to not decrease the performances
save 900 1
save 300 10
save 60 10000

# Define a max memory and remove less recently used keys
maxmemory X  # To define according needs
maxmemory-policy allkeys-lru
maxmemory-samples 5

# The rdb file name
dbfilename dump.rdb

# The working directory.
dir ./

# Make sure appendonly is disabled
appendonly no

```

2) Redis as a persistent datastore

```
# Disable snapshotting since we will save each request, see appendonly
save ""

# No limit in memory
# How to disable it? By not defining it in the config file?
maxmemory

# Enable appendonly
appendonly yes
appendfilename redis-aof.aof
appendfsync always # Save on each request to not lose any data
no-appendfsync-on-rewrite no

# Rewrite the AOL file, choose a good min size based on the approximate size of the DB?
auto-aof-rewrite-percentage 100
auto-aof-rewrite-min-size 32mb

aof-rewrite-incremental-fsync yes

aof-load-truncated yes

```

Sources:

* <http://redis.io/topics/persistence>
* <https://raw.githubusercontent.com/antirez/redis/2.8/redis.conf>
* <http://fr.slideshare.net/eugef/redis-persistence-in-practice-1>
* <http://oldblog.antirez.com/post/redis-persistence-demystified.html>
* [How to perform Persistence Store in Redis?](https://stackoverflow.com/questions/10909282/how-to-perform-persistence-store-in-redis)
* <https://www.packtpub.com/books/content/implementing-persistence-redis-intermediate>