Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

Which is the best way for persistence in Redis?

AOF
Which is the default persistence mode in Redis? RDB
redis.conf is configured for changing __________ to connect to Redis
server. Port
Which of the following is not a Key Value database? MongoDB
Which one is a difference between Memcached and Redis? Single threated
Redis is single threaded. True
Which configuration setting specifies the file to which RDB snapshot dump
is saved to _______? Dbfilename
When using Pipelining, will the additional memory used be high? Yes
_________ is the number of sentinels that need to agree the fact that the
master is not reachable and make a failover procedure promoting slave to
master. Total number of servers
Redis is widely used as a secondary database for ___________. Caching
Redis provides multi-state architecture during replication where every
instance can both read and write. False
Redis can be configured to meet different requirements by editing the
configuration settings in  __________. Redis.conf

_______ sets the key to expire within the given number of seconds. Expire
_______ returns an array of values. HGET
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? 3,4,7,…wrong
___________ command will add elements to the set. SADD
Which among the following does Redis Hashes stores? Key value stores
___________ returns the number of elements in a set SCARD
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? 13
The _________ command is used to remove the expiration from a key.
Persist
Which one of the following set command removes and returns members of
a set? SPOP
Which among the following are the data structures that are commonly used
in Redis? Sets

_______ sets the key to expire within the given number of seconds. Expire
_______ configuration setting allows you set a hard upper bound on the
amount of memory that is available to a running Redis instance.
Maxmemory
Which among the following does Redis Hashes stores? Key value pairs
ZSCORE command returns the range of members in a sorted set, by score
False
Which is the type of locking where the data is not actually locked but the
users are notified and their changes are cancelled if another user is already
modifying the data? Optimistic locking
____________ gives the total number of bytes allocated by Redis.
Used_memory
_________ is used to flush the transaction queue and exit from the
transaction. Discard
In a Redis transaction, we can use ________ command to enter into the
transaction and queue the transaction commands instead of executing
them. Multi
_______ returns an array of values. HGET

Which is the type of locking where the data is not actually locked but the
users are notified and their changes are cancelled if another user is already
modifying the data? Optimistic locking
_____________ is a type of lock that allows you to limit the number of
processes that can concurrently access a resource to some fixed number.
Counting Semaphore
In a Redis transaction, we can use ________ command to enter into the
transaction and queue the transaction commands instead of executing
them. Multi
_________ is used to flush the transaction queue and exit from the
transaction. Discard

Which is the short structure that Redis provides  for the compact
representation of Sets? intset
Which among the following factors helps in calculating the number of
shards in Redis? No of keys in a single shard
---- implies the maximum allowed size of each individual element in the
data structure to be encoded to ziplist short structure. Max_ziplist_value
____________ gives the total number of bytes allocated by Redis.
Used_memory
_______ configuration setting allows you set a hard upper bound on the
amount of memory that is available to a running Redis instance.
Maxmemory
__________ is the memory eviction policy where keys are evicted by
removing the less recently used keys first, but only among keys that have
an expires set, inorder to make space for the newly added data. Volatile-
lru
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. Range Partitioning
The configuration setting in redis.conf that could be configured to the
number of samples of keys to be checked, to evict keys with the oldest
access time. Maxmemory-samples
Which is the mechanism to enforce limits on the access of a resource when
multiple threads are executed? Locking
The environment continues working even, if a slave fails! True
___________ is the technique of breaking down data into multiple parts.
Sharding
Redis string cannot hold any value beyond a length. Choose the length
from the following : 512 MB
Lists is a sequence of ___________. Ordered element
_________ is the memory policy that returns errors when the memory limit
is reached and the client is trying to execute commands that result in more
memory usage. Noeviction
_________ are used to store, retrieve and update data Commands
Which configuration setting is used to specify the memory eviction policy in
Redis? Maxmemory-policy
__________ command provides a check-and-set behavior to Redis
commands. WATCH
In-Memory database stores data in memory. True
__________ is the number of sentinels that need to agree the fact that the
master is not reachable and make a failover procedure promoting slave to
master. Quorum
The ______ command is used to set a lock in string dataset. SET
Which among the following is a benefit of Pipelining? Data as batches
____ ____ refers to an undesirable state when a system attempts to
perform two or more operations, which should, otherwise, be done in a
proper sequence to be executed correctly. Locking
__________ is the number of sentinels that need to agree the fact that the
master is not reachable and make a failover procedure promoting slave to
master. Quorum
Persistent server should be the _________ once the whole environment is
started. Master server
Redis string cannot hold any value beyond a length. Choose the length
from the following :512MB
Redis provides the output of all commands in ____________. Single step
________ is used for failover process when a master is not working,
promoting slave to master. Sentinel
_________ 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. Query routing
How many commands can be send to a server in pipelining? Multiple
Twemproxy is a proxy developed at Twitter for Redis protocol for automatic
partitioning among multiple redis instances and optional ejection of node if
it is not available. True
Which file is configured to change persistence mode? Sentinel.config
_________ is the configuration setting that tells the maximum number of
items allowed in a Hash table for ziplist encoding. Hash-max-ziplist-entries
__________ is required in distributed backend systems where cache state
needs to be maintained uniformly across the systems. Sharding
The ______ command is used to set a lock in string dataset. PSETEX
Persistent server should be the _________ once the whole environment is
started. Mastser_server
____ ____ refers to an undesirable state when a system attempts to
perform two or more operations, which should, otherwise, be done in a
proper sequence to be executed correctly. Race condition
Which among the following is a benefit of Pipelining? primary memory
________ is used for failover process when a master is not working,
promoting slave to master. sentinel

You might also like