Skip to content
What's new in Valkey 9.0? Discover new features and improvements. Read the announcement.

Data types

Valkey is a data structure server. At its core, Valkey provides a collection of native data types that help you solve a wide variety of problems, from caching to queuing to event processing. Below is a short description of each data type, with links to broader overviews and command references.

If you’d like to try a comprehensive tutorial for each data structure, see their overview pages below.

Strings are the most basic Valkey data type, representing a sequence of bytes. For more information, see:

Lists are lists of strings sorted by insertion order. For more information, see:

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 Set, you can add, remove, and test for existence in O(1) time (in other words, regardless of the number of set elements). For more information, see:

Hashes are record types modeled as collections of field-value pairs. As such, Hashes resemble Python dictionaries, Java HashMaps, and Ruby hashes. For more information, see:

Sorted Sets are collections of unique strings that maintain order by each string’s associated score. For more information, see:

A 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. For more information, see:

Geospatial indexes are useful for finding locations within a given geographic radius or bounding box. For more information, see:

Bitmaps let you perform bitwise operations on strings. For more information, see:

Bitfields efficiently encode multiple counters in a string value. Bitfields provide atomic get, set, and increment operations and support different overflow policies. For more information, see:

The HyperLogLog data structures provide probabilistic estimates of the cardinality (i.e., number of elements) of large sets. For more information, see:

Bloom filters are a space efficient probabilistic data structure that allows adding elements and checking if item/s are definitely not present, or if there is a possibility they exist (with the configured false positive rate).

The Bloom filter data type / command support is provided by the valkey-bloom module. For more information, see:

To extend the features provided by the included data types, use one of these options:

  1. Write your own custom server-side functions in Lua.
  2. Write your own Valkey module using Modules Introduction and Modules API.