Docs

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:

CommandAWSGoogle CloudAzure
CONFIG GET / CONFIG SETRejectedRejectedReturns nothing, SET is rejected
DEBUGNot availableNot allowedNot 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.

PlatformEngine
AWSValkey 9.0
Google CloudValkey 9.0
AzureRedis 7.4, chosen by Azure Managed Redis
LocalValkey 9.0

Every platform speaks the Redis 7.2 command set over RESP2 and RESP3.

Limits

LimitValueNotes
Largest sizeAWS 419 GiB node (about 314 GiB for data), Google Cloud 88 GB, Azure 24 GBLarger requests fail instead of being capped. Azure NoCluster caps a database at 25 GB.
Databases0 only
Resource IDPart of the server's nameKeep 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 typeNode memoryData memory
cache.t4g.small (default)1.37 GiB1.03 GiB
cache.t4g.medium3.09 GiB2.32 GiB
cache.m7g.large6.38 GiB4.79 GiB
cache.m7g.xlarge12.93 GiB9.70 GiB
cache.r7g.xlarge26.32 GiB19.74 GiB
cache.r7g.2xlarge52.82 GiB39.62 GiB
cache.r7g.4xlarge105.81 GiB79.36 GiB
cache.r7g.8xlarge209.55 GiB157.16 GiB
cache.r7g.16xlarge419.09 GiB314.32 GiB

Google Cloud

Node typeMemory
SHARED_CORE_NANO (default)1.12 GB
STANDARD_SMALL5.2 GB
HIGHMEM_MEDIUM10.4 GB
STANDARD_LARGE20.8 GB
HIGHMEM_XLARGE46.4 GB
HIGHMEM_2XLARGE88 GB

Azure

Azure Managed Redis, Balanced tier:

SKUMemory
Balanced_B1 (default)1 GB
Balanced_B33 GB
Balanced_B56 GB
Balanced_B1012 GB
Balanced_B2024 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:

PlatformRestart or maintenanceNode failure
AWSThe 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 CloudThe 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.
AzureHigh availability fails over and data is kept. RDB persistence is on.Same as Google Cloud.
LocalThe 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.

PlatformWhat .highAvailability() does
AWSOne replica with Multi-AZ automatic failover.
Google CloudOne replica in another zone.
AzureAzure Managed Redis high availability.
LocalNothing.

Changing a server

ChangeWhat happens
memory upResized 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 downRejected 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.
evictionPolicyApplied in place with data kept. AWS changes the parameter group without a reboot, Google Cloud changes the engine config, Azure rewrites the database setting.
persistenceApplied in place, subject to the high availability rule above.
highAvailabilityRejected on every cloud once the server exists. Create a new Redis resource and move the data.
encryptionKeyCan'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 AlienLiveFrozen
Eviction policy, node size, persistenceRepairedReported
Public network access turned on (Azure)RepairedReported as degraded
Server deletedReported 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 through host.docker.internal. Never 0.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.

On this page