{
 "kind": "api",
 "slug": "redis",
 "path": "apis/redis/",
 "name": "Redis",
 "logo": "https://agentgid.com/media/avatars/redis.png",
 "maker": null,
 "density": "full",
 "crumbs": [
  [
   "APIs",
   "apis/"
  ],
  [
   "Databases and backends",
   "apis/backend-db/"
  ]
 ],
 "lead": "Very fast memory storage for caches and sessions.",
 "chips": [
  {
   "label": "Databases and backends",
   "path": "apis/backend-db/"
  }
 ],
 "primary": {
  "label": "Copy prompt for your agent",
  "copy": "Add Redis to my Node.js server as a cache: pin redis@6.3.1, read REDIS_URL (rediss://...) from .env, attach an error listener, set an expiry on every cached key, fall back to the database when Redis is unreachable, and close the client with close() on shutdown."
 },
 "links": [
  {
   "label": "Website",
   "href": "https://redis.io"
  },
  {
   "label": "Pricing",
   "href": "https://redis.io/pricing/"
  },
  {
   "label": "GitHub",
   "href": "https://github.com/redis/node-redis"
  }
 ],
 "track": "Outages, price changes and new versions on your dashboard",
 "verdicts": [
  {
   "key": "price",
   "label": "Price",
   "value": "Open source",
   "status": "yes",
   "sub": "Run it yourself for free",
   "quote": null,
   "note": "Free tier: Up to 30 MB. As reported on the official pricing page, checked Oct 9, 2026.",
   "src": "https://redis.io/pricing/"
  },
  {
   "key": "commercial",
   "label": "Commercial use",
   "value": "With conditions",
   "status": "cond",
   "sub": null,
   "quote": "If you are building a solution that leverages Redis, but does not specifically compete with Redis itself, there is no impact.",
   "note": "Using Redis (Cloud or self-hosted) as your app's data store is fine; offering Redis itself as a competing hosted service is restricted under RSALv2 and SSPLv1.",
   "src": "https://redis.io/legal/licenses/"
  },
  {
   "key": "key",
   "label": "Key & sign-up",
   "value": "API key, server only",
   "status": "info",
   "sub": "Env var none read by node-redis (pass url to createClient); the Redis MCP server reads REDIS_HOST, REDIS_PORT and REDIS_USERNAME",
   "quote": null,
   "note": "Username and password of a database user (Redis Cloud gives a \"default\" user), usually inside the connection URL redis[s]://user:password@host:port. The separate Redis Cloud management API uses its own keys and is off by default.",
   "src": "https://redis.io/docs/latest/operate/rc/rc-quickstart/"
  },
  {
   "key": "agent",
   "label": "Agent access",
   "value": "Docs for agents",
   "status": "info",
   "sub": "llms.txt · SDK",
   "quote": "Redis MCP is a general-purpose implementation that lets agents read, write, and query data in Redis and also has some basic commands to manage the Redis server.",
   "note": "The docs use @latest; pin a version in real setups. Our agent check: 3 of 6 (Nov 13, 2026).",
   "src": "https://redis.io/docs/latest/integrate/redis-mcp/"
  }
 ],
 "vfoot": "Checked against the maker's official pages, pricing on Oct 9, 2026.",
 "blocks": [
  {
   "id": "overview",
   "nav": "Overview",
   "h2": "What Redis does",
   "parts": [
    {
     "t": "prose",
     "text": "Redis is a database that keeps data in memory, so reads and writes take a fraction of a millisecond. Apps use it to remember things for a short time, such as cached pages, login sessions, counters, leaderboards and job queues. You can use Redis Cloud, run by the Redis company with a free 30 MB database, or run the open-source server yourself."
    },
    {
     "t": "list",
     "items": [
      "Redis is one of 29 APIs in the Databases and backends category on AgentGid.",
      "Its cheapest paid plan ($5 a month) is the 1st cheapest of the 18 here with a monthly plan.",
      "It is one of 26 that can be started for free.",
      "8 of them ship an official MCP server; Redis does not.",
      "Its official SDK is the 3rd most downloaded in the category (22.3M a week)."
     ],
     "muted": true
    },
    {
     "t": "h3",
     "text": "What people build with it"
    },
    {
     "t": "uses",
     "items": [
      {
       "title": "Cache slow pages and lookups",
       "text": "Keep the result of a slow database query or outside service in memory, so the next visitor gets it instantly.",
       "idea": false
      },
      {
       "title": "Login sessions",
       "text": "Store each signed-in user's session data, so any of your servers can check who is logged in.",
       "idea": false
      },
      {
       "title": "Game and contest leaderboards",
       "text": "Keep players sorted by score as points change, and show the top ten or a player's rank at any moment.",
       "idea": false
      },
      {
       "title": "Limit requests per user",
       "text": "Count how many requests each user or address made in the last minute and slow down anyone who sends too many.",
       "idea": false
      },
      {
       "title": "Background job queues",
       "text": "Put slow work such as sending emails or resizing images in a queue, and let a worker process it outside the web request.",
       "idea": false
      },
      {
       "title": "Memory and search for AI features",
       "text": "Store text embeddings and find the most similar ones, for example to reuse an earlier answer to a similar question.",
       "idea": false
      }
     ]
    }
   ]
  },
  {
   "id": "popularity",
   "nav": "Popularity",
   "h2": "Redis popularity",
   "parts": [
    {
     "t": "stats",
     "items": [
      {
       "n": "20.7M",
       "l": "SDK downloads a week",
       "d": "+27.1% on the 4-week average",
       "up": true
      },
      {
       "n": "159",
       "l": "public agent repos use its SDK"
      },
      {
       "n": "17.6K",
       "l": "GitHub stars, redis/node-redis"
      }
     ]
    },
    {
     "t": "small",
     "text": "SDK downloads from npm and PyPI, weekly. Numbers as of Nov 17, 2026."
    }
   ]
  },
  {
   "id": "pricing",
   "nav": "Pricing and limits",
   "h2": "Pricing",
   "parts": [
    {
     "t": "rows",
     "rows": [
      {
       "l": "Free tier",
       "v": "Up to 30 MB"
      },
      {
       "l": "Cheapest plan",
       "v": "$5 a month"
      },
      {
       "l": "Usage price",
       "v": "$0.007 per hour (Essentials), $0.014 per hour (Pro)"
      },
      {
       "l": "Plans",
       "v": "Added automatically: its SDK was in 73 of the public agent repos we sampled when it was added; integrations in LangChain, LlamaIndex. Prices read from the official pricing page. Redis 8 and later is tri-licensed: RSALv2, SSPLv1 or AGPLv3 at your choice (LICENSE.txt); Redis 7.2 and earlier are BSD-3."
      }
     ]
    },
    {
     "t": "h3",
     "text": "What one action costs"
    },
    {
     "t": "table",
     "head": [
      "Action",
      "Price"
     ],
     "num": true,
     "rows": [
      [
       "1 hour of a Redis Cloud Essentials database (smallest size, about $5 a month)",
       "$0.007"
      ],
      [
       "1 hour of a Redis Cloud Pro deployment (minimum $200 a month)",
       "$0.014"
      ]
     ]
    },
    {
     "t": "more",
     "items": [
      {
       "title": "Price history",
       "items": [
        "A year of the pricing page in the Internet Archive (12 months): the lowest monthly figure went from $5 (2025-10) to $5 (2026-10)."
       ]
      }
     ]
    },
    {
     "t": "small",
     "text": "As reported on the official pricing page, checked Oct 9, 2026. Prices change: confirm before you buy.",
     "link": "redis.io/pricing",
     "href": "https://redis.io/pricing/"
    }
   ]
  },
  {
   "id": "limits",
   "nav": null,
   "spy_as": "pricing",
   "h2": "Limits",
   "parts": [
    {
     "t": "rows",
     "rows": [
      {
       "l": "Free",
       "v": "30 MB, one database, shared deployment",
       "src": "https://redis.io/pricing/"
      },
      {
       "l": "Essentials",
       "v": "250 MB to 100 GB, one database, shared deployment",
       "src": "https://redis.io/pricing/"
      },
      {
       "l": "Pro",
       "v": "Unlimited memory and multiple databases on a dedicated deployment",
       "src": "https://redis.io/pricing/"
      }
     ]
    },
    {
     "t": "small",
     "text": "From the official docs.",
     "link": "redis.io/pricing",
     "href": "https://redis.io/pricing/"
    }
   ]
  },
  {
   "id": "access",
   "nav": "Access and terms",
   "h2": "Key and access",
   "parts": [
    {
     "t": "rows",
     "rows": [
      {
       "l": "How it signs in",
       "v": "Username and password of a database user (Redis Cloud gives a \"default\" user), usually inside the connection URL redis[s]://user:password@host:port. The separate Redis Cloud management API uses its own keys and is off by default."
      },
      {
       "l": "Environment variable",
       "v": "none read by node-redis (pass url to createClient); the Redis MCP server reads REDIS_HOST, REDIS_PORT and REDIS_USERNAME",
       "code": true
      },
      {
       "l": "Safe in browser code",
       "v": "No, keep it on your server",
       "status": "no"
      },
      {
       "l": "Card at sign-up",
       "v": "Not stated on the pages we read"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Steps only a person can do"
    },
    {
     "t": "list",
     "items": [
      "Sign up for Redis Cloud, create the free database and pick the cloud provider and region. Read the public endpoint and the default user's password, and store them as REDIS_URL=rediss://default:<password>@<endpoint> in .env.",
      "When the data grows past 30 MB or needs an uptime guarantee, choose a paid Essentials or Pro plan and add payment. No code change if the endpoint stays the same; otherwise update REDIS_URL."
     ]
    }
   ]
  },
  {
   "id": "terms",
   "nav": null,
   "spy_as": "access",
   "h2": "Commercial use and your data",
   "parts": [
    {
     "t": "prose",
     "text": "Redis Cloud is a paid online service with a free tier. From version 8 the Redis server lets you pick one of three licenses, one of them open source. Using it inside your own app is fine, but selling Redis itself as a hosted service is restricted. The official client libraries are MIT."
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "In a paid app",
       "v": "With conditions",
       "status": "cond",
       "sub": "Using Redis (Cloud or self-hosted) as your app's data store is fine; offering Redis itself as a competing hosted service is restricted under RSALv2 and SSPLv1.",
       "quote": "If you are building a solution that leverages Redis, but does not specifically compete with Redis itself, there is no impact.",
       "src": "https://redis.io/legal/licenses/"
      },
      {
       "l": "inside-app-bundle",
       "v": "With conditions",
       "status": "cond",
       "sub": "The official clients (node-redis, redis-py) are MIT; keep the license notice.",
       "quote": "MIT License Copyright (c) 2022-2023, Redis, inc.",
       "src": "https://github.com/redis/node-redis/blob/master/LICENSE"
      },
      {
       "l": "redistribute-files",
       "v": "With conditions",
       "status": "cond",
       "sub": "Redis 8+ server code may be shared under the AGPLv3 option, which requires releasing your changes' source.",
       "quote": "AGPLv3 is a copyleft license.",
       "src": "https://redis.io/legal/licenses/"
      },
      {
       "l": "Where data is stored",
       "v": "AWS, Google Cloud or Azure regions you choose; Essentials is offered in fewer regions than Pro.",
       "quote": "Your choice of cloud provider and region may affect latency between your application and your database, and may affect what connectivity options are available for your database.",
       "src": "https://redis.io/docs/latest/operate/rc/supported-regions/"
      }
     ]
    }
   ]
  },
  {
   "id": "errors",
   "nav": null,
   "spy_as": "access",
   "h2": "Errors to handle",
   "parts": [
    {
     "t": "rows",
     "rows": [
      {
       "l": "ECONNREFUSED / ECONNRESET / ETIMEDOUT",
       "v": "The client cannot reach Redis, the connection dropped, or a command timed out.",
       "sub": "Retry with backoff, or fall back to the main database for cache reads."
      },
      {
       "l": "WRONGTYPE",
       "v": "A command was used on a key that holds a different kind of value.",
       "sub": "Fix the code or the key naming; do not retry."
      },
      {
       "l": "OOM command not allowed",
       "v": "The database reached its memory limit and refuses writes.",
       "sub": "Set expiries, choose an eviction policy, or move to a larger plan."
      },
      {
       "l": "LOADING / BUSY / TRYAGAIN",
       "v": "Redis is starting up and loading data, or is temporarily busy.",
       "sub": "Retry with backoff, a limited number of times."
      }
     ]
    }
   ]
  },
  {
   "id": "agent",
   "nav": "For agents",
   "h2": "Use it from an agent",
   "parts": [
    {
     "t": "rows",
     "rows": [
      {
       "l": "Our agent check",
       "v": "3 of 6: llms.txt yes, OpenAPI no, SDK yes, MCP no, status page no, AI assistants allowed yes",
       "sub": "Checked Nov 13, 2026."
      },
      {
       "l": "MCP server",
       "v": "Redis MCP server (redis-mcp-server)",
       "sub": "uvx --from redis-mcp-server@latest redis-mcp-server --url redis://localhost:6379/0"
      },
      {
       "l": "npm",
       "v": "npm install redis",
       "code": true
      }
     ]
    }
   ]
  },
  {
   "id": "alternatives",
   "nav": "Alternatives",
   "h2": "Alternatives",
   "parts": [
    {
     "t": "alts",
     "items": [
      {
       "name": "Redis",
       "me": true,
       "facts": [
        "Free (open source)",
        "Free tier"
       ]
      },
      {
       "name": "Upstash Redis",
       "why": "Pick Upstash Redis when you want a managed Redis with global replication and vector search, reachable from serverless and edge code.",
       "path": "apis/upstash/",
       "facts": [
        "from $0.03 per GB bandwidth",
        "Free tier"
       ]
      },
      {
       "name": "MongoDB Atlas",
       "why": "Pick MongoDB Atlas when you need a managed database for your main app data rather than a fast in-memory store.",
       "path": "apis/mongodb/",
       "facts": [
        "from $0.08/hour",
        "Free tier"
       ]
      },
      {
       "name": "DuckDB",
       "why": "Pick DuckDB when you need analytics over CSV or Parquet files on one machine, with no server at all.",
       "path": "apis/duckdb/",
       "facts": [
        "Free (open source)",
        "No free tier"
       ]
      }
     ],
     "more": "All databases and backends APIs",
     "more_path": "apis/backend-db/"
    }
   ]
  },
  {
   "id": "start",
   "nav": "Get started",
   "h2": "Get started",
   "parts": [
    {
     "t": "prompt",
     "text": "Add Redis to my Node.js server as a cache: pin redis@6.3.1, read REDIS_URL (rediss://...) from .env, attach an error listener, set an expiry on every cached key, fall back to the database when Redis is unreachable, and close the client with close() on shutdown."
    },
    {
     "t": "steps",
     "items": [
      {
       "text": "Create a free Redis Cloud database (choose the cloud and region), then copy its endpoint and the password of the \"default\" user from the Security section; or run Redis Open Source locally.",
       "code": null,
       "src": "https://redis.io/docs/latest/operate/rc/rc-quickstart/"
      },
      {
       "text": "Install the official Node.js client.",
       "code": "npm install redis",
       "src": "https://redis.io/docs/latest/develop/clients/nodejs/"
      },
      {
       "text": "Connect with a connection URL and store a value (official example).",
       "code": "import { createClient } from 'redis';\n\nconst client = createClient({ url: 'redis://alice:foobared@awesome.redis.server:6380' });\nclient.on('error', err => console.log('Redis Client Error', err));\nawait client.connect();\n\nawait client.set('key', 'value');\nconst value = await client.get('key');",
       "src": "https://redis.io/docs/latest/develop/clients/nodejs/connect/"
      }
     ]
    },
    {
     "t": "h3",
     "text": "First request"
    },
    {
     "t": "tabs",
     "label": "First request",
     "items": [
      {
       "tab": "Request",
       "code": "import { createClient } from 'redis';\n\nconst client = createClient();\nclient.on('error', err => console.log('Redis Client Error', err));\nawait client.connect();\n\nawait client.hSet('user-session:123', {\n    name: 'John',\n    surname: 'Smith',\n    company: 'Redis',\n    age: 29\n})\nlet userSession = await client.hGetAll('user-session:123');\nconsole.log(JSON.stringify(userSession, null, 2));",
       "intro": "Redis is reached through a client library over its own protocol, not over HTTP; this is the official node-redis example (localhost, port 6379)."
      },
      {
       "tab": "Response",
       "code": "{\n  \"surname\": \"Smith\",\n  \"name\": \"John\",\n  \"company\": \"Redis\",\n  \"age\": \"29\"\n}"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Mistakes to avoid"
    },
    {
     "t": "mistakes",
     "items": [
      {
       "dont": "Creating a client without an \"error\" listener.",
       "fix": "Always add client.on('error', ...) before connect().",
       "why": "Without a handler, a dropped connection becomes an unhandled error that can stop the process."
      },
      {
       "dont": "Calling client.quit() or client.disconnect() from older node-redis examples.",
       "fix": "Use client.close() for a clean shutdown and client.destroy() to drop the connection at once.",
       "why": "In node-redis v5 and later quit() is replaced and disconnect() was renamed."
      },
      {
       "dont": "Expecting numbers back from hGetAll or get.",
       "fix": "Convert values after reading, for example Number(session.age).",
       "why": "Redis returns stored values as strings; the docs example stores age 29 and reads back \"29\"."
      },
      {
       "dont": "Letting the app fail when the cache is down.",
       "fix": "Catch connection errors (ECONNREFUSED, ECONNRESET, ETIMEDOUT) and read from the main database instead.",
       "why": "The Redis docs recommend graceful degradation for connection errors."
      },
      {
       "dont": "Putting the Redis connection URL with its password in front-end code or a public repository.",
       "fix": "Keep REDIS_URL in server-side environment variables only.",
       "why": "The database password lets anyone read and change all data."
      }
     ]
    }
   ]
  },
  {
   "id": "faq",
   "nav": "Questions",
   "h2": "Questions",
   "parts": [
    {
     "t": "faq",
     "items": [
      {
       "q": "Is there a free plan?",
       "a": "Yes. Redis Cloud has a free database of up to 30 MB on a shared deployment, and Redis Open Source is free to run yourself.",
       "evidence": {
        "url": "https://redis.io/pricing/",
        "quote": "Free Always $0 Up to 30 MB Just go for it Shared cloud deployment 30 MB single DB"
       }
      },
      {
       "q": "Which clouds and regions can host my Redis Cloud database?",
       "a": "Amazon Web Services, Google Cloud or Microsoft Azure, in a region you pick when you create the database.",
       "evidence": {
        "url": "https://redis.io/docs/latest/operate/rc/rc-quickstart/",
        "quote": "You can choose between Amazon Web Services (AWS) , Google Cloud , and Microsoft Azure for the Cloud Vendor."
       }
      },
      {
       "q": "Which Node.js client should I use?",
       "a": "The Redis docs recommend node-redis (the \"redis\" package); the older ioredis is still documented.",
       "evidence": {
        "url": "https://redis.io/docs/latest/develop/clients/nodejs/",
        "quote": "node-redis is the recommended client library for Node.js/JavaScript, but we also support and document our older JavaScript client ioredis ."
       }
      },
      {
       "q": "Is Redis open source again?",
       "a": "Yes, from Redis 8 you may choose AGPLv3, an approved open-source license, or RSALv2 or SSPLv1.",
       "evidence": {
        "url": "https://redis.io/legal/licenses/",
        "quote": "AGPLv3 is an OSI-approved open source license."
       }
      }
     ]
    }
   ]
  }
 ],
 "glance": [
  [
   "Maker",
   "Redis"
  ],
  [
   "Category",
   "Databases and backends"
  ],
  [
   "Price",
   "Free (open source)"
  ],
  [
   "Plans from",
   "$5/mo"
  ],
  [
   "Official SDK",
   "npm redis"
  ],
  [
   "Latest SDK",
   "6.3.1 on npm"
  ],
  [
   "Agent check",
   "3 of 6"
  ],
  [
   "Pricing checked",
   "Oct 9, 2026"
  ]
 ],
 "good": [
  "The free Redis Cloud database holds up to 30 MB, with best-effort uptime and community support only.",
  "Paid Essentials plans start at about $5 a month; Pro plans have a $200 monthly minimum.",
  "Your app connects to a running Redis server; the client library alone stores nothing."
 ],
 "checked_line": "Read by AgentGid from 28 official pages, card checked Nov 10, 2026; usage numbers update daily."
}