Original website: http://www.jianshu.com/p/c2ab606b00b7
One, single instance
When there is only one Redis runtime in the system, once the Redis is hung up, the entire system will not run.Single instance two, backup
Because single Redis has a single point of failure, it will cause the whole system is not available, so the idea is to backup (the general industry
indexes with radius queries. Redis has built-in replication, Lua scripting, LRU eviction, transactions and different levels of on-disk persistence, and provides high availability via Redis Sentinel and automatic partitioning with Redis Cluster.Configure linux in redis
Linux download Installation Reference official web
crash Ed "Else echo" starting Redis server ... "$EXEC $CONF fi if [" $? "
= "0"] then echo "Redis is running ..." FI;
STOP) if [! f $PIDFILE] then echo "$PIDFILE does not exist, process isn't running" Else pid=$ (cat $PIDFILE) echo "Stopping ..." $REDIS _cli-p $REDISPORT SHUTDOWN while [-X ${pidfile}] do echo waiting for
Redis-Sentinel is the monitoring and management, notification, and instance failure backup service of redis instances. It is a management tool for redis clusters. In a general distributed central node database, redis-Sentinel is used for the work of the central node. It moni
example, for example, the current cluster has 3 nodes, then: node A contains 0 to No. 5500 hash slots. Node B contains 5501 to 11,000th hash slots. Node C contains 11001 to 16,384th hash slots.
This structure is easy to add or remove nodes. For example, if I want to add a new node D, I need to get some slots from node A, B, C to D. If I were to remove node A, I would need to move the slots in a to the B and C nodes. You can then remove a node without any slots from the cluster. Since a hash slo
Label:Introduction of Master-slave replication architecture Through the previous introduction, we are all on a single use of Redis for related practices, from this chapter, we will initially explore the Redis cluster, and the most classic cluster architecture is the master-slave replication architecture. So, first of all, let's see if God's horse is a master-slave replication architecture.1.1 Read-write sep
/redis/binMkdir-p/usr/local/redis/ectb) Execute the Linux file Move command:Copy the code code as follows:Mv/lamp/redis-3.0.7/redis.conf/usr/local/redis/etcCd/lamp/redis-3.0.7/srcMV mkreleasdhdr.sh Redis-benchmark
test it, we need to re-open a terminal. If it is changed to yes, redis is run in the background. In addition, the pid file, log file, and data file address are specified in the configuration file. If you need to modify the address first, the default log information is directed to the standard output.
[Root @ localhost redis-3.0.2] # echo 'vm. overcommit_memory = 1'>/etc/sysctl. conf[Root @ localhost
Maxmemory-policy to do the appropriate cleanup (usually LRU or TTL), where the LRU or TTL policy is not for all of the Redis key, Instead, the Maxmemory-samples key in the configuration file is sampled as a sample pool.The default configuration of the Maxmemory-samples in redis-3.0.0 is 5, and if increased, the accuracy of the LRU or TTL is improved, the result of the
Introduction of Master-slave replication architecture
Through the previous introduction, we are all on a single use of Redis for related practices, from this chapter, we will initially explore the Redis cluster, and the most classic cluster architecture is the master-slave replication architecture. So, first of all, let's see if God's horse is a master-slave replication architecture.
Redis, as a high-performance key-value storage service, has always performed well on a single instance, but it has long been lacking in support of an official high-availability solution. As a result, Redis-sentinel came into being, providing high-availability support transparent to clients. The following article systematically explains the principle of
/redis/binMkdir-p/usr/local/redis/ectb) Execute the Linux file Move command:Copy the code code as follows:Mv/lamp/redis-3.0.7/redis.conf/usr/local/redis/etcCd/lamp/redis-3.0.7/srcMV mkreleasdhdr.sh Redis-benchmark
scenarios:The single m-s structure is applicable to different user data, but the application can realize the business model of read/write separation. Master mainly provides write operation, slave mainly provides read operation, make full use of hardware resources.The dual (multi) m-s structure is suitable for non-existent or less data-related business models, and read-write efficiency is two (multiple) times of single m-s, but requires a single server to assume two Mater
Redis installation started successfully.Note: Two cmd windows open at the same time, the Redis window can not be turned offThird, PHP extension1. Copy the downloaded php_redis.dll and php_igbinary.dll extension files to the Php\ext2. Open php.ini; Add the following code[HTML]View PlainCopy
#php for Redis
extension=Php_igbinary.dll
extension=Php
test the results, the performance is only half the original. (It was very fast, hoping to achieve similar performance)
You can consider removing haproxy, but keepalived is very necessary, and the VIP returned by keepalived is always available with Redis's master, which is managed by Redis Sentinel for Redis failover.
When the master of Redis is switched, the hos
Once again misled by those tutorials on the web decided to write one yourself. I've been misled by the strange tutorials a few times, and I've been studying other things before. The egg hurts.Installing RedisYou can use the Apt-get command directlysudo apt-get install Redis-serverThe installation will ask you a thing, enter Y on the line.The Redis service will st
Redis shutdown command
/Usr/local/redis-cli-H 127.0.0.1-P 6379 shutdown to shut down the redis server. Be sure to specify the IP address and port of the redis server to be shut down.
The following references the original author's document original author link http://www.hello-code.com/blog/nosql/201404/3238.html1. Go
understand the differences and advantages and disadvantages between them. The following begins the installation of Redis on Linux.Back to Topinstalling Redis under LinuxDownload the Redis installation package: http://redis.io/Compiling the source program[Email protected] ftpuser]# tar zxvf redis-3.2.0.tar.gz[Email pro
service when this machine is from service (note)#slaveof#14, set the connection password for the primary service when this computer is from service (note)#masterauth#15, Connection password (note)#requirepass foobared#16, maximum number of client connections, default unrestricted (note)#maxclients 128#17, set the maxi
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.