Skip to content

ADR-002: Valkey over Redis for Cache and Pub/Sub

Status: Accepted Date: 2026-03-09

Context

Tablez needs a fast in-memory store for caching (availability slots, restaurant config) and pub/sub (cross-service event distribution, cache invalidation, SignalR backplane).

Options Considered

Option Pros Cons
Valkey BSD license, Redis fork maintained by Linux Foundation, drop-in compatible Younger project
Redis Industry standard, huge ecosystem SSPL license since Redis 7, vendor lock-in risk with Redis Ltd
Memcached Simple, proven No pub/sub, no data structures
PostgreSQL LISTEN/NOTIFY No extra infra Not designed for high-throughput pub/sub, no caching

Decision

Use Valkey (Redis fork, BSD licensed) for both caching and pub/sub.

Rationale

  • BSD license. No vendor lock-in risk. Can self-host or use any cloud provider without licensing concerns.
  • Drop-in Redis replacement. All Redis clients, libraries, and tooling work unchanged. StackExchange.Redis connects to Valkey without modification.
  • Linux Foundation governance. Backed by AWS, Google, Oracle, Ericsson — not controlled by a single company.
  • Same performance profile as Redis. No compromise on speed.

Consequences

  • Container image: valkey/valkey:8 instead of redis:7.
  • All documentation and configs reference Valkey, not Redis.
  • Cloud migration: use ElastiCache with Valkey engine, or Azure Cache for Redis (protocol-compatible).