First, the preparation of more than one Linux machine, the normal production environment in accordance with the deployment of Redis cluster is required 3 machines, 1 s machine dual-node (master node, from node), 3 machines 6 nodes cluster. Redis
First, Redis introduction
Redis is one of the most popular NoSQL systems, and it is a key-value storage system. Similar to memcache, but largely compensates for the lack of memcache, which supports a relatively large number of stored value types,
If you do not make any changes to the Linux kernel before booting, the Redis launch warns you of a total of three: The following figure shows
First Warning: The TCP backlog setting of 511 cannot be enforced because/proc/sys/net/core/somaxconn are
With the further development of web2.0, the productivity of netizens is further improved and the total amount of storage begins to increase. While it is still a mode of reading and writing less, the amount of writing has been greatly improved. The
First, introduce
Redis is completely open source free, compliant with the BSD protocol, and is a high-performance key-value database. Redis and other Key-value cache products have the following three features: Redis support the persistence of data,
1, decompression: TAR-ZXVF redis-3.0.0.tar.gz2, LL3. CD redis-3.0.0Must have makefile at compile time4. Make
[Root@localhost redis-3.0.0]# make
cd src && do all
make[1]: Enter directory "/USR/JAVA/REDIS-3.0.0/SRC"
CC ADLIST.O in
file included
Original address: http://blog.csdn.net/caiwenfeng_for_23/article/details/45666831
PS: Until 2015-05-12 is not supported TOMCAT8, details see official website: Https://github.com/jcoleman/tomcat-redis-session-manager
Prerequisite: You have deployed
Like the reason for MySQL master-slave replication, Redis reads and writes are particularly fast, but it can also produce a particularly high read pressure situation. In order to share the read pressure, Redis supports master-slave replication, and
Redis is an open source API that is written in ANSI C, supports the web, can be persisted in memory, key-value databases, and provides multiple languages.
Redis is a key-value storage system. Similar to memcached, it supports storing more value
keys keyword common directives
Here bloggers first set K1 v1 k2 v2Exists key
Determine if key exists
Move Key Dbnum
Move key values to Dbnum libraryHere move K1 to library 2nd, view current library only K2, after switching to library 2nd, view the
Single process
Redis single process model, to handle client requests, by wrapping the Epoll function, the actual processing speed of Redis relies entirely on the execution efficiency of the process. Epoll, the Linux kernel's improved epoll for
Set set common operations directives
Set is a single-valued, multi-value data structure that does not allow the same elements to existSadd key value [value]
Adding elements to form the association of key and valueNote that if we enter a value with
Brief introduction
MongoDB is more like MySQL, support field index, cursor operation, the advantage is that the query is more powerful, good at querying JSON data, can store large amounts of data, but does not support transactions.
MySQL is
Write by Yin Mingjun, quote please specify.
The article was originally sent in the Baidu space, Baidu said there are problems, had to send to CSDN.
The previous article described how to use Sentinel to create a highly available master and
Starting with this article (called The Redis Analysis series), you will explore the internal implementation of Redis by analyzing its source code (with the Redis 2.2.0 RC1 as the standard). This article mainly introduces the Redis boot loading
Persistence Options
directory where persistent files are stored:
Dir./
snapshot Persistence (snapshotting)
Store all data to diskCommon configurations:
Save
stop-writes-on-bgsave-error No
rdbcompression Yes
dbfilename Dump.rdb
There are several
Pipelines and multiplexers
The delay is intolerable. Modern computers can generate data at an alarming rate, and high-speed Internet (often with multiple parallel connections between important servers) provides great bandwidth, but this nasty delay
1.strings (String)
A) If you use only the string type in Redis and do not use the persistence feature of Redis, then Redis is very much like memcache;
b) When a numeric operation is encountered, it is automatically converted to a string, such as
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.