Redis behavior and limits
A Redis resource is a single-endpoint, Redis-compatible server on a private network. Its guarantees hold on every platform, while engine, sizing, persistence, and the changes a running server accepts differ per cloud.
Guarantees
One endpoint, not cluster mode. Every platform runs a single shard. Multi-key commands and Lua scripts that touch several keys work, and keys passed in ARGV work. There are no MOVED or CROSSSLOT errors.
Private network only. On AWS, Google Cloud, and Azure the server has no public endpoint, and there is no option to expose it. Only workloads in the same deployment can reach it.
Local is reachable only from your machine. On Kubernetes and Machines the customer provides the server and controls its networking.
TLS and a password, always. On the clouds, every connection uses TLS and a generated password. Plaintext connections are refused.
Database 0. The binding always uses database 0. SELECT with another index works on AWS and Google Cloud but fails on Azure, so don't depend on it.
Commands. Streams with consumer groups, pub/sub, MULTI/EXEC, Lua EVAL, blocking commands such as BLPOP, SET NX PX, TIME, SCAN, KEYS, and CLIENT LIST work on every cloud. Values of at least 5 MB work.
Administrative commands are limited on the managed services:
| Command | AWS | Google Cloud | Azure |
|---|---|---|---|
CONFIG GET / CONFIG SET | Rejected | Rejected | Returns nothing, SET is rejected |
DEBUG | Not available | Not allowed | Not allowed |
Change settings such as the eviction policy through alien.ts, not over the wire.
Engine versions
Alien picks the engine. It isn't an option.
| Platform | Engine |
|---|---|
| AWS | Valkey 9.0 |
| Google Cloud | Valkey 9.0 |
| Azure | Redis 7.4, chosen by Azure Managed Redis |
| Local | Valkey 9.0 |
Every platform speaks the Redis 7.2 command set over RESP2 and RESP3.
Limits
| Limit | Value | Notes |
|---|---|---|
| Largest size | AWS 419 GiB node (about 314 GiB for data), Google Cloud 88 GB, Azure 24 GB | Larger requests fail instead of being capped. Azure NoCluster caps a database at 25 GB. |
| Databases | 0 only | |
| Resource ID | Part of the server's name | Keep it short and lowercase. |
Sizing
memory is the memory you want for data. Alien picks the smallest tier that fits, and the default is the smallest tier of at least 1 GiB.
AWS
ElastiCache reserves 25% of a node's memory for overhead, so usable data memory is 75% of the node.
| Node type | Node memory | Data memory |
|---|---|---|
cache.t4g.small (default) | 1.37 GiB | 1.03 GiB |
cache.t4g.medium | 3.09 GiB | 2.32 GiB |
cache.m7g.large | 6.38 GiB | 4.79 GiB |
cache.m7g.xlarge | 12.93 GiB | 9.70 GiB |
cache.r7g.xlarge | 26.32 GiB | 19.74 GiB |
cache.r7g.2xlarge | 52.82 GiB | 39.62 GiB |
cache.r7g.4xlarge | 105.81 GiB | 79.36 GiB |
cache.r7g.8xlarge | 209.55 GiB | 157.16 GiB |
cache.r7g.16xlarge | 419.09 GiB | 314.32 GiB |
Google Cloud
| Node type | Memory |
|---|---|
SHARED_CORE_NANO (default) | 1.12 GB |
STANDARD_SMALL | 5.2 GB |
HIGHMEM_MEDIUM | 10.4 GB |
STANDARD_LARGE | 20.8 GB |
HIGHMEM_XLARGE | 46.4 GB |
HIGHMEM_2XLARGE | 88 GB |
Azure
Azure Managed Redis, Balanced tier:
| SKU | Memory |
|---|---|
Balanced_B1 (default) | 1 GB |
Balanced_B3 | 3 GB |
Balanced_B5 | 6 GB |
Balanced_B10 | 12 GB |
Balanced_B20 | 24 GB |
Persistence
By default a Redis resource is a cache: data is lost when the server restarts or a node fails. .persistence() keeps data, and on AWS, Google Cloud, and Azure it needs .highAvailability() too. Setting .persistence() without it fails with "persistence needs highAvailability()" on all three clouds, before anything is created.
What survives, with both options on:
| Platform | Restart or maintenance | Node failure |
|---|---|---|
| AWS | The replica is promoted and data is kept. A daily snapshot is kept for rebuilding a node. | The replica is promoted. Writes not yet replicated are lost. |
| Google Cloud | The replica takes over and data is kept. RDB snapshots are taken. | The replica takes over. If both nodes fail, writes since the last RDB snapshot are lost. |
| Azure | High availability fails over and data is kept. RDB persistence is on. | Same as Google Cloud. |
| Local | The append-only file in the Docker volume is replayed. At most one second of writes is lost. | One container, so not applicable. |
ElastiCache for Valkey has no append-only file. Persistence there is the replica plus a daily snapshot.
On Local, .highAvailability() has no effect, and .persistence() works on its own.
High availability
Set it when you create the resource. It can't change afterwards.
| Platform | What .highAvailability() does |
|---|---|
| AWS | One replica with Multi-AZ automatic failover. |
| Google Cloud | One replica in another zone. |
| Azure | Azure Managed Redis high availability. |
| Local | Nothing. |
Changing a server
| Change | What happens |
|---|---|
memory up | Resized in place with data kept. AWS changes the node type, Google Cloud changes the node type, Azure scales the SKU. See the timings below. |
memory down | Rejected on Azure, which can't scale down. On AWS and Google Cloud it is sent as a node type change. Export what you need first: a smaller node can evict data. |
evictionPolicy | Applied in place with data kept. AWS changes the parameter group without a reboot, Google Cloud changes the engine config, Azure rewrites the database setting. |
persistence | Applied in place, subject to the high availability rule above. |
highAvailability | Rejected on every cloud once the server exists. Create a new Redis resource and move the data. |
encryptionKey | Can't change after the server exists. |
Alien refuses a change a cloud can't make, with what to do instead. It never ignores a setting.
Measured in test accounts, so expect similar but not guaranteed times:
- AWS: provisioning takes about 12 minutes. An eviction policy change applies at once. A node type change on a one-node group takes about 18 minutes.
- Google Cloud: provisioning takes about 5.5 minutes. A node type and eviction policy change together takes about 4.5 minutes.
- Azure: provisioning takes about 8.5 minutes. A SKU change takes about 16 minutes, and a second change is refused until it finishes. An eviction policy change takes seconds.
Drift
Alien compares the server with alien.ts on every health check. It never opens a Redis connection: it reads configuration and metrics from the cloud's API.
| Change made outside Alien | Live | Frozen |
|---|---|---|
| Eviction policy, node size, persistence | Repaired | Reported |
| Public network access turned on (Azure) | Repaired | Reported as degraded |
| Server deleted | Reported as a failure. Alien doesn't recreate it silently. | Same |
Alien reports memory use, evictions, connected clients, and replica health. A server at 90% memory or above, or with a replica down, is Degraded. If Alien can't read metrics, the report is marked partial, not unhealthy.
Lifecycle
Frozen or live. When frozen, the setup template (CloudFormation on AWS, Terraform on any cloud) creates the server during initial setup, and Alien imports and monitors it. When live, Alien creates, updates, and deletes it.
Deletion removes the data. Deleting the resource deletes the server with no final snapshot, on every cloud and in every setup template. Export the data first if you need it.
Passwords. On AWS, Alien generates the AUTH token and stores it in a Secrets Manager secret. On Google Cloud, Memorystore generates the token for the default user, and the workload reads it from Memorystore at load time.
On Azure, the workload lists the database's access key at load time, and Alien never reads it. The binding holds where to read the password, never the password.
Platform notes
AWS
A replication group with cluster mode disabled, a parameter group for the eviction policy, in-transit and at-rest encryption, and an AUTH token. It has its own security group that allows port 6379 only from the deployment's workloads. With a default VPC, it uses the default VPC's subnets, and ElastiCache has no public IP option, so the server stays private.
Google Cloud
Memorystore for Valkey with CLUSTER_DISABLED mode, token authentication, and TLS. It's reached through Private Service Connect, which needs a service connection policy for the network and region.
If the customer already has one, Alien uses it and never changes or deletes it. If not, Alien creates one for the stack and deletes it with the stack's last Redis resource on that network.
The server's CA is a chain of two certificates. The binding carries both. The certificate lists the endpoint's IP, so no server name override is needed.
Azure
Azure Managed Redis with NoCluster clustering and public network access disabled. Workloads reach it through a private endpoint, resolved through the privatelink.redis.azure.net private DNS zone. The zone is shared by every Redis resource in the stack and removed with the last one.
The port is 10000, not 6379. The server certificate chains to a public CA, so clients use the system trust store.
Kubernetes and Machines
Alien doesn't create Redis on Kubernetes or Machines. The customer provides a server, and Alien passes it to your workloads as an external binding with service: "external".
On Machines the resource must be "frozen". Networking, persistence, and eviction depend on that server.
Local
A container from the official valkey/valkey:9.0 image, run in Docker. alien dev fails with "Redis on Local runs in Docker" if no Docker engine is reachable.
- Bound to
127.0.0.1, plus the Docker bridge gateway so local Containers reach it throughhost.docker.internal. Never0.0.0.0. - Requires the generated password.
- With
.persistence(), data is kept in an append-only file in a Docker volume, synced every second. Without it, there is no volume. - Changing a setting recreates the container. Data is kept only with
.persistence(). - Docker restarts the container if it exits. Deleting the resource removes the container and its volume.