vado / docs
GitHub

Start here

Quick start

Create the Access application, deploy the Worker, and connect valkey-cli or ioredis. About ten minutes on Workers Paid.

1. Create the Access application

Watching the dashboard is public; changing anything needs signing in with Cloudflare Access. In Zero Trust, add a self-hosted application for the Worker's hostname with the path signin, and a policy that allows you. Note two values:

  • Its Application Audience (AUD) tag, which becomes ACCESS_AUD.
  • Your team domain, https://<team>.cloudflareaccess.com, which becomes ACCESS_TEAM_DOMAIN.

Protect only /signin. The WebSockets (/live, /ws) stay open, and the Worker checks the Access token on every change.

2. Deploy

Deploy to Cloudflare

The button copies the repository into your GitHub account, asks for three settings, builds and deploys. The Worker's URL is the dashboard.

SettingWhat to enter
VALKEY_PASSWORDThe password clients send with AUTH <database> <password>. It also opens /ws. Generate one with openssl rand -hex 32.
ACCESS_TEAM_DOMAINhttps://<team>.cloudflareaccess.com
ACCESS_AUDThe audience tag of the Access application on /signin.

Or from a checkout:

Terminal
npm install
npx wrangler secret put VALKEY_PASSWORD
npm run deploy -- --var ACCESS_TEAM_DOMAIN:https://<team>.cloudflareaccess.com --var ACCESS_AUD:<tag>

3. Connect valkey-cli

The AUTH username picks the database; a new one is created on first use. There are two ways in from outside Cloudflare.

Over TCP: add a Spectrum application of type Workers (tcp) with this Worker as origin, on port 6379, with TLS on (flexible). Spectrum doesn't pass a hostname, so the database comes from AUTH.

Through Spectrum
valkey-cli --tls -h valkey.example.com -p 6379 --user mydb --pass "$VALKEY_PASSWORD"

Over a WebSocket: the shim turns /ws into a local TCP port for any client.

Through vado-shim
npx vado-shim wss://<your-worker>.workers.dev/ws 6379
valkey-cli -p 6379 --user mydb --pass "$VALKEY_PASSWORD"

4. Connect from a Worker

Bind this Worker as a service. env.VALKEY.connect("mydb:6379") returns a raw RESP socket, and the dialed host names the database. For ioredis, use bindingConnector from @vado/client:

wrangler.jsonc
"services": [{ "binding": "VALKEY", "service": "vado" }]
worker.ts
import Redis from "ioredis";
import { bindingConnector } from "@vado/client";

const redis = new Redis({
  Connector: bindingConnector(env.VALKEY, "mydb"),
  password: env.VALKEY_PASSWORD,
});
await redis.set("greeting", "hello");

The connection stays inside Cloudflare, and failed AUTHs aren't rate limited. With VALKEY_PASSWORD set, a binding still has to AUTH, and that password opens every database, including ones with their own password (security).

Run it locally

From a checkout
cp .dev.vars.example .dev.vars
npm run dev                                     # http://localhost:5173
npx vado-shim ws://localhost:5173/ws 6379       # in another terminal

The local dev server has no TCP port, so clients go through the shim. Placement and replicas need a real deployment.

Browse topics or type to search

Introductionvado runs real Valkey 9.1, compiled to WebAssembly, in Cloudflare Durable Objects. A router in a Worker spreads keys over the shards, so valkey-cli and ioredis see one ordinary server.What you getIntroductionA first commandIntroductionThe dashboardIntroductionRead onIntroductionQuick startCreate the Access application, deploy the Worker, and connect valkey-cli or ioredis. About ten minutes on Workers Paid.1. Create the Access applicationQuick start2. DeployQuick start3. Connect valkey-cliQuick start4. Connect from a WorkerQuick startRun it locallyQuick startArchitectureA router per connection, shard objects running Valkey with their AOF in SQLite, and memory-only replicas in other regions. What each part owns, and what it costs.Where everything livesArchitectureHow clients reach itArchitectureRouterArchitectureShardsArchitectureRead replicasArchitectureRewritersArchitectureCatalogArchitectureWatcher, Pulse and the dashboardArchitectureWhat the design buys, and costsArchitectureSharding and routingKeys hash to 16,384 slots, slots map to shards in contiguous ranges, and a database's size and placement are fixed when it is created.Slots and shardsSharding and routingShard countSharding and routingPlacementSharding and routingHow the router routesSharding and routingCROSSSLOTSharding and routingShard classesSharding and routingConnectionsSharding and routingUnsupported commandsSharding and routingDurabilityEvery acknowledged write is in SQLite before its reply leaves. Group commit keeps that cheap under load, a helper object compacts the AOF, and deploys restart shards without failing commands.Write-through storageDurabilityGroup commitDurabilityAOF rewrites in a helperDurabilityWhen a shard resetsDurabilityClean restarts on deployDurabilityRead replicasEach shard can keep a memory-only copy in other regions, fed from its AOF. Routers read the nearest one, a connection always reads its own writes, and an idle database's replicas sleep.RegionsRead replicasCopy, then streamRead replicasWhat a replica read can seeRead replicasFailuresRead replicasIdle sleepRead replicasLife of a requestWhat happens between a client sending SET k v and reading +OK, and what each reply tells you.One SET, step by stepLife of a requestWhat a reply tells youLife of a requestOperationsDeploy, configure, create databases with a placement, sign in to the dashboard, drive the bench API, and upgrade without breaking running shards.DeployOperationsSettingsOperationsCreate a database with a placementOperationsDashboard sign-inOperationsThe bench APIOperationsUpgrading safelyOperationsSecurityWho can connect, what clients may change, how data travels, where copies live, and what the bench token and the dashboard allow.AuthenticationSecurityWithout a passwordSecurityWhat clients can changeSecurityTransportSecurityReplicas and data locationSecurityThe bench token and the dashboardSecurityLimits and measurementsWhat one shard holds, how fast writes and reads went, and the conditions behind each number. Measured on production in November 2026, on one account.LimitsLimits and measurementsMemoryLimits and measurementsThroughputLimits and measurementsLatencyLimits and measurementsReplicasLimits and measurementsRewritesLimits and measurementsCold starts and deploysLimits and measurementsFailure testsLimits and measurementsWhat these don't showLimits and measurementsRedisA database can run Redis 8.12 instead of Valkey. It is opt-in at build time because it doubles the upload and is distributed under the AGPLv3.Choosing RedisRedisBuilding with RedisRedisDifferencesRedisThe AGPL licenceRedisRepositoryAn npm workspace: two apps and three packages. How to check, test and build it, and what CI runs on every push.LayoutRepositoryCommandsRepositoryEnd-to-end testsRepositoryContinuous integrationRepositoryThe wasm buildsRepositoryCode rulesRepository
Local search. Nothing is sent to a server.Esc to close
Documentation