Chapter 6. Common Pitfalls (Avoiding Traps)

In this chapter, we will describe some common pitfalls when using Redis, including keys without a namespace, using an inappropriate data type to solve a problem, and commands that should not be executed in production. Some of these examples are based on previous experience at Yipit (www.yipit.com) as well as other companies.

The wrong data type for the job

When we learn about a new feature of a tool, we often unconsciously try to apply it to our current set of problems. Many times, there is nothing wrong with this, but that's not always the case with Redis.

At Yipit, we used to store all deals that were going to be sent to users in a Redis Set. Although the solution worked, developers thought it was memory-inefficient ...

Get Redis Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.