Q.1 ____________ is the number of sentinels that need to agree to the fact that the master is not reachable and make a failover procedure promoting the slave to master.
D. Total number of servers in the cluster
Ans : Quorum
Q.2 Which is the best way to achieve persistence in Redis?
B. Fork ()
C. SAVE command
Ans : AOF
Q.3 Which is a difference between Memcached and Redis?
A. Single threaded
B. Key-value datastore
C. Used for caching
Ans : Single threaded
Q.4 Redis is widely used as a secondary database for ___________.
B. Primary Memory
D. Secondary Memory
Ans : Caching
Q.5 When using Pipelining, will the additional memory used be high?
B. Very less
D. Partially high
Ans : Yes
Q.6 Which configuration setting specifies the file to which the RDB snapshot dump is saved?
Ans : dbfilename
Q.7 Redis is single threaded.
Ans : True
Q.8 Which is the default persistence mode in Redis?
Ans : RDB
Q.9 Redis provides multi-state architecture during replication, where every instance can both read and write.
Ans : False
Q.10 redis.conf is configured for changing ____________ to connect to the Redis server.
Ans : Port
Q.11 Redis can be configured to meet different requirements by editing the configuration settings in __________.
Ans : redis.conf
Q.12 The following are all Key Value databases, except __________.
Ans : Memcached
Q.13 Which of the following set commands removes and returns members of a set?
Ans : SPOP
Q.14 _______ returns an array of values.
Ans : HGET
Q.15 _________ returns the number of elements in a set.
Ans : SCARD
Q.16 _______ sets the key to expire within the given number of seconds.
Ans : EXPIRE
Q.17 Consider “a” as a shared key among two processes, A and B.
Process A: Set a 10, INCRBY a 2, get a.
Process B: INCR a, get a.
Which of the following will be the final value for a?
Ans : 13
Q.18 Which of the following does the Redis Hashes store?
A. Length of the file
D. Key value pairs
Ans : Key value pairs
Q.19 Given is a code snippet.
127.0.0.1:6379> lpush numbers 4
127.0.0.1:6379> lpush numbers 3
127.0.0.1:6379> lpush numbers 7
127.0.0.1:6379> rpush numbers 10
127.0.0.1:6379> rpush numbers 15
127.0.0.1:6379> lpush numbers 12
Which of the following will be the output for the given code?
A. 15, 10, 7, 3, 4, 12
B. 3, 4, 7, 10, 12, 15
C. 4, 3, 7, 12, 15, 10
D. 12, 7, 3, 4, 10, 15
Ans : 12, 7, 3, 4, 10, 15
Q.20 The _________ command is used to remove the expiration from a key.
Ans : Persist
Q.21 The data structure commonly used in Redis is ____________.
Ans : Sets
Q.22 _______ sets the key to expire within the given number of seconds.
Ans : EXPIRE
Q.23 Which of the following commands returns the remaining time for the key to expire?
Ans : TTL
Q.24 The following are commands of sorted sets, except ________.
Ans : ZRANGEBYEX
Q.25 Sets are unordered collection of strings.
Ans : True