Redis | Fresco Play
Question 1: Redis is single threaded.
Answer: True
Question 2: Redis can be configured to meet different requirements by editing the configuration settings in __.
Answer: redis.conf
Question 3: Which configuration setting specifies the file to which RDB snapshot dump is saved to _?
Answer: dbfilename
Question 4: Which of the following is not a Key Value database?
Answer: MongoDB
Question 5: _ 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.
Answer: Quorum
Question 6: When using Pipelining, will the additional memory used be high?
Answer: Yes
Question 7: Redis is widely used as a secondary database for ___.
Answer: Caching
Question 8: Which is the default persistence mode in Redis?
Answer: RDB
Question 9: Which is the best way for persistence in Redis?
Answer: AOF
Question 10: Redis provides multi-state architecture during replication where every instance can both read and write.
Answer: False
Question 11: Which one is a difference between Memcached and Redis?
Answer: Single threaded
Question 12: ___ returns the number of elements in a set
Answer: SCARD
Question 13: 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?
Answer: 12,7,3,4,10,15
Question 14: Which among the following does Redis Hashes stores?
Answer: Key value pairs
Question 15: ___ command will add elements to the set.
Answer: SADD
Question 16: 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?
Answer: 13
Question 17: _ sets the key to expire within the given number of seconds.
Answer: EXPIRE
Question 18: Which among the following are the data structures that are commonly used in Redis?
Answer: Sets
Question 19: The _ command is used to remove the expiration from a key.
Answer: Persist
Question 20: Sets are unordered collection of strings
Answer: True
Question 21: _ returns an array of values.
Answer: HGET
Question 22: Which one of the following set command removes and returns members of a set?
Answer: SPOP
Question 23: _ sets the key to expire within the given number of seconds.
Answer: EXPIRE
Question 24: _ configuration setting allows you set a hard upper bound on the amount of memory that is available to a running Redis instance.
Answer: maxmemory
Question 25: In a Redis transaction, we can use command to enter into the transaction and queue the transaction commands instead of executing them.
Answer: Multi
Question 26: _ returns an array of values.
Answer: HGET
Question 27: Which among the following does Redis Hashes stores?
Answer: Key value pairs
Question 28: 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?
Answer: Optimistic locking
Question 29: gives the total number of bytes allocated by Redis.
Answer: used_memory
Question 30: _ is used to flush the transaction queue and exit from the transaction.
Answer: Discard
Question 31: ZSCORE command returns the range of members in a sorted set, by score
Answer: False
Question 32: The _ command is used to remove the expiration from a key.
Answer: Persist
Question 33: _ is a type of lock that allows you to limit the number of processes that can concurrently access a resource to some fixed number.
Answer: Counting semaphore
Question 34: Which is the short structure that Redis provides for the compact representation of Sets?
Answer: intset
Question 35: Which among the following factors helps in calculating the number of shards in Redis?
Answer: number of keys in single shard
Question 36: =---- implies the maximum allowed size of each individual element in the data structure to be encoded to ziplist short structure.
Answer: max-ziplist-value
Question 37: Which file is configured to change persistence mode?
Answer: redis.conf
Question 38: __ is required in distributed backend systems where cache state needs to be maintained uniformly across the systems.
Answer: Centralized cache
Question 39: ___ is the technique of breaking down data into multiple parts.
Answer: Sharding
Question 40: In Redis context, senders are named as _ and receivers are named as Subscribers.
Answer: Publishers
Question 41: _ are used to store, retrieve and update data.
Answer: Commands
Question 42: _ 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.
Answer: Query routing
Question 43: __ 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.
Answer: Quorum
Question 44: __ 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.
Answer: Volatile-lru
Question 45: In-Memory database stores data in memory.
Answer: True
Question 46: Lists is a sequence of ___.
Answer: Ordered element
Question 47: __ command provides a check-and-set behavior to Redis commands.
Answer: WATCH
Question 48: The command is used to set a lock in string dataset.
Answer: SETNX
Question 49: Persistent server should be the _ once the whole environment is started.
Answer: master Server
Question 50: 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
Answer: True
Question 51: How many commands can be send to a server in pipelining?
Answer: Multiple
Question 52: 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.
Answer: Range partitioning
Question 53: In-Memory database stores data in memory.
Answer: True
Question 54: _ is the configuration setting that tells the maximum number of items allowed in a Hash table for ziplist encoding.
Answer: hash-max-ziplist-entries
Question 55: Which configuration setting is used to specify the memory eviction policy in Redis?
Answer: maxmemory-policy
Question 56: 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.
Answer: maxmemory
Question 57: Which among the following is a benefit of Pipelining?
Answer: 1. Data as batches 2. Primary memory
Question 58: Redis provides theĀ outputĀ of all commands in ____________.
Answer: Single Step
Question 59: In a key-value pair, _____ is represented by a string.
Answer: key
Question 60: Redis string cannot hold any value beyond a length. Choose the length from the following :
Answer: 512 MB
Question 61: ____ ____ 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.
Answer: Race condition
Question 62: ________ is used for failover process when a master is not working, promoting slave to master.
Answer: Sentinel
Question 63: _________ 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.
Answer: noeviction
Question 64: redis.conf is configured for changing __________ to connect to Redis server.
Answer: 1. memory 2. Key
Question 65: The environmentĀ continues working even,Ā if a slaveĀ fails!
Answer: True
Question 66: Which is the mechanism to enforce limits on the access of a resource when multiple threads are executed?
Answer: 1. PERSIST 2. EXPIRE
Question 67: The environment continues working even, if a slave fails!
Answer: True
Post a comment
Get your FREE PDF on "100 Ways to Try ChatGPT Today"
Generating link, please wait for: 60 seconds
Comments
Join the conversation and share your thoughts! Leave the first comment.