Deploy Memcached with flags

A managed Memcached instance lives inside a project and is reachable from any container in that project. Pick between a single node (standalone) for caches you can afford to lose and a multi-node cluster for higher capacity and partition tolerance.

Updated 23 Jun 20262 min read

A managed Memcached instance lives inside a project and is reachable from any container in that project. Pick between a single node (standalone) for caches you can afford to lose and a multi-node cluster for higher capacity and partition tolerance.

For the YAML-mode equivalent, see Deploy Memcached with YAML.

Minimal create

reis memcached:create \
  --project my-project \
  --name "Session Cache" \
  --handle session-cache \
  --memory 256 \
  --regions falkenstein-1

That gets you a single-node Memcached instance with 256 MB of memory. Sensible defaults handle everything else.

A more typical deploy

A clustered cache sized for a busy production workload:

reis memcached:create \
  --project my-project \
  --name "Session Cache" \
  --handle session-cache \
  --memory 1024 \
  --max_connections 4096 \
  --threads 8 \
  --max_item_size_mb 4 \
  --nodes 3 \
  --mode cluster \
  --regions falkenstein-1 \
  --regions virginia-1

Flag reference

FlagDescriptionDefault
--nameDisplay name (required)
--handleImmutable handle (required)
--projectProject handle the instance belongs to
--regions (-r)Active region — repeatablerequired
--memoryMemory per node in MB512
--max_connectionsConcurrent connections per node1024
--threadsWorker threads per node4
--max_item_size_mbLargest item the cache will accept (max 128)1
--nodesNumber of nodes (1-9)1
--modestandalone or clustercluster

Interactive create

Omit the required flags and Reis walks you through the prompts, fetching available regions and projects from the API:

reis memcached:create

Updating an instance

# Resize memory per node
reis memcached:update session-cache --memory 2048
 
# Add nodes
reis memcached:update session-cache --nodes 5
 
# Switch topology
reis memcached:update session-cache --mode standalone --nodes 1

Each update flag overrides only the field you pass; everything else stays as it was.

Connecting from a container

Once the instance is running, the platform exposes its hostname inside the project's private network. The container can reach it directly — no further configuration needed.

Cluster mode works with any consistent-hashing memcached client (libmemcached-based clients, twemproxy, mcrouter). Standalone mode is a single hostname/port pair you point the client at directly.