Skip to Content
RigFabTech docs
Operate

Cache

Products that keep a cache or a job queue in Redis get their own Valkey, the BSD-licensed fork of Redis. This page shows how it runs, how to size it, and how to use your own service instead.

  • It runs in the product's namespace as <product>-valkey.
  • Only that product's pods reach it, with a password the base chart's controller generates into <product>-generated.
  • It's a single instance. For high availability, use your own Redis-compatible service.

Profiles

Each product's chart says how it uses Valkey, as cache.profile:

ProfileDiskWhen full
cachenone; a restart empties itdrops the least recently used keys (allkeys-lru)
queuea volume <product>-valkey, every write appended (appendonly, synced each second, so a crash loses at most the last second), kept when the product is uninstalledrefuses writes (noeviction)

The profile is the product's choice, set in its chart. Don't change it: a product that queues jobs loses them on a restart under cache.

Size it

Size it in the product's values:

cache:
  memoryLimit: 512Mi
  maxmemory: 200mb
  size: 2Gi
  • The defaults are maxmemory 96mb, under a memoryLimit of 128Mi for cache and 256Mi for queue.
  • For queue, keep maxmemory at about half of memoryLimit. Rewriting the append-only file briefly doubles memory.
  • The volume's size and storageClass take effect when it's first made. To change them later, resize the PersistentVolumeClaim yourself, if its StorageClass allows it.

Your own Redis-compatible service

cache:
  mode: external
  external:
    host: redis.example.com
    port: 6380
    tls: true
    username: default
    existingSecret: product-redis
global:
  rigfab:
    site:
      destinations:
        cache: {cidrs: [10.1.2.3/32], ports: [6380]}
  • existingSecret is a Secret in the product's namespace with the password as password. passwordKey names another key.
  • The product reaches the service only at global.rigfab.site.destinations.cache.
  • A product whose profile is queue needs maxmemory-policy noeviction and persistence on that service.