Professional Documents
Culture Documents
Redis
Redis
True
Redis can be configured to meet different requirements by editing the configuration
settings in __.
redis.conf
Which configuration setting specifies the file to which RDB snapshot dump is saved
to _?
dbfilename
Which of the following is not a Key Value database?
MongoDB
_ 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
When using Pipelining, will the additional memory used be high?
Yes
Redis is widely used as a secondary database for ___.
Caching
Which is the default persistence mode in Redis?
RDB
Which is the best way for persistence in Redis?
AOF
Redis provides multi-state architecture during replication where every instance can
both read and write.
False
Which one is a difference between Memcached and Redis?
Single threaded
----------------------------------
___ returns the number of elements in a set
SCARD
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?
12,7,3,4,10,15
Which among the following does Redis Hashes stores?
Key value pairs
___ command will add elements to the set.
SADD
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
_ sets the key to expire within the given number of seconds.
EXPIRE
Which among the following are the data structures that are commonly used in Redis?
Sets
The _ command is used to remove the expiration from a key.
Persist
Sets are unordered collection of strings
True
_ returns an array of values.
HGET
Which one of the following set command removes and returns members of a set?
SPOP
---------------------------------------------------------------
_ 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
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 among the following does Redis Hashes stores?
Key value pairs
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
ZSCORE command returns the range of members in a sorted set, by score
False
The _ command is used to remove the expiration from a key.
Persist
-----------------------------------------------------
_ 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
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?
number of keys in 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
----------------------------------------
In Redis context, senders are named as _ and receivers are named as Subscribers.
Publishers
__ 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
_ is the configuration setting that tells the maximum number of items allowed in a
Hash table for ziplist encoding.
hash-max-ziplist-entries
Which configuration setting is used to specify the memory eviction policy in Redis?
maxmemory-samples
flushdb
maxmemory-policy
max-memory xx
maxmemory xx
maxmemory-samples
Data as batches xx
Less Commands
Primary memory
Speed