Update:Our Privacy Policy has changed

Knowledge Base

Guides, comparisons and how-tos from the Upstash team.

How to Add Memory to a Vercel Eve Agent with Redis

Add chat history and long-term user memory to a Vercel Eve agent with Upstash Redis and the AgentKit Eve adapter.

Cahid Arda OzCahid Arda Oz

How to Add Memory to a TanStack AI Agent with Redis

Add chat history and long-term user memory to a TanStack AI agent with Upstash Redis and the AgentKit TanStack AI adapter.

Cahid Arda OzCahid Arda Oz

How to Add Memory to a Vercel AI SDK Agent with Redis

Add chat history and long-term user memory to a Vercel AI SDK agent with Upstash Redis and AgentKit.

Cahid Arda OzCahid Arda Oz

How TTL Jitter Protects Your Database When Redis Keys Expire Together

We bulk-loaded a cache on real Upstash Redis and watched the keys expire, with and without TTL jitter. See how much jitter lowers the miss spike, how it protects the database behind the cache, and how wide to make it.

JoshJosh

Why Lua Scripts Beat WATCH When Many Clients Update One Redis Key

We ran 1,000 updates on one Redis key with up to 100 clients using WATCH, Lua scripts and a plain read then write. See how much faster a script is, how many updates go missing without one, and how to keep scripts from stalling other clients.

JoshJosh

How Big Should a Redis Key Be?

We grew Redis values and hashes on real Upstash databases to find how big a key can get. See where reads slow down, the 10 MB limit on one reply, the stall on a 1 million field hash, and how to split a big key.

JoshJosh

How to List Keys in Redis Safely With SCAN

We ran KEYS and SCAN against 1 million keys on Upstash Redis and stock Redis 8. See how much SCAN helps, when KEYS stops working, what COUNT to use, and why a key prefix matters more than COUNT.

JoshJosh

Why MGET Is Faster Than a Redis Pipeline for Reading Many Keys

We read 1,000 to 200,000 keys from a real Upstash Redis database with awaited GETs, pipelines and MGET. See how much each one speeds things up, what it costs in commands, where each one hits a limit, and how big to make a chunk.

JoshJosh

Railway Redis vs Upstash: Which Redis for Your Railway App?

If you have an app that's hosted on Railway and you want to use Redis for your cache, sessions, or for a queue, you can either add a Redis service to the Railway project with a few clicks, or use Upstash to provide a managed Redis database outside Railway. To connect your app to either Redis service, you'll need a standard Redis client, and a REDISURL environment variable.

Cahid Arda OzCahid Arda Oz

How to Add Memory to an AI Agent with Redis

In order to add memory to an AI agent, you need to store things outside the model and load them into the prompt with every turn. When the model responds to your message, you need to write new things back to memory. For most agents, short-term memory (what you talked about most recently) and long-term memory (what you know about the user) are the most important.

Cahid Arda OzCahid Arda Oz

Express Redis Cache: Add Upstash Redis to Any Node.js App

When an Express route reads from a slow database, every request waits for that query. A Redis cache keeps the result after the first request, so the next requests for the same data skip the database and take one round trip to Redis.

Cahid Arda OzCahid Arda Oz

Thundering Herd Problem: How Cache Stampedes Happen and 5 Ways to Stop Them

Of course, a cache only protects your database as long as the key is present. If you have a highly-accessed key expire during a high traffic period, you’ll have a stampede of requests that miss all at once in the subsequent few hundred milliseconds. All of those requests will then fall back to the database, exposing the database to the load the cache was meant to prevent.

Cahid Arda OzCahid Arda Oz

Web Application Caching: Browser, CDN and Server-Side Caching Explained

A product page, which always reads the same row from the database, pays thousands of times per day for the same query. Caching stores a copy of the result near the user, so subsequent requests don’t have to do the work. A web application has a few different places to cache the result, each of which has a different expiry rule and mechanism for eviction.

Cahid Arda OzCahid Arda Oz