Get startedGet started for free

Redis case study

1. Redis case study

In this final lesson of chapter one, we will cover the case study of Editoo, a company that uses the Redis database.

2. Redis - overview

Redis stands for Remote Dictionary Server. It is one of the most popular key-value databases, but it offers more features than a basic key-value database. Redis is a fast in-memory data structure store. It works with an in-memory dataset to achieve maximum performance, but it additionally allows to persist the data to disk. It can be used as a database, cache, or message broker. Redis is open source. Redis Labs, the company that sponsors the Redis database, has more than 400 employees.

3. Redis - data structures

Redis supports many data structures, which allows users to use Redis in more ways than a simple key-value database. Let's see some examples. Strings are the simplest type of value. In this example, with the SET command, we are setting the string "Ann" as a value for the key "name". We can create lists of elements. Here, we can see how to add the numbers 1, 2, and 3 to the right of a list called "my_numbers". Sets are unordered collections of strings. With the SADD command we can add these numbers to this set. We can also perform some operations such as the intersection, union or difference between multiple sets, etc. Hashes are collections of field-value pairs. In this example they key is user 123, and the hash has two field-value pairs, "name Ann", and "surname Smith". There are more data structures. For a deeper understanding of them and their commands,

4. Redis - data structures

please consult the official Redis documentation.

5. Redis - features

Redis supports atomic operations on these types. An atomic operation means that the operation is guaranteed to either complete fully or not at all. Redis also supports transactions, allowing the execution of a group of commands. Either all of the commands or none are processed. For complex operations, we can write scripts using the Lua programming language. We can use Redis from most programming languages, like Python, R, C#, Java, JavaScript, PHP, and much more. Redis also offers by default asynchronous replication; that is, the data is first copied to the primary storage and then copied to the replica.

6. Redis - popular uses

These are some popular uses of Redis. Redis is often used for caching, for example, query results or objects frequently used, such as images or files. It is also used for session storage, for instance, to store user profiles, credentials, etc. Other common uses are chatting, messaging, and queues. Redis can be used in chat rooms, real-time comments, social media feeds, etc. Real-time analytics, like social media analytics or advertisement, are also popular uses. Redis can be helpful with gaming leaderboards, displaying ranked lists in real-time with user scores.

7. Redis - on the cloud

Some established cloud providers offer services packaged with Redis. For example, Amazon Web Services offers Elasticache for Redis, Microsoft offers Azure Cache for Redis in Azure, and Alibaba is offering ApsaraDB for Redis in Alibaba Cloud.

8. Redis - customers

Here are a few Redis customers.

9. Editoo case study

One company that uses Redis is Editoo. Editoo is a small business that sells an online tool to create custom magazines for either personal or business goals. Editoo began having high latency because more people started using its web application. The company used a traditional relational database management system that couldn't handle that increase in traffic. Editoo decided to use Redis to store its user sessions and caching database queries.

10. Editoo case study

Thanks to Redis, the company has seen a reduction in downtime and a higher performance. Following this first success, Editoo decided to migrate more of its relational databases to Redis.

11. Editoo case study

You can find more case studies of Redis on the link below.

12. Let's practice!

Let's check you understand the reasons why Editoo is using Redis!