Questions on Redis Cache and Redis CLI

Questions on Redis Cache and Redis CLI

  • Redis is single threaded.

True

  • Redis can be configured to meet different requirements by editing the configuration settings in  __________.

Redis.conf

  • 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

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

False

  • Which is the default persistence mode in Redis?

RDP

  • Which one is a difference between Memcached and Redis?

Single threaded

  • Redis is widely used as a secondary database for ___________.

Caching

  • Which is the best way for persistence in Redis?

AOF

  • 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?

PartialHigh

  • Sets are unordered collection of strings

True

  • _______ returns an array of values.

HMGET

  • _______ 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

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

SPOP

  • The _________ command is used to remove the expiration from a key.

PERSIST

  • _____SADD______ command will add elements to the set.
  • Which among the following does Redis Hashes stores?

Key value pairs

  • ____________ gives the total number of bytes allocated by Redis.

Used_memory

  • _______ sets the key to expire within the given number of seconds.

EXPIRE

  • _________ 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

  • Which among the following does Redis Hashes stores?

Key valye pair

  • 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

  • What 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

  • what implies the maximum allowed size of each individual element in the data structure to be encoded to ziplist short structure.

hash-maxziplist-entries

  • which 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 factors helps in calculating the number of shards in Redis?

Number of keys in single shard

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

Maxmemory-policy

  • Lists is a sequence of ?

Ordered element

  • ________ is used for failover process when a master is not working, promoting slave to master.

Quorum

  • Redis provides the output of all commands in ?

Single step

  • _________ 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

  • Which command is used to set a lock in string dataset.

SETEX

  • what are used to store, retrieve and update data.

Commands

  • in a key-value pair what is represented by a string in redis

Value

  • how many commands can be send to a server in pipelining in redis

Single

  • _________ 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

  • ___________ is the technique of breaking down data into multiple parts.

sharding

  • What is the maximum value size you can store in redis?

512mb

  • Which among the following is a benefit of Pipelining?

Speed

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

centralized cache

  • __________ 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

  • Which command provides a check-and-set behavior to Redis commands.

Watch

  • ________ is used for failover process when a master is not working, promoting slave to master.

sentinel

  • 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-policy

Leave A Comment?