Redis Best Practices

Indexing Patterns

Conceptually, Redis is based on the key-value database paradigm. Every piece of data is associated with a key, either directly or indirectly. If you want to retrieve data based on anything besides the key, you’ll need to implement an index that leverages one of the many data types available in Redis.

Indexing in Redis is quite different from other databases, as your particular usage and data will determine the best strategy for indexing. In this section, we’ll explore some of the more common strategies for finding data beyond simple key-value retrieval: