A Memcached Resource is defined in convox.yml
and linked to one or more Services.
resources:
main:
type: memcached
services:
web:
resources:
- main
In addition to containerized resources, Convox v3 allows the creation of Memcached resources via AWS ElastiCache. This provides enhanced durability and managed service benefits. Below is a general example of how to define AWS ElastiCache Memcached resources:
resources:
cache:
type: elasticache-memcached
options:
class: cache.t3.micro
version: 1.6.6
deletionProtection: true
durable: true
encrypted: true
autoMinorVersionUpgrade: true
nodes: 2
services:
web:
resources:
- cache
Note: The
nodes
option is required for Memcached and must be set to the desired number of nodes for the Memcached cluster.
Below is a chart of configuration options available for AWS ElastiCache Memcached resources:
Attribute | Type | Description |
---|---|---|
nodes | int | Required. The number of nodes in the Memcached cluster. |
class | string | The compute and memory capacity of the cache instance. |
version | string | The version of the cache engine. |
deletionProtection | boolean | Whether to enable deletion protection for the cache instance. |
durable | boolean | Whether to create a Multi-AZ cache instance. |
encrypted | boolean | Whether to enable encryption at rest for the cache instance. |
autoMinorVersionUpgrade | boolean | Whether to allow automatic minor version upgrades for the cache engine. |
import | string | The cache identifier used for cache import. |
Important: The
deletionProtection
option is managed by Convox and is not an AWS feature. It is used to prevent the resource from being removed if accidentally deleted from theconvox.yml
file. IfdeletionProtection
is enabled, the resource will not be deleted even if it is removed from the manifest.
$ convox resources -a myapp
NAME TYPE URL
cache elasticache-memcached memcached://hostname:port
$ convox resources info cache -a myapp
Name cache
Type elasticache-memcached
URL memcached://hostname:port
$ convox resources url cache -a myapp
memcached://hostname:port
$ convox resources proxy cache -a myapp
Proxying localhost:11211 to hostname:port
Proxying allows you to connect tools on your local machine to Resources running inside the Rack.