The Redis helper in Nakodo is twelve lines. It returns an Upstash client when the environment has either the UPSTASH_REDIS_REST_* pair or the KV_REST_API_* pair that Vercel's integration sets, and null otherwise. Null is the default on a laptop and on a preview deployment.

export function redisFromEnv(): Redis | null { const configured = (env("UPSTASH_REDIS_REST_URL") || env("KV_REST_API_URL")) && (env("UPSTASH_REDIS_REST_TOKEN") || env("KV_REST_API_TOKEN")); return configured ? Redis.fromEnv() : null; } 

A function that can return null makes every caller write the "else" branch, and I counted: there are three callers in src/, plus one script, and they chose three different meanings for it.

1. The rate limiter: fail open

src/lib/ratelimit.ts has 18 named rules, from signIn (10 attempts in 10 minutes per email) to write (120 a minute per user). With no Redis, limiter(rule) returns null and rateLimit() returns straight away, so nothing is limited. The comment at the top says that is the point: a missing or broken Redis must not take sign-in down with it. A failing call gets one second, and then the request goes through, with a logged error.

There is one asymmetry I like. On a live deployment with no Redis, the module logs Rate limiting is off: set UPSTASH_REDIS_REST_URL... once, because there it is a misconfiguration. Locally it is silent, because there it is a Tuesday.

2. The place search: degrade to one process

src/lib/places/geocode.ts looks up place names against Nominatim, which allows one request a second. With Redis, a fixed-window limiter of one per second keyed on the constant "global" makes every server instance take a turn, and results are cached for 30 days. Without Redis the same module swaps in a Map and a lastLocal timestamp:

const cached = redis ? await redis.get<PlaceMatch[]>(key).catch(() => null) : memory.get(key); 

The map is cleared when it passes 500 entries. This is a third policy, and it is the opposite of the first one: it still limits, just per process. The reason is that the limit is somebody else's rule, and breaking it gets the whole app blocked. Failing open would be correct for our own limit and wrong for Nominatim's.

3. The sitemap announcer: do nothing

src/lib/seo/indexnow.ts runs hourly and tells search engines about pages whose updated date has moved. Which pages were already announced lives in one Redis hash. Without Redis it returns { skipped: "Redis isn't configured" }, and the comment gives the reason: it cannot tell what changed, so it does nothing rather than announce every page every hour.

That is the third policy: fail closed. Re-announcing 106 pages every hour would be noise to the engines, and the hash is the only state.

The same null, and a decision table

Caller Without Redis Why
Rate limiter allow everything protecting our own endpoints must not take them down
Place search limit per process the limit is a third party's
Announcer skip the run it has no memory of what it sent

The types gave me nothing here. Redis | null is one type for three different answers, and I could not have written the table from the signatures. What I would change is to make the policy part of the call: a redisOr("open" | "local" | "skip") helper would put the decision at the use site, where a reader sees it.

A prefix that does not match

While reading, I noticed that the rate limiter prefixes its keys with nakodo:rl:, the announcer uses nakodo:indexnow:submitted, and the place search uses rl:nominatim. One of three has dropped the app name. Nothing breaks, since only this app uses the database, but the day it shares one with another app, a key named rl:nominatim is the one that belongs to nobody. Renaming it is a one-line change, and the old key expires with its one-second window.

Things you can check

The announcer is the reason /sitemap.xml carries honest dates. 62 of its 106 entries say 2026-11-26 and 44 say 2026-10-03, because the date is a page's last substantive change and not the build date. A build date would make the announcer re-submit everything on every deploy.

One thing I have not tested is what the place search does when Redis is configured but failing. The cache read swallows errors. The turn-taking call, limiter.limit("global"), does not wrap itself in a try, so I expect a failing Redis to surface as an error rather than a slow fallback. If I am right, the fix is three lines.