Redis, expands to Remote Dictionary Server

  • It is a fast, open-source, in-memory key-value data store
  • Can be used as
    • a database
    • cache
    • message broker
    • queue
  • The project started by Salvatore Sanfilippo, to improve scalability of his Italian startup.
  • Redis delivers sub-millisecond response times
  • Enables millions of requests per second
  • Good for real-time applications in
    • Gaming
    • Ad-Tech
    • Financial Services
    • Healthcare
    • IoT
  • Popular choice for
    • Caching
    • session management
    • gaming
    • leaderboards
    • real-time analytics
    • geospatial
    • ride-hailing
    • chat/messaging
    • media streaming
    • pub/sub apps.

Redis in Brief

  • All Redis data resides in-memory
  • Hence, Redis avoid seek time delays
  • Can access data in microseconds.
  • Redis features
    • versatile data structures
    • high availability
    • geospatial
    • Lua scripting
    • Transactions
    • on-disk persistence
    • cluster support
    • simpler to build real-time internet scale apps.

Redis data types

  • Strings – text or binary data up to 512MB in size
  • Lists – a collection of Strings in the order they were added
  • Sets – an unordered collection of strings with the ability to intersect, union, and diff other Set types
  • Sorted Sets – Sets ordered by a value
  • Hashes – a data structure for storing a list of fields and values
  • Bitmaps – a data type that offers bit level operations
  • HyperLogLogs – a probabilistic data structure to estimate the unique items in a data set

Redis Cluster and Shard

  • A Redis shard (or a node group in the API and CLI) is a grouping of 1 to 6 related nodes.
  • A Redis (cluster mode disabled) cluster always has one shard.
  • A Redis (cluster mode enabled) cluster can have 1–90 shards.
  • A multiple node shard implements replication by have one read/write primary node and 1–5 replica nodes.
  • A Redis cluster is a logical grouping of one or more ElastiCache for Redis Shards.
  • Data is partitioned across the shards in a Redis (cluster mode enabled) cluster.
Menu