Redis Multiple choice question Answer


Hello friends in this post we are going to discuss about Redis Multiple choice question with answer which will help you to crack any exam for TCS Fresco Play | Redis TCS Exam Dumps with answer

Q1.Redis is single threaded.

ANS – True

Q2.Redis can be configured to meet different requirements by editing the configuration settings in __.

Ans – redis.conf

Q3.Which configuration setting specifies the file to which RDB snapshot dump is saved to _?

ANS – dbfilename

Q4.Which of the following is not a Key Value database?

ANS – MongoDB

Q5._ 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.

ANS – Quorum

Q6.When using Pipelining, will the additional memory used be high?

ANS – Yes

Q7.Redis is widely used as a secondary database for _.

ANS – Caching

Q8.Which is the default persistence mode in Redis?

ANS – RDB

Q9.Which is the best way for persistence in Redis?

ANS – AOF

Q10.Redis provides multi-state architecture during replication where every instance can both read and write.

ANS – FALSE

Q11.Which one is a difference between Memcached and Redis?

ANS – Single threaded

Q12._ returns the number of elements in a set

ANS – SCARD

Q13.Which among the following does Redis Hashes stores?

ANS – Key value pairs

Q14._ command will add elements to the set.

ANS – SADD

Q15._ sets the key to expire within the given number of seconds.

ANS – EXPIRE

Q16.Which among the following are the data structures that are commonly used in Redis?

ANS – Sets

Q17.The _ command is used to remove the expiration from a key.

ANS – Persist

Q18.Sets are unordered collection of strings

ANS – True

Q19._ returns an array of values.

ANS – HGET

Q20.Which one of the following set command removes and returns members of a set?

ANS – SPOP

Q21._ sets the key to expire within the given number of seconds.

ANS – EXPIRE

Q22._ configuration setting allows you set a hard upper bound on the amount of memory that is available to a running Redis instance.

ANS – maxmemory

Q23.In a Redis transaction, we can use command to enter into the transaction and queue the transaction commands instead of executing them.

ANS – Multi

Q24._ returns an array of values.

ANS – HGET

Q25.Which among the following does Redis Hashes stores?

ANS – Key value pairs

Q26.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?

ANS – Optimistic locking


Q27.___________gives the total number of bytes allocated by Redis.

ANS – used_memory

Q28._ is used to flush the transaction queue and exit from the transaction.

ANS – Discard

Q29.ZSCORE command returns the range of members in a sorted set, by score

ANS – False

Q30.The _______ command is used to remove the expiration from a key.

ANS – Persist

Q31.______ is a type of lock that allows you to limit the number of processes that can concurrently access a resource to some fixed number.

ANS – Counting semaphore

Q32.Which is the short structure that Redis provides for the compact representation of Sets?

ANS – intset

Q33.Which among the following factors helps in calculating the number of shards in Redis?

ANS – number of keys in single shard

Q34.—- implies the maximum allowed size of each individual element in the data structure to be encoded to ziplist short structure.

ANS – max-ziplist-value

Q35.Which file is configured to change persistence mode?

ANS – redis.conf

Q36.__ is required in distributed backend systems where cache state needs to be maintained uniformly across the systems.

ANS – Centralized cache

Q37._ is the technique of breaking down data into multiple parts.

ANS – Sharding

Q38.In Redis context, senders are named as _ and receivers are named as Subscribers.

ANS – Publishers

Q39._ are used to store, retrieve and update data.

ANS – Commands

Q40._ 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.

ANS – Query routing

Q41.__ 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.

ANS – Volatile-lru

Q42.In-Memory database stores data in memory.

True

Q43.Lists is a sequence of _.

ANS – Ordered element

Q44.__ command provides a check-and-set behavior to Redis commands.

ans – WATCH

Q45._______command is used to set a lock in string dataset.

ANS – SETNX

Q46.Persistent server should be the _ once the whole environment is started.

ANS – master Server

Q47.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

ANS – True

Q48.How many commands can be send to a server in pipelining?

ANS – Multiple

Q49.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.

ANS – Range partitioning

Q50.In-Memory database stores data in memory.

ANS – True

Q51._______________is the configuration setting that tells the maximum number of items allowed in a Hash table for ziplist encoding.

ANS – hash-max-ziplist-entries

Q52.Which configuration setting is used to specify the memory eviction policy in Redis?

ANS – maxmemory-samples


Leave a Reply

Your email address will not be published. Required fields are marked *