Skip to main content

Redis

DIAL Core keeps volatile data in Redis for fast access: cached resources, writes waiting to be synced to blob storage, per-request API keys, per-trace usage records, and coordination between Core instances. These static settings connect Core to a single Redis server, a Redis cluster, or a managed cache with IAM authentication. This page is for platform engineers who provision Redis for Core.

Connection​

Set exactly one of the two connection settings.

SettingDefaultDescription
redis.singleServerConfig.address—The address of a single Redis server, for example redis://redis:6379.
redis.clusterServersConfig.nodeAddresses—A JSON array of Redis cluster node addresses, for example ["redis://host1:6379","redis://host2:6379"].

Managed Redis with IAM authentication​

redis.provider.* turns on provider-specific authentication.

SettingApplies toDescription
redis.provider.nameAllThe provider: aws-elasti-cache (IAM authentication), gcp-memory-store (access control), or azure-redis-cache (managed identity).
redis.provider.userIdaws-elasti-cacheThe IAM-enabled user ID.
redis.provider.regionaws-elasti-cacheThe region of the cache.
redis.provider.clusterNameaws-elasti-cacheThe cluster name.
redis.provider.serverlessaws-elasti-cacheWhether the cache is serverless.
redis.provider.accountNamegcp-memory-storeThe service account resource name, in the form projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}. The - wildcard is required; a project ID in its place is invalid.
{
"redis": {
"clusterServersConfig": {
"nodeAddresses": ["rediss://dial-cache.example.cache.amazonaws.com:6379"]
},
"provider": {
"name": "aws-elasti-cache",
"userId": "dial-core",
"region": "eu-west-1",
"clusterName": "dial-cache",
"serverless": false
}
}
}

Memory and eviction​

Redis can run as a cache with a volatile-* eviction policy, for example:

maxmemory 4G
maxmemory-policy volatile-lfu

Some data lives only in Redis and has a TTL, so these policies can evict it under memory pressure:

  • Per-request API keys (perRequestApiKey.ttl).
  • Per-trace usage records (deploymentStats.ttlMs). An evicted record loses its trace's roll-up: aggCost in the analytics log, statistics.usage_per_model, and the aggregated costs the limits API reports. Limit enforcement is not affected.

Size maxmemory so that eviction stays rare. For the Redis server settings in Docker Compose, see Quick start and Advanced setup.

Further reading​

  • Resources — what Core caches in Redis and when it syncs to blob storage
  • Storage — blob storage settings and provider requirements
  • High availability — run Redis and Core for resilience
  • Quick Start — the ready-made Compose setups and how to run them
  • Core, Redis & Themes — the Core, Redis, and Themes service definitions