Memcached Getting Started
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.

If you have installed Websoft9 Memcached, the following steps is for your quick start
Preparation
- Get the Internet IP of your Server on Cloud
- Check your Inbound of Security Group Rule of Cloud Console to ensure the TCP:11211,9090 is allowed
- Complete Five steps for Domain if you want to use Domain for Memcached
- Get default username and password of Memcached
Memcached Initialization
Steps for you
-
Use SSH tool to connect Memcached Server, then install Telnet
yum install telnet -
Use the telnet to connect Memcached
telnet 127.0.0.1 11211Trying 127.0.0.1...Connected to 127.0.0.1.Escape character is '^]'. -
Run the command
statsto show all Memcached STAT when connection successfulSTAT pid 651STAT uptime 891STAT time 1585225158STAT version 1.4.15STAT libevent 2.0.21-stableSTAT pointer_size 64STAT rusage_user 0.005846STAT rusage_system 0.017539STAT curr_connections 10STAT total_connections 12STAT connection_structures 11STAT reserved_fds 20STAT cmd_get 0STAT cmd_set 0STAT cmd_flush 0STAT cmd_touch 0STAT get_hits 0STAT get_misses 0STAT delete_misses 0STAT delete_hits 0STAT incr_misses 0STAT incr_hits 0STAT decr_misses 0STAT decr_hits 0STAT cas_misses 0STAT cas_hits 0STAT cas_badval 0STAT touch_hits 0STAT touch_misses 0STAT auth_cmds 0STAT auth_errors 0STAT bytes_read 52STAT bytes_written 21STAT limit_maxbytes 67108864STAT accepting_conns 1STAT listen_disabled_num 0STAT threads 4STAT conn_yields 0STAT hash_power_level 16STAT hash_bytes 524288STAT hash_is_expanding 0STAT bytes 0STAT curr_items 0STAT total_items 0STAT expired_unfetched 0STAT evicted_unfetched 0STAT evictions 0STAT reclaimed 0END -
Run the command
quitif you want to exist Memcached -
Test Memcached Web-based GUI tool Memcached-admin
More useful Memcached guide, please refer to Memcached Wiki
Having trouble?
Below is for you to solve problem, and you can contact Websoft9 Support or refer to Troubleshoot + FAQ to get more.
Can't connect Memcached by Telnet?
Please make sure you Telnet installed and port 11211 enabled
Memcached QuickStart
For more information, please refer to:Memcached Wiki
Memcached Setup
Memcached GUI
Memcached deployment package includes Web-GUI tool Memcached-admin for monitor
Follow the steps below to use it:
-
Login Cloud Console, make sure the TCP:9090 port is allowed on Inbound of Security Group Rule.
-
Use the Chrome or FireFox to access URL http://Server's Internet IP:9090.
-
Enter username and password of MySQL. (Don't know password?)
-
Start to manage Memcached-admin now.

Memcached Cluster
More details about refer to Memcached Cluster
Reference sheet
The below items and General parameter sheet is maybe useful for you manage Memcached
Run docker ps command, view all Containers when Memcached is running:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
34e1af9ace07 memcached:latest "docker-entrypoint.s…" About a minute ago Up About a minute 0.0.0.0:11211->11211/tcp, :::11211->11211/tcp memcached
f3956c005325 hatamiarash7/memcached-admin:latest "docker-php-entrypoi…" About a minute ago Up About a minute 0.0.0.0:9090->80/tcp, :::9090->80/tcp memcached-panel
Path
Memcached installation directory:/data/apps/memcached
Port
| Port | Use | Necessity |
|---|---|---|
| 11211 | Remote access to Memcached | Optional |
| 9090 | Visit Memcached Admin | Optional |
Version
# Memcached version
docker inspect memcached | grep MEMCACHED_VERSION
Service
sudo docker start | stop | restart | stats memcached
sudo docker start | stop | restart | stats memcached-admin
CLI
Telnet client
Memcached does not provide specific client. However, standard tools like telnet are enough to test container. Under Linux it is possible to connect by CLI command. We can invoke telnet from host machine, to connect to running Memcached server
- Use SSH to connect Sever and use Telnet connect Memcached
telnet 127.0.0.1 11211
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
- Then, input
statscommand to list all configuration of Memcached
More details please refer to docs: Memcached Commands
Commandline Arguments
If you want to configure Memcached Server, you should configure Commandline Arguments by like below steps:
-
Use SFTP to connect Server and edit /data/db/memcached/docker-compose.yml file, add more items for command parameter
version: '3.8'services:memcached:image: memcached:${APP_VERSION}container_name: ${APP_CONTAINER_NAME}restart: alwayscommand:- '-m 800' -
Recreate containers
cd /data/db/memcachedsudo docker-compose up -d