Salta ai contenuti

Questi contenuti non sono ancora disponibili nella tua lingua.

Redis

Redis is used to store shared state, such as rate-limiting data, and to provide pub/sub functionality between Sentinel instances.

In cluster mode (multi-node deployments), a centralized Redis-compatible database is required to ensure consistency across the cluster.

Compatibility

ALTCHA Sentinel is compatible with:

  • Redis 7 or later
  • Valkey 7 or later

Sentinel uses only the string data type and a small subset of Redis commands. Any Redis-compatible database that supports EXPIRE [NX] (Redis/Valkey 7+) should also work.

Enabling Redis

To use an external Redis instance, configure the REDIS_URL environment variable:

REDIS_URL=redis://default@localhost:6379

When using Redis Cluster, configure REDIS_CLUSTER_URL instead and point it to the cluster configuration endpoint.

For more information about Redis Cluster and Redis Sentinel deployments, see the Redis environment variables.

We recommend using Redis 7 or later, or another compatible database such as Valkey 7.

Built-in Store

ALTCHA Sentinel includes a built-in Redis-compatible key-value store that can be used for single-instance deployments. Both persistent and in-memory storage options are supported.

By default, the storage backend is set to local, which stores data in a local SQLite database. The storage backend can be configured using the EXOTDB_REDIS_STORAGE environment variable.

Available storage backends:

  • memory — In-memory storage for single-instance deployments. Data is lost when the application restarts.
  • local — Persistent storage backed by a local SQLite database.
  • turbolite — S3-backed persistent storage with cluster support. Requires TURBOLITE_REDIS_URL to be configured. See Turbolite documentation.