Valkey
Redis-compatible in-memory key-value store with high availability, persistence, and TLS.
Versions
| Version | Status |
|---|---|
| 8 | Available (recommended) |
Connecting
| Port | Protocol | Use |
|---|---|---|
6380 | TLS | Production — always use this |
6379 | Plain | Allowed if within your allowed_cidrs |
# TLS
redis-cli -h HOST -p 6380 --tls --user USER --pass PASS
# Test
redis-cli -h HOST -p 6380 --tls --user USER --pass PASS PING
Full connection string examples: Connection Strings →
High Availability (Sentinel)
For HA, add a replica. Sentinel monitors both nodes and promotes the replica automatically if the primary fails:
curl -u admin:password -X POST \
https://api.foundrydb.com/managed-services/{id}/nodes \
-H "Content-Type: application/json" \
-d '{"role": "replica"}'
Failover time is typically 5–15 seconds. Your client should be configured with retry logic and connection timeouts.
Manual failover:
curl -u admin:password -X POST \
https://api.foundrydb.com/managed-services/{id}/nodes/{node_id}/failover
Persistence
Both RDB and AOF are enabled by default:
| Mode | Behaviour |
|---|---|
| RDB | Point-in-time snapshots. Fast restarts, small files. Risk of up to ~minutes of data loss. |
| AOF | Log of every write. Near-zero data loss, larger files, slower restarts. |
Tune persistence:
curl -u admin:password -X PATCH \
https://api.foundrydb.com/managed-services/{id}/configuration \
-H "Content-Type: application/json" \
-d '{
"parameters": {
"appendonly": "yes",
"appendfsync": "everysec",
"save": "3600 1 300 100 60 10000"
}
}'
appendfsync values:
always— safest, slowesteverysec— recommended balanceno— fastest, OS-controlled flush
Eviction Policies
Set how keys are evicted when memory is full:
"parameters": {
"maxmemory-policy": "allkeys-lru"
}
| Policy | Description |
|---|---|
noeviction | Return errors when full (default) |
allkeys-lru | Evict least recently used keys |
volatile-lru | Evict LRU keys with TTL set |
allkeys-random | Evict random keys |
volatile-ttl | Evict keys with shortest TTL |
Configuration
curl -u admin:password -X PATCH \
https://api.foundrydb.com/managed-services/{id}/configuration \
-H "Content-Type: application/json" \
-d '{
"parameters": {
"maxmemory-policy": "allkeys-lru",
"hz": "15",
"tcp-keepalive": "300",
"timeout": "0"
}
}'
Common parameters:
| Parameter | Default | Description |
|---|---|---|
maxmemory-policy | noeviction | Key eviction policy |
hz | 10 | Background task frequency |
tcp-keepalive | 300 | Keepalive probe interval (seconds) |
timeout | 0 | Idle connection timeout (0 = disabled) |
lazyfree-lazy-eviction | no | Non-blocking key eviction |
Backups
# List backups
curl -u admin:password https://api.foundrydb.com/managed-services/{id}/backups
# Manual backup
curl -u admin:password -X POST \
https://api.foundrydb.com/managed-services/{id}/backups \
-H "Content-Type: application/json" \
-d '{"backup_type": "manual"}'
Metrics
Key metrics: used_memory, connected_clients, keyspace_hits, keyspace_misses, expired_keys, evicted_keys.
curl -u admin:password \
"https://api.foundrydb.com/managed-services/{id}/metrics?metric=memory&period=1h"