Deploy Memcached with flags
A managed Memcached instance lives inside a project and is reachable from any container in that project. Run a single node for caches you can afford to lose, or scale out to multiple nodes for higher capacity.
A managed Memcached instance lives inside a project and is reachable from any container in that project. Run a single node for caches you can afford to lose, or scale out to multiple nodes for higher capacity.
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-1That gets you a single-node Memcached instance with 256 MB of memory. Sensible defaults handle everything else.
A more typical deploy
A multi-node 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 \
--regions falkenstein-1 \
--regions virginia-1Flag reference
| Flag | Description | Default |
|---|---|---|
--name | Display name (required) | — |
--handle | Immutable handle (required) | — |
--project | Project handle the instance belongs to | — |
--regions (-r) | Active region — repeatable | required |
--memory | Memory per node in MB | 512 |
--max_connections | Concurrent connections per node | 1024 |
--threads | Worker threads per node | 4 |
--max_item_size_mb | Largest item the cache will accept (max 128) | 1 |
--nodes | Number of nodes (1-9) | 1 |
Interactive create
Omit the required flags and Reis walks you through the prompts, fetching available regions and projects from the API:
reis memcached:createUpdating an instance
# Resize memory per node
reis memcached:update session-cache --memory 2048
# Add nodes
reis memcached:update session-cache --nodes 5Each 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.
Multi-node instances work with any consistent-hashing memcached client (libmemcached-based clients, twemproxy, mcrouter). Single-node instances are reachable at one hostname/port pair you point the client at directly.
Related
- Deploy Memcached with YAML — declarative version
- Deploy an HTTP container with flags — for the service that fronts the cache
- Flag mode overview — repeatable flags, booleans, short aliases