liveBook · Manning

Redis Stack

As explained in Generative AI in Action

Redis Stack is a Redis distribution that bundles Redis with modules for additional data structures, search, and other capabilities.

Redis Stack packages Redis with modules that support multiple data structures, text search, secondary indexing, and vector similarity search. It can serve as a fast, multimodel data store and query engine for applications such as semantic search and retrieval workflows. section 8.2

A local Redis Stack setup typically includes:

  • A Redis Stack Docker container using the redis/redis-stack:latest image. section 8.2
  • Exposed Redis and management ports, configurable for the environment. section 8.2
  • A persistent data volume and a health check that verifies Redis responds. section 8.2
  • Docker installed and running, plus the redis-py package for Python access. section 8.2
Listing 8.1 docker-compose file for redis-stack
version: '3.7'
services:

  vector-db:
    image: redis/redis-stack:latest
    ports:
      - 6379:6379
      - 8001:8001
    environment:
      - REDISEARCH_ARGS=CONCURRENT_WRITE_MODE
    volumes:
      - vector-db:/var/lib/redis
      - ./redis.conf:/usr/local/etc/redis/redis.conf
    healthcheck:
      test: ["CMD", "redis-cli", "-h", "localhost", "-p", "6379", "ping"]
      interval: 2s
      timeout: 1m30s
      retries: 5
      start_period: 5s

volumes:
  vector-db:

Use the docker-compose configuration to start Redis Stack with persistence, exposed ports, concurrent write mode, and a readiness check. section 8.2

How Generative AI in Action covers it

How deep it goes
Explains supported structures, modules, deployment, ports, persistence, and prerequisites without detailing Docker installation.
Examples
Uses a Docker Compose file exposing ports 6379 and 8001 with a persistent volume and Redis health check.
What it assumes
Assumes Docker is installed and running, while providing the redis-py installation requirement.
What you can do after
Operate/configure Redis Stack locally through Docker Compose and prepare Python access with redis-py.
How it connects
Connects Redis with Redis Search, vector similarity search, embeddings, Docker, and multimodel data storage.

This explainer was generated by Manning's knowledge graph from the text of Generative AI in Action. The section links point to the parts of the book it draws on.