Introduction to Redis

In this introductory lesson we learn what Redis is, the benefits of using Redis, the learning difficulty and prerequisites before starting this course.

If you're new to Redis, start from the beginning.

What is Redis

Redis (REmote DIctionary Server) is an in-memory, NoSQL key/value store that’s used as an application cache, message broker or quick-response database.

Redis stores data in memory, rather than on a physical disk. This allows Redis to deliver unparalleled speed, reliability and performance.

Redis provides us with multiple data structures, built-in Lua scripting, multiple levels of persistence and high availability.

What are the benefits of using Redis

Unlike other NoSQL databases such as MongoDB, Redis stores its data in the server’s main memory rather than on physical hard disks and solid-state drives.

This allows for significantly faster response times when Redis performs read and write operations and help to ensure high availability and scalability of services.

Redis allows for multiprocess task queuing, which means it can queue tasks that take web clients longer than usual to process. Redis also makes it easy to implement automated processes with Python that run in the background of request and response cycles.

While Redis is technically a key/value store like MongoDB, it’s actually a data structure server that supports multiple data types and structures like the following:

  • Binary-safe data
  • HyperLogLogs
  • Lists
  • Sets & Sorted sets
  • Hashes
  • Bitmaps
  • Unique and unsorted strings
  • Geospatial indexes
  • etc.

Redis also features native client integration capabilities for easy data interaction and manipulation. The Redis client library contains over 100 different open source clients, and developers can easily add new integrations or additional features and programming languages.

Redis has seen 350% growth in usage by enterprises. Below is short a list of common use cases that benefit enterprises working with Redis.

1. Real-time analytics

Redis can process data with sub-milisecond latency, making it ideal for real-time analytics, AI-driven machine learning processes, online advertising campaigns etc.

2. Database caching

Redis can handle large amounts of real-time data by making use of its in-memory storage capabilities to support highly responsive database constructs. Caching allows fewer database reads, which help reduce traffic.

Redis’ caching layer can scale rapidly and economically, meaning organizations are able to develop highly responsive applications while reducing expenditures.

3. Location-based applications

Redis provides geospatial indexing, sets and operations that simplifies the development of location-based applications and services. Redis uses an intelligent geo-hashing implementation and, by using sorted sets, is able to offload time-consuming seaching and the storing of location data.

That said, Redis has limited ability to create relationships between data. It’s not a replacement for relational databases like MySQL, or document-based databases like MongoDB.

Is Redis hard to learn

Overall Redis is not too complicated which makes it fairly easy to learn. Some concepts may prove to be somewhat challenging, specially if you don’t have previous experience with other database technologies.

Prerequisites

Before we proceed, please note that we make the following assumptions:

  • You know how to install software on whichever operating system you use.
  • You can create and navigate directories and files on your computer.

While this tutorial course is for beginners with no knowledge of Redis, but students coming from other NoSQL technologies like Memcached or MongoDB will also find it very helpful.

This tutorial course covers many topics of Redis, ranging from beginner concepts to advanced.