1, Repcached Introduction Repcached is a Japanese developed memcached replication function, it is a single master single slave scheme, but its master/slave are read-write, and can sync with each other, if Master is broken, slave detect the connection is broken, It automatically listen and becomes master, and if Slave is broken, master detects the connection break, and it listen waiting for the new slave to join
2, installation Install the memcached service separately on both servers, note libevent version of this article is: libevent-1.4.13, download address: http://www.monkey.org/~provos/libevent-1.4.13-stable.tar.gz
There are two ways of repcached:
Mode one, download the corresponding repcached version
#wget http://downloads.sourceforge.net/repcached/memcached-1.2.8-repcached-2.2.tar.gz
#tar ZXF memcached-1.2.8-repcached-2.2.tar.gz
#cd memcached-1.2.8-repcached-2.2
"mode two, download the corresponding patch version #wget http://downloads.sourceforge.net/repcached/repcached-2.2-1.2.8.patch.gz
#gzip-CD. /repcached-2.2-1.2.8.patch.gz | Patch-p1 "
#./configure–enable-replication
# make
# make Install
View slave
#telnet 192.168.0.163 11213
#get Key1
If blog.5sail.com is displayed normally, the repcached configuration is successful
5. Application: Cache redundancy can be achieved to avoid data loss due to cache server down.
Note: If Master down machine, slave take over and become master, then down machine master can only enable slave, they interchange roles, in order to maintain the copy function. In other words, Master has no preemption capabilities.
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.