User and operator guide · Deployment

Atlas Cache Deployment

Status: currentReviewed: 2026-07-14Audience: platform engineers, deployment engineers, security engineers, SREs
On this pagePurposeRuntime ModelSupported Command ProfileDeployment DefaultsConfigurationPerformance And Scale PostureValidationClaim Boundary

Purpose

Atlas Cache is the default Atlas-owned Redis-compatible cache service for transient runtime state. It is designed so Atlas can operate without a Redis server while preserving the command profile used by Atlas clients today. External Redis-compatible services remain optional deployment choices when an environment explicitly accepts and validates that dependency.

Atlas Cache is not the durable business system of record. PostgreSQL remains authoritative for durable domain records; Atlas Cache holds fast session, denylist, nonce, OAuth, rate-limit, score, pub/sub, and transient coordination state.

Atlas Cache is packaged as a dedicated Atlas service with a container image and Kubernetes manifest. Use the deployment artifacts referenced by this page to run it as the cache backend for local-live, lab, or Kubernetes environments.

Runtime Model

Cache Runtime
Cache RuntimeArchitecture diagramOpen full size ↗

Supported Command Profile

Atlas Cache implements the Redis-compatible command profile Atlas uses in product paths:

Area Commands Atlas use

Connection and control

PING, ECHO, AUTH, HELLO, SELECT, QUIT, ROLE, selected CLIENT, selected CLUSTER compatibility metadata commands

Go client connection setup, health, and database selection.

Strings and TTL

GET, MGET, SET, MSET, GETEX, SETEX, SETNX, GETDEL, INCR, DECR, INCRBY, DECRBY, DEL, UNLINK, EXISTS, EXPIRE, PEXPIRE, EXPIREAT, PEXPIREAT, PERSIST, TTL, PTTL, TYPE

Sessions, OAuth codes, denylist flags, nonces, and runtime markers.

Sets

SADD, SMEMBERS, SREM, SISMEMBER, SCARD

User-session indexes and token/session membership checks.

Lists

LPUSH, RPUSH, LPOP, RPOP, LRANGE, LTRIM, LLEN

Trust score history and bounded evidence lists.

Hashes

HSET, HGET, HMGET, HGETALL, HDEL, HEXISTS, HINCRBY, HLEN

Device posture records, compact capability metadata, and compatibility with common Redis client helpers.

Iteration, pub/sub, transactions

SCAN, PUBLISH, SUBSCRIBE, UNSUBSCRIBE, MULTI, EXEC, DISCARD

Session scans, trust score streams, and atomic nonce/session updates.

Introspection

COMMAND, CONFIG GET, INFO, TIME, selected CLIENT

Compatibility with Redis clients and operational telemetry.

Rate limiting

Atlas token-bucket EVAL shape only

Known rate-limit script behavior. Arbitrary Lua is rejected.

Unsupported commands fail clearly. This is intentional: Atlas Cache is a fidelity-preserving Atlas runtime service, not a general-purpose Redis clone.

Deployment Defaults

Environment Default backend Listener posture Notes

Local-live validation

Atlas Cache

Loopback plaintext for deterministic seeding plus loopback TLS compatibility for gateway paths.

Started by scripts/run-local-live-validation.sh; no Redis container is required.

Docker lab

Atlas Cache

Plaintext inside the lab network unless TLS is explicitly configured.

Use docker/Dockerfile.atlas-cache and docker/atlas-infrastructure.yml.

Kubernetes

Atlas Cache

TLS listener only by default.

Use k8s/atlas-cache.yaml; inject password and WAL/snapshot encryption key through atlas-cache-auth.

Enterprise managed cache

Optional external Redis-compatible service

Environment-owned TLS, auth, network, backup, and evidence.

Set cache.backend: external-redis and provide redis.* compatibility configuration.

Configuration

Atlas Cache service configuration lives in config/atlas-cache.yaml.

Setting Purpose Security note

listeners.plaintext

Development or loopback-only RESP listener.

Disable outside development-like environments.

listeners.tls

TLS RESP listener.

Required outside development-like environments.

security.password or security.password_sha256

Client authentication material.

Inject through Vault, Kubernetes Secret, or environment variables.

security.encryption_key

AES key for WAL and snapshot protection.

Required for persisted state outside development-like environments.

persistence.directory

WAL and snapshot directory.

Back up or rebuild according to the deployment runbook.

persistence.fsync_policy

WAL durability policy: always, everysec, or no.

Default is everysec, matching high-throughput cache behavior while bounding persistence loss to the configured interval.

persistence.fsync_interval

Flush/sync interval used by everysec.

Use shorter intervals for stricter evidence windows, longer intervals only with explicit risk acceptance.

mirror.*

Optional read-through/write-through/dual-write migration path to an upstream Redis-compatible service.

Use only during controlled cutover windows, pre-synchronize compound state, and record parity evidence.

limits.noeviction

Fail writes instead of evicting security-sensitive state.

Default is true; security writes must fail closed.

limits.shard_count

Number of in-memory key shards.

Default is 64; increase on high-core nodes when contention is observed.

limits.expiry_sweep_interval

Background interval for reclaiming expired keys without waiting for lazy key access.

Default is 30s; reduce only when TTL churn is high and CPU headroom is available.

limits.expiry_sweep_batch_size

Maximum expired-key scan budget per shard on each sweep.

Default is 1024; tune with memory-pressure and latency evidence.

Atlas application services still use the existing redis.* compatibility client settings because the Go client speaks RESP. The higher-level runtime selector is:

cache:
  backend: atlas-cache

redis:
  host: atlas-cache
  port: 16380
  ssl: true

Restricted, result-bearing EVAL operations have an explicit migration safety contract: they are unavailable whenever any mirror mode is configured. Trust evidence indexes, behavior leases, replay-nonce claims, replay revocation, revocation reservations, and rate-limit buckets are compound state and cannot be atomically coordinated across two independent stores. During a controlled cutover, route those operations to one authoritative backend, synchronize and verify the state, then disable mirroring before Atlas Cache resumes those commands. This deliberately trades migration-time availability for protection against split ownership, accepted replays, stale evidence, and conflicting revocation decisions.

Conditional ownership writes (SET …​ NX, SET …​ XX, and SETNX) and nonzero logical databases are likewise unavailable while mirroring is configured. Read-through hydration uses millisecond TTLs, refuses keys that expire between value and TTL reads, and never converts a short-lived or errored mirror value into a persistent local copy.

Performance And Scale Posture

Atlas Cache is optimized for the Atlas command profile rather than for every Redis workload:

Design choice Operational effect

Per-key sharded in-memory store

Independent keys can be served concurrently across shards instead of contending on one global map lock.

Allocation-conscious hot paths

Key hashing avoids per-operation hash-object allocation, LPUSH avoids repeated slice prepends, and common hash/set/list operations use direct shard-local checks.

Pipelined RESP handling

Responses are buffered across queued input so high-throughput clients do not force a socket flush after every command.

Buffered encrypted WAL

Write-heavy paths avoid a disk sync for every mutation when fsync_policy: everysec is used.

Periodic encrypted snapshots

Restart recovery replays a compact snapshot plus recent WAL instead of replaying an indefinitely growing log.

Bounded trust-evidence WAL deltas

History appends persist one binary-safe prepend-and-trim operation rather than rewriting the complete retained history on every score.

Background TTL sweeper

Expired session, nonce, token, and score-cache entries are reclaimed even when they are not read again.

Noeviction default

Session revoke, nonce, and denylist writes fail closed instead of silently dropping security state.

Redis-compatible RESP2 surface

Existing Go clients continue to use the Redis protocol while Atlas owns the default runtime dependency; selected introspection commands return Redis-shaped standalone metadata.

Tune in this order: set an explicit memory limit, keep noeviction: true, size limits.shard_count to the node CPU count and connection count, verify TTL churn with atlas_cache_db0_expires, tune limits.expiry_sweep_*, and then adjust persistence.fsync_interval only after validation evidence shows the change is acceptable.

Validation

Use the Atlas Cache gate before promoting cache changes:

make atlas-cache-validation

The gate builds the Go microservice, runs Atlas Cache unit tests, exercises the existing cache/session/rate-limit client packages, and syntax-checks the local-live script that starts Atlas Cache without a Redis container.

For optional external Redis-compatible deployments, run the external compatibility gate with the target endpoint configured:

make external-redis-compat-validation

Claim Boundary

Atlas Cache validation proves Atlas-owned Redis-compatible behavior for the command profile Atlas uses. It does not certify an external cache service, an enterprise managed cache offering, a production topology, or inherited platform controls. Those remain deployment evidence and must be cited separately.