Q.1 _________ is used to flush the transaction queue and exit from the transaction.
Ans : Discard
Q.2 Which of the following does the Redis Hashes store?
B. Key value pairs
C. Length of the file
Ans : Key value pairs
Q.3 _____________ is a type of lock that allows you to limit the number of processes that can concurrently access a resource to some fixed number.
A. Lock with timeouts
B. Optimistic locking
C. Counting semaphore
D. Distributed locking
Ans : Counting semaphore
Q.4 In a Redis transaction, we can use ________ command to enter into the transaction and queue the transaction commands instead of executing them.
Ans : Multi
Q.5 ZSCORE command returns the range of members in a sorted set, by score.
Ans : False
Q.6 Which of the following commands returns the remaining time for the key to expire?
Ans : TTL
Q.7 Which of the following commands is used to post the message to the channel?
C. All the options
Ans : PUBLISH
Q.8 Which is the short structure that Redis provides for the compact representation of Sets?
Ans : intset
Q.9 ________ implies the maximum allowed size of each individual element in the data structure to be encoded to ziplist short structure.
Ans : max-ziplist-value
Q.10 Which among the following factors helps in calculating the number of shards in Redis?
A. Number of keys in a single shard
B. Number of keys in multiple shards
C. Partition key
D. Hash data structure
Ans : Number of keys in a single shard
Q.11 _________ is the memory policy that returns errors when the memory limit is reached, and the client is trying to execute commands that result in higher memory usage.
Ans : noeviction
Q.12 Which configuration setting is used to specify the memory eviction policy in Redis?
Ans : maxmemory-policy
Q.13 Which among the following is a benefit of Pipelining?
A. Less commands
B. Data as batches
D. Primary memory
Ans : Speed
Q.14 Twemproxy is a proxy developed at Twitter for Redis protocol for automatic partitioning among multiple Redis instances and optional ejection of the node if it is not available.
Ans : True
Q.15 Consider an example where a range of users from 0 to 10000 goes to a Redis instance R0, and another range of users 10001 to 20000 goes to R1. This is _________ partitioning.
A. Hash partitioning
B. Range partitioning
C. Client partitioning
Ans : Range partitioning
Q.16 How many commands can be sent to a server in pipelining?
Ans : Multiple
Q.17 Which is the mechanism to enforce limits on the access of a resource when multiple threads are executed?
Ans : Locking
Q.18 _________ is an implementation of partitioning where you can send your query to a random instance, and the instance will forward your query to the right node.
A. Query routing
B. Proxy assisted partitioning
C. Client side partitioning
Ans : Query routing
Q.19 _________ is the configuration setting that tells the maximum number of items allowed in a Hash table for ziplist encoding.
Ans : hash-max-ziplist-entries
Q.20 The ____________ command is used to set a lock in string dataset.
Ans : SETNX
Q.21 The persistent server should be the _________ once the whole environment is started.
A. Master Server
C. Primary memory
D. Secondary storage
Ans : Master Server
Q.22 In-Memory database stores data in the memory.
Ans : True
Q.23 _________ is required in the distributed backend systems where cache state needs to be maintained uniformly across the systems.
C. Centralized cache
Ans : Centralized cache
Q.24 ____________ is the memory eviction policy where keys are evicted by removing the less recently used keys first but only among keys that have an ‘expire’ field set, to make space for the newly added data.
Ans : Volatile-lru
Q.25 _________ is the technique of breaking down data into multiple parts.
Ans : Sharding
Q.26 List is a sequence of ___________.
A. Ordered element
C. Unordered element
D. Linked List
Ans : Ordered element
Q.27 In a key-value pair, _________ is represented by a string.
Ans : Value
Q.28 Redis string cannot hold any value beyond a certain length. What is it?
A. 5 GB
B. 512 MB
C. 1 GB
D. 256 MB
Ans : 512 MB
Q.29 The environment continues to work even if a slave fails.
Ans : True