juju deploy charmers-memcached
|latest/stable||30||30||18 Mar 2021|
|latest/edge||28||28||18 Mar 2021|
A high-performance memory object caching system Read more
Discuss this charm
Share your thoughts on this charm with the community on discourse.
Memcached is a Free & open source, high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load.
Memcached is an in-memory key-value store for small chunks of arbitrary data (strings, objects) from results of database calls, API calls, or page rendering.
You can deploy a memcached instance with
juju deploy memcached
Memcached listens to port 11211 on the internal network, it is not recommended to expose memcached directly to the open internet. If you want to check that it has deployed correctly you can ssh into the unit and then check the port by hand:
juju status memcached juju ssh memcached/3 echo "stats settings" | nc localhost 11211
The "3" in this case is an example, the
juju status memcached will show you which machine number the service is running on so you can
juju ssh to it.
The charm uses the repcached patch ( http://repcached.lab.klab.org/ ), this patch has some limitations, as the ability to just replicate between 2 nodes.
For enabling replication create a config.yaml file with the following content:
```yaml memcached: repcached: True ```
Then deploy a maximum of 2 units of memcached:
juju deploy -n 2 config.yaml memcached
Caution : As per design limitations, If you try to add another unit of memcached, all the units will be
set as standalone you decide to disable repcached by using
juju set memcached repcached=false and re-deploy the
Or you can deploy 2 units and then enable replication by running juju deploy -n 2 memcached juju set memcached repcached=true
Removing a unit
Removing one of the cluster units, means remove replication, please disable replication first and then remove the unit safely.
juju set memcached repcached=false juju remove-unit memcached/0
For turning the replication support off on memcached, you need to run the following command:
juju set memcached repcached=false
This charm can be used with other charms, in particular make note of these possible relations
To use memcached with the Rails charm follow these instructions
Scale out Usage
juju add-unit memcached
To add more units. Memcached doesn't share load, it's very simple and the clients have the intelligence to know which server to pick.
To use this charm with nrpe-external-master:
juju deploy memcached juju deploy local:trusty/nrpe-external-master juju add-relation memcached nrpe-external-master
For more details see the nrpe-external-master charm. Until there is a version of nrpe-external-master in trusty, you will need to use a local copy of the precise charm branched into an appropriate trusty directory.
Known Limitations and Issues
Standard configuration options are provided, we recommend scanning the Memcached documentation before tweaking the default configuration.