User and operator guide · Deployment
Atlas Cache Deployment
On this page
PurposeRuntime ModelSupported Command ProfileDeployment DefaultsConfigurationPerformance And Scale PostureValidationClaim BoundaryPurpose
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
Supported Command Profile
Atlas Cache implements the Redis-compatible command profile Atlas uses in product paths:
| Area | Commands | Atlas use |
|---|---|---|
Connection and control |
|
Go client connection setup, health, and database selection. |
Strings and TTL |
|
Sessions, OAuth codes, denylist flags, nonces, and runtime markers. |
Sets |
|
User-session indexes and token/session membership checks. |
Lists |
|
Trust score history and bounded evidence lists. |
Hashes |
|
Device posture records, compact capability metadata, and compatibility with common Redis client helpers. |
Iteration, pub/sub, transactions |
|
Session scans, trust score streams, and atomic nonce/session updates. |
Introspection |
|
Compatibility with Redis clients and operational telemetry. |
Rate limiting |
Atlas token-bucket |
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 |
Docker lab |
Atlas Cache |
Plaintext inside the lab network unless TLS is explicitly configured. |
Use |
Kubernetes |
Atlas Cache |
TLS listener only by default. |
Use |
Enterprise managed cache |
Optional external Redis-compatible service |
Environment-owned TLS, auth, network, backup, and evidence. |
Set |
Configuration
Atlas Cache service configuration lives in config/atlas-cache.yaml.
| Setting | Purpose | Security note |
|---|---|---|
|
Development or loopback-only RESP listener. |
Disable outside development-like environments. |
|
TLS RESP listener. |
Required outside development-like environments. |
|
Client authentication material. |
Inject through Vault, Kubernetes Secret, or environment variables. |
|
AES key for WAL and snapshot protection. |
Required for persisted state outside development-like environments. |
|
WAL and snapshot directory. |
Back up or rebuild according to the deployment runbook. |
|
WAL durability policy: |
Default is |
|
Flush/sync interval used by |
Use shorter intervals for stricter evidence windows, longer intervals only with explicit risk acceptance. |
|
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. |
|
Fail writes instead of evicting security-sensitive state. |
Default is |
|
Number of in-memory key shards. |
Default is |
|
Background interval for reclaiming expired keys without waiting for lazy key access. |
Default is |
|
Maximum expired-key scan budget per shard on each sweep. |
Default is |
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, |
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 |
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.