yoklainterview sim

Database Redis Replication Sentinel Interview Questions

75 verified Database Redis Replication Sentinel interview questions — solve with answers, learn from explanations, test yourself in a real simulation.

Try the real simulation →

Sample questions

Redis Replication SentinelDifficulty 1
What does running REPLICAOF <master-ip> <master-port> on a Redis instance do?
  • aIt shards the keyspace between the two instances
  • bIt makes the instance replicate the specified master
  • cIt merges the two instances into a single cluster node
  • dIt makes the instance a Sentinel for the given master
Explanation:It configures the instance as a replica of the given master, so it starts an initial sync and then continuously applies the master's write stream. This has nothing to do with sharding (a), doesn't merge nodes into a cluster (c), and doesn't turn the instance into Sentinel — Sentinel is a separate process (d).
Redis Replication SentinelDifficulty 1
By default, is Redis master-replica replication synchronous or asynchronous?
  • aSynchronous — the master always waits for every replica to acknowledge before returning
  • bIt depends on the key's TTL
  • cAsynchronous — the master need not await replica application
  • dSynchronous, but only for keys inside a MULTI/EXEC block
Explanation:By default Redis replication is asynchronous: the master responds to the client as soon as the write is applied locally, and propagates it to replicas afterward without waiting. WAIT can be used to opt into stronger acknowledgement, but that isn't the default (a, d). Replication mode has nothing to do with a key's TTL (b).
Redis Replication SentinelDifficulty 1
By default, can a client write to a Redis replica directly?
  • aNo — replicas reject writes by default
  • bYes, and the write is silently forwarded to the master
  • cYes, but only for keys with no TTL
  • dYes, replicas accept writes and later reconcile conflicts with the master
Explanation:Replicas default to replica-read-only yes, so a direct write attempt on a replica returns a READONLY error to the client instead of being applied or forwarded (b, d are wrong — there's no automatic forwarding or conflict reconciliation). This has nothing to do with TTL (c).
Redis Replication SentinelDifficulty 1
What is the primary purpose of Redis Sentinel?
  • aTo shard keys across multiple Redis nodes
  • bTo compress RDB snapshots for faster transfer
  • cTo provide a Lua scripting sandbox for replicas
  • dTo monitor nodes and coordinate failover
Explanation:Sentinel monitors the health of masters and replicas, notifies other systems about state changes, and can promote a replica to master automatically when the current master is detected as down. Sharding is Redis Cluster's job, not Sentinel's (a); Sentinel doesn't compress RDB files (b) or provide a scripting sandbox (c).
Redis Replication SentinelDifficulty 1
An application reads a key from a replica right after another client wrote it to the master. The replica returns the old value. What's the most likely explanation?
  • aThe replica is misconfigured and should be treated as a bug
  • bThe replica hasn't yet applied the write due to normal asynchronous replication lag
  • cRedis replicas never receive updates for existing keys, only new keys
  • dThe master rejected the write due to a quorum failure
Explanation:Because replication is asynchronous, there's a small window where a replica hasn't yet applied a write the master already acknowledged; reading from a replica can return a value that is slightly behind the master. This is expected behavior, not a misconfiguration (a); replicas do receive updates to existing keys (c); nothing here indicates the master rejected the write (d).
Redis Replication SentinelDifficulty 1
What relationship does Redis replication set up between a master and its replicas?
  • aBidirectional — writes on either side propagate to the other
  • bNo fixed direction — whichever node has more recent data becomes the source
  • cOne-way — writes flow from the master to replicas, not the reverse
  • dIt alternates direction every time the replication backlog is rotated
Explanation:Redis replication is one-way: the master is the single source of writes, and replicas apply the stream of writes coming from it. It is not bidirectional (a) and the direction is fixed by role, not decided dynamically by recency or backlog rotation (b, d).

Test yourself against the 2475-question Database bank.

Start interview