Knowledge Reference: Baidu Encyclopedia , mr.7
Memcached
1. Basic cognition
Memcached is a high-performance distributed memory object caching system for dynamic Web applications to mitigate database load. It improves the speed of dynamic, database-driven Web sites by caching data and objects in memory to reduce the number of times a database is read. Memcached is based on a hashmap that stores key/value pairs. Its daemon (daemon) is written in C, but the client can write in any language and communicate with the daemon through the memcached protocol.
2. Installation and use
(1) Installation
wget http://memcached.org/latesttar-zxvf memcached-1.x.x.tar.gzcd memcached-1.x.x./configure && Make & & make Test && sudo make install
(2) Start & Test Connection
# Start memcachedmemcached-d-M- u root-l 10.0.7.4-p 12000-c 256-p/tmp/memcached.pid parameter Description:- D is the start of a daemon C2/>-m is the amount of memory that is allocated to memcache, in megabytes- U is the user running Memcache- L is the listener's server IP address- p is the port that sets the memcache listener, preferably more than 1024 ports The- c option is the maximum number of concurrent connections, the default is 1024, according to the load on your server to set- p is set to save memcache PID File # # Play with telnet$ telnet localhost 11211Trying 127.0.0.1...Connected to localhost. Escape character is ' ^] '. Get foovalue foo 0 2hiENDstatsSTAT pid 8861 (etc)
(3) memcached common commands
3. Python memcached API
Redis
RabbitMQ
SQLAlchemy
1
Python "10" "Network Programming"-Memcache, Redis, RabbitMQ, SQLAlchemy