memcached Introduction
Today, more and more Web applications are starting to use memcached, the high-speed cache server software. However, Memcached's basic knowledge is far from being as pervasive as other web technologies, and memcached's large-scale applications in the country are well known. Japan's Mixi (mixi.jp) is in the front, not only the large-scale use of memcached as a slow
To accelerate Web applications, and to develop a range of related software, such as Tokyo Cabinit, Tokyo tyrant, etc.
It is written by the two engineers Noya, former Sakamoto, of the systems Operations Group of Mixi Co., Ltd. and is responsible for the daily operation of the program. This article describes the internal structure and use of the most recent hot topic in the area of extensibility for Web applications, memcached. This serial language is simple and easy to read, and is ideal for people who are memcached to get started.
Thank you very much for Charlee translating it into Chinese.
memcached comprehensive analysis is divided into five chapters, case studies, recommended reading and learning, Chinese version of the PDF document.
Chapter One basics of memcached
What is 1.1 memcached?
Characteristics of 1.2 memcached
Simple protocol
Libevent-based event handling
Built-in memory storage mode
Memcached distributed without communication with each other
1.3 Installing Memcached
Installation of memcached
memcached Start-up
1.4 Connecting with clients
1.5 using cache::memcached
Connect memcached with cache::memcached
Save data
Get Data
Delete data
Add one and subtract one operation
1.6 Summary
Chapter II Understanding the memory storage of memcached
2.1 Slab allocation mechanism: Defragment memory for reuse
Main terms of Slab allocation
2.2 How to cache records in slab
Disadvantages of 2.3 Slab Allocator
2.4 Tuning with growth factor
2.5 Viewing the internal state of the memcached
2.6 Viewing the usage status of slabs
2.7 Summary
Chapter III deletion mechanism and development direction of memcached
3.1 memcached Efficient use of resources in data deduplication
The data doesn't really disappear from the memcached.
Lazy Expiration
3.2 LRU: The principle of effectively deleting data from the cache
The latest development direction of 3.3 memcached
About the binary protocol
Format of the binary protocol
A striking place in the header
3.4 External engine support
The need for external engine support
The key to the success of simple API design
Re-examine the current system
3.5 Summary
The fourth chapter memcached distributed algorithm
4.1 Memcached's distributed
What does memcached mean by distributed?
The distributed method of 4.2 cache::memcached
Calculate dispersion based on remainder
Disadvantages of dispersion calculation based on remainder
4.3 Consistent Hashing
A brief description of consistent hashing
Library of functions supporting consistent hashing
4.4 Summary
The fifth chapter memcached application and Compatibility program
5.1 Mixi Case Study
Server Configuration and number
memcached process
Memcached using methods and clients
5.2 Memcached Application Experience
Start with Daemontools
Monitoring
Performance of memcached
5.3 Compatible applications
Tokyo Tyrant Case
5.4 Summary
memcached Comprehensive Analysis