Skip to content

Redis Overview

Reference

About

Redis is written in ANSI C and works on most POSIX systems like Linux, *BSD, and Mac OS X, without external dependencies. Linux and OS X are the two operating systems where Redis is developed and tested the most, and we recommend using Linux for deployment. Redis may work in Solaris-derived systems like SmartOS, but support is best effort. There is no official support for Windows builds.

Redis Data Types

  • String
  • Hash
  • List
  • Set
  • Sorted set
  • Vector set
  • Stream
  • Bitmap
  • Bitfield
  • Geospatial
  • JSON
  • Probabilistic data types
  • Time series

Strings

Redis strings are the most basic Redis data type, representing a sequence of bytes.

Lists

Redis lists are lists of strings sorted by insertion order.

Sets

Redis sets are unordered collections of unique strings that act like the sets from your favorite programming language (for example, Java HashSets, Python sets, and so on). With a Redis set, you can add, remove, and test for existence in O(1) time (in other words, regardless of the number of set elements).

Hashes

Redis hashes are record types modeled as collections of field-value pairs. As such, Redis hashes resemble Python dictionaries, Java HashMaps, and Ruby hashes.

Sorted sets

Redis sorted sets are collections of unique strings that maintain order by each string's associated score.

Vector sets

Redis vector sets are a specialized data type designed for managing high-dimensional vector data, enabling fast and efficient vector similarity search within Redis. Vector sets are optimized for use cases involving machine learning, recommendation systems, and semantic search, where each vector represents a data point in multi-dimensional space. Vector sets supports the HNSW (hierarchical navigable small world) algorithm, allowing you to store, index, and query vectors based on the cosine similarity metric. With vector sets, Redis provides native support for hybrid search, combining vector similarity with structured filters.

Streams

A Redis stream is a data structure that acts like an append-only log. Streams help record events in the order they occur and then syndicate them for processing.

Geospatial indexes

Redis geospatial indexes are useful for finding locations within a given geographic radius or bounding box.

Bitmaps

Redis bitmaps let you perform bitwise operations on strings.

Bitfields

Redis bitfields efficiently encode multiple counters in a string value. Bitfields provide atomic get, set, and increment operations and support different overflow policies.

JSON

Redis JSON provides structured, hierarchical arrays and key-value objects that match the popular JSON text file format. You can import JSON text into Redis objects and access, modify, and query individual data elements.

Probabilistic data types

These data types let you gather and calculate statistics in a way that is approximate but highly efficient.

HyperLogLog

The Redis HyperLogLog data structures provide probabilistic estimates of the cardinality (i.e., number of elements) of large sets.

Bloom filter

Redis Bloom filters let you check for the presence or absence of an element in a set.

Cuckoo filter

Redis Cuckoo filters let you check for the presence or absence of an element in a set. They are similar to Bloom filters but with slightly different trade-offs between features and performance.

t-digest

Redis t-digest structures estimate percentiles from a stream of data values.

Top-K

Redis Top-K structures estimate the ranking of a data point within a stream of values.

Count-min sketch

Redis Count-min sketch estimate the frequency of a data point within a stream of values.

Time series

Redis time series structures let you store and query timestamped data points.