What is Redis



Redis is an open−source NoSQL database. Redis is a powerful and extremely fast in−memory database. It stores data in key−value pairs. It provides the functionality of distributed caching, where we store most frequently used data which results in quick response instead of performing a lookup into the database each time when an API request comes. It supports a rich set of data structures (lists, sets, strings, hashes, and bitmaps, etc.), also it comes with great features like builtin replication, LRU eviction, different levels of on-disk persistence and transactions.

Usage of Redis in Web Applications

The most common use cases of Redis in Web applications are it is used for User session management where we store and invalidate user sessions. It is also used for caching purposes, where we store the most frequently used data. Not only this, we can achieve the Pub/Sub (Publisher and Subscriber) mechanism through Redis, which is often used for Queues & Notifications. The generation of leader boards in the gaming app is also one of the popular use cases. Geospatial searches are another most common use case where using geospatial commands we can find the location of a user or distance between two geospatial objects, etc. To know more about Redis, its installation, its data types and commands, read out our Redis tutorial by clicking here.

Advertisements