Machine Learning & Big Data Blog

Introduction To Redis

3 minute read
Jonathan Johnson

This article will introduce you to Redis. Redis is an open source data structure store that you can use as a database, cache, and message broker. It is great to use when tying microservices together, and in data streams.

Key Redis characteristics:

  • Fast
  • NoSQL database
  • Works with many environments

(This tutorial is part of our Redis Guide. Use the right-hand menu to navigate.)

What is Redis?

Redis is an in-memory database. That means all its storage is held in memory—not on a hard drive. Memory enables quick access, and quick searches, but is limited by space.

In the database architecture, Redis is usually positioned between the client and the database to relieve the load off your NoSQL database or application.

Redis is open-source software that is released under a BSD 3-cause license, a specific type of permissive free software licenses. Redis began when developer Salvatore Sanfilippo needed to improve scalability on his website. He soon open-sourced the platform. Today a core project team develops and maintains Redis, which has been sponsored by Redis Labs since 2015.

Redis use cases

Top use cases for Redis are:

  • Queues
  • Publish/subscribe (Pub/sub)
  • Real-time analytics
  • Machine learning
  • Geospatial processing
  • Leaderboards/counting
  • Session cache
  • Full page cache

Redis is desirable because its speed and ease complement the increasing use of data streams, signaled from IoT devices, and the business desire for real-time analytics. Its speed and NoSQL structure make it a good choice for both real-time processing and increasing the amounts of data and types that need to pass through it.

Redis can:

  • Decrease the load from the database or application
  • Decrease data access latency when caching
  • Quickly process a high volume, variety, and velocity of data (the 3 V’s) for machine learning
  • Pair easily with streaming solutions like Amazon Kinesis, Apache Kafka, and Google Storage

Redis works with many languages

Redis will work with many different languages, making it easily adoptable by whatever the developer is familiar with using or the language the company has adopted.

Who uses Redis?

Many companies have adopted Redis, including these big, global organizations. This list offers a look at many more companies who use Redis.

Who uses Redis?

Common Redis commands

Redis has commands available to work with its data types: Strings, hashes, lists, sets, sorted sets, bitmaps, and hyperloglogs.

These are sort of standard commands available in most languages that deal with data structures.

Strings

APPEND Appends value to key
SET Set value in a key
GET Get value in key
INCR Increment value in key

Lists

RPUSH Put new value at end of list
LPUSH Put new value at start of list
LINDEX Get an element from a list by its index
LPOP Remove the first element of the list and return it

Sets

SADD Add the given value to the set
SCARD Get the number of members in a set
SUNION Combine two or more sets and returns list of all elements
SMOVE Move a member from one set to another

Explore the rest of our Redis Guide for more detail, or check out this cheat sheet at GitHub.

Installing Redis

Ready to get started with Redis? We show you how to install Redis in our next article. Or, you can follow these links to a web page where you can look at the different download options:

Related reading

Learn ML with our free downloadable guide

This e-book teaches machine learning in the simplest way possible. This book is for managers, programmers, directors – and anyone else who wants to learn machine learning. We start with very basic stats and algebra and build upon that.


These postings are my own and do not necessarily represent BMC's position, strategies, or opinion.

See an error or have a suggestion? Please let us know by emailing blogs@bmc.com.

BMC Brings the A-Game

BMC works with 86% of the Forbes Global 50 and customers and partners around the world to create their future. With our history of innovation, industry-leading automation, operations, and service management solutions, combined with unmatched flexibility, we help organizations free up time and space to become an Autonomous Digital Enterprise that conquers the opportunities ahead.
Learn more about BMC ›

About the author

Jonathan Johnson

Jonathan Johnson is a tech writer who integrates life and technology. Supports increasing people's degrees of freedom.