Deployment
Every guide here was built from an empty AWS account with the commands shown, checked against a real cluster, and torn down with the commands at its end. Start with what every deployment needs, then pick the shape that matches how you run things.
Before any shape
- What every deployment needs
— the operations endpoint (
/healthz,/readyz,/metrics), the metrics to scale on, and the SIGTERM drain that makes scale-in lossless.
Shapes
- Single node on EC2 — one node, no discovery, no replication: a cache whose contents are lost with the instance and nothing else. Network, security groups, an SSM-only role, systemd from user-data.
- Cluster on EC2 — one
seed instance running discovery and a node at a fixed address, any
number of identical nodes, grown by launching more from an image of a
node; planned removal with
systemctl stop. No orchestrator, no Auto Scaling group. - Cluster on ECS (Fargate, multi-AZ) — discovery and nodes as services behind Cloud Map across two zones, grown by the node service's desired count, with a drain through SIGTERM on the way down.
- Cluster on EKS (multi-AZ) — the same cluster as Kubernetes manifests: an eksctl cluster from one config file, a Deployment per role, grown by the node Deployment's replica count, the same drain.
- The proxy tier — when a
cluster needs
nanocached-proxy, where it runs (with the cluster, in the cluster's own shape: a third ECS service, a third Deployment), how many, and how applications reach it; verified on ECS, with the EKS manifests and the sidecar alternative.