Python "10" "Network Programming"-Memcache, Redis, RabbitMQ, SQLAlchemy

Source: Internet
Author: User
Tags memcached rabbitmq

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.