Redis data types, processing engines, and capabilities

Redis provides a variety of data types, processing engines, and capabilities to support a wide range of use cases:

  • String: Sequences of bytes, including text, serialized objects, and binary arrays used for caching, counters, and bitwise operations.
  • JSON: Nested JSON documents that are indexed and searchable using JSONPath expressions and with Redis Search
  • Array: Sparse, index-addressable collection of string values
  • Hash: Field-value maps used to represent basic objects and store groupings of key-value pairs with support for hash field expiration (TTL)
  • Redis Search: Use Redis as a document database, a vector database, a secondary index, and a search engine. Define indexes for hash and JSON documents and then use a rich query language for vector search, full-text search, geospatial queries, and aggregations.
  • List: Linked lists of string values used as stacks, queues, and for queue management.
  • Set: Unordered collection of unique strings used for tracking unique items, relations, and common set operations (intersections, unions, differences).
  • Sorted set: Collection of unique strings ordered by an associated score used for leaderboards and rate limiters.
  • Vector set (beta): Collection of vector embeddings used for semantic similarity search, semantic caching, semantic routing, and Retrieval Augmented Generation (RAG).
  • Geospatial indexes: Coordinates used for finding nearby points within a given radius or bounding box.
  • Bitmap: A set of bit-oriented operations defined on the string type used for efficient set representations and object permissions.
  • Bitfield: Binary-encoded strings that let you set, increment, and get integer values of arbitrary bit length used for limited-range counters, numeric values, and multi-level object permissions such as role-based access control (RBAC)
  • Hyperloglog: A probabilistic data structure for approximating the cardinality of a set used for analytics such as counting unique visits, form fills, etc.
  • *Bloom filter: A probabilistic data structure to check if a given value is present in a set. Used for fraud detection, ad placement, and unique column (i.e. username/email/slug) checks.
  • *Cuckoo filter: A probabilistic data structure for checking if a given value is present in a set while also allowing limited counting and deletions used in targeted advertising and coupon code validation.
  • *t-digest: A probabilistic data structure used for estimating the percentile of a large dataset without having to store and order all the data points. Used for hardware/software monitoring, online gaming, network traffic monitoring, and predictive maintenance.
  • *Top-k: A probabilistic data structure for finding the most frequent values in a data stream used for trend discovery.
  • *Count-min sketch: A probabilistic data structure for estimating how many times a given value appears in a data stream used for sales volume calculations.
  • Time series: Data points indexed in time order used for monitoring sensor data, asset tracking, and predictive analytics
  • Pub/sub: A lightweight messaging capability. Publishers send messages to a channel, and subscribers receive messages from that channel.
  • Stream: An append-only log with random access capabilities and complex consumption strategies such as consumer groups. Used for event sourcing, sensor monitoring, and notifications.
  • Transaction: Allows the execution of a group of commands in a single step. A request sent by another client will never be served in the middle of the execution of a transaction. This guarantees that the commands are executed as a single isolated operation.
  • Programmability: Upload and execute Lua scripts on the server. Scripts can employ programmatic control structures and use most of the commands while executing to access the database. Because scripts are executed on the server, reading and writing data from scripts is very efficient.