Showing posts with label Redis Interview Questions. Show all posts
Showing posts with label Redis Interview Questions. Show all posts

January 01, 2020

Part 2: Redis Interview Questions And Answers

Explain Redis Hashes data-type?
Redis Hashes are maps between string fields and string values, so they are the perfect data type to represent objects like user-details. Every hash can store up to 2³² — 1 field-value pairs (more than 4 billion).

Explain the Replication feature of Redis?
Redis supports simple master to slave replication. When a relationship is established, data from the master is transferred to the slave. Once this is done, all changes to the master replicate to the slave.

List out the operation keys of Redis?
Operation keys of Redis include: TYPE key, TTL key, KEYS pattern, EXPIRE key seconds, EXPIREAT key timestamp, EXISTS key, DEL key.

Part 1: Redis Interview Questions And Answers

What is in-memory Database?
The in-memory database is a database where it keeps the dataset in RAM. Means that for every interaction with database, you will only access the Main memory. No disk operations involved during this interaction. Hence the operation will be faster as it directly access main memory instead of any disk operation.

What is Redis?
Redis(REmote DIctionary Server) is an open source, in-memory data structure store, used as a database, cache and message broker. It supports data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs and geospatial indexes with radius queries.

It has is also referred to as a data structure server as such the keys not only contains strings, but also hashes, sets, lists, and sorted sets. Companies using Redis includes Twitter, GitHub, Weibo, Pinterest, Snapchat, Craigslist, StackOverflow, Flickretc.