Discussion:
[redis-db] AOF is mandatory for Redis cluster?
Halim
2018-08-06 13:38:41 UTC
Permalink
Hi All,

I have redis cluster with replication master/slave. AOF is currently
activated as describe in the documentation to setup a Redis cluster.
Could I deactivate AOF without impacting my cluster?
Thanks in advance
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+***@googlegroups.com.
To post to this group, send email to redis-***@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
h***@gmail.com
2018-08-06 17:22:39 UTC
Permalink
Using AOF or RDB/snapshot files depends on the importance of the data
you're keeping in your Redis servers. How quickly and automatically you
can recover that data after a crash.

The purpose of AOF and snapshot/RDB files is crash recovery. In the
non-sharded Redis configuration (1 master and 1 or more slaves), when no
servers save their data to disk, it's possible for all servers to lose the
whole database after fairly common events. In the sharded Redis Cluster
configuration (3+ masters, each with 1+ slaves), individual servers have
only part of the data (a "shard"), and it's harder to lose the data from a
master and its slaves at the same time. It's still possible to lose the
shard, and even to lose the entire database, if you take too many shortcuts
in allocating Redis processes to different servers.

If you deactivate AOF on all your Redis instances (masters and slaves) then
the impact will be felt after there's a server crash or a Redis client
deletes more data than it should have (e.g. with a FLUSHDB command),
causing your running Redis processes to lose data. Without the data in an
AOF or RDB file, you can't recover it.

If your Redis is a cache that's refreshed by normal activity within 30
minutes, then it might not be a disaster to lose the data, and you might
not need to save data for crash recovery purposes. If your Redis stores
data that's harder to refresh and is critical to your business/service,
then you very likely need to be able to recover the data.

If you're seeing performance problems because of the AOF or RDB file writes
to disk, then consider adding a slave that's dedicated to saving the data
to disk and not serving commands/querys to clients. In a non-sharded Redis
configuration, a single server can do this. In the sharded Redis Cluster,
you would need an additional slave for each master, i.e. 3 or more.
Post by Halim
Hi All,
I have redis cluster with replication master/slave. AOF is currently
activated as describe in the documentation to setup a Redis cluster.
Could I deactivate AOF without impacting my cluster?
Thanks in advance
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+***@googlegroups.com.
To post to this group, send email to redis-***@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
Halim
2018-08-07 13:55:05 UTC
Permalink
Thanks a lot for your perfect explanation
Post by h***@gmail.com
Using AOF or RDB/snapshot files depends on the importance of the data
you're keeping in your Redis servers. How quickly and automatically you
can recover that data after a crash.
The purpose of AOF and snapshot/RDB files is crash recovery. In the
non-sharded Redis configuration (1 master and 1 or more slaves), when no
servers save their data to disk, it's possible for all servers to lose the
whole database after fairly common events. In the sharded Redis Cluster
configuration (3+ masters, each with 1+ slaves), individual servers have
only part of the data (a "shard"), and it's harder to lose the data from a
master and its slaves at the same time. It's still possible to lose the
shard, and even to lose the entire database, if you take too many shortcuts
in allocating Redis processes to different servers.
If you deactivate AOF on all your Redis instances (masters and slaves)
then the impact will be felt after there's a server crash or a Redis client
deletes more data than it should have (e.g. with a FLUSHDB command),
causing your running Redis processes to lose data. Without the data in an
AOF or RDB file, you can't recover it.
If your Redis is a cache that's refreshed by normal activity within 30
minutes, then it might not be a disaster to lose the data, and you might
not need to save data for crash recovery purposes. If your Redis stores
data that's harder to refresh and is critical to your business/service,
then you very likely need to be able to recover the data.
If you're seeing performance problems because of the AOF or RDB file
writes to disk, then consider adding a slave that's dedicated to saving the
data to disk and not serving commands/querys to clients. In a non-sharded
Redis configuration, a single server can do this. In the sharded Redis
Cluster, you would need an additional slave for each master, i.e. 3 or more.
Post by Halim
Hi All,
I have redis cluster with replication master/slave. AOF is currently
activated as describe in the documentation to setup a Redis cluster.
Could I deactivate AOF without impacting my cluster?
Thanks in advance
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+***@googlegroups.com.
To post to this group, send email to redis-***@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
Loading...