Redis supports different persistence methods. Why is enabling Append Only File (AOF) recommended for production deployments?
Think about how Redis can recover data after a crash.
AOF logs every write operation, so Redis can replay these commands to restore data after a restart, minimizing data loss compared to snapshotting alone.
Redis Sentinel is often used in production environments. What is its main purpose?
Consider how Redis handles failover and high availability.
Redis Sentinel monitors the health of Redis masters and replicas. If the master fails, Sentinel promotes a replica to master automatically to maintain availability.
Given a Redis server with AOF enabled and RDB snapshots configured, what will the INFO Persistence section show for aof_enabled and rdb_bgsave_in_progress if a background save is running?
INFO Persistence
Check what values indicate enabled features and running processes.
If AOF is enabled, aof_enabled shows 1. If a background RDB save is running, rdb_bgsave_in_progress is 1.
A Redis slave is lagging behind the master in a production setup. Which of the following is the most likely cause?
Think about what affects data transfer speed between master and slave.
A slow network connection between master and slave can cause replication lag because data takes longer to reach the slave.
Which option is the best practice to optimize Redis memory usage for large datasets in production?
Consider how Redis handles memory limits and eviction.
Setting a maxmemory policy with eviction allows Redis to automatically remove less important keys when memory is full, preventing crashes and optimizing usage.