analysis and construction of high availability Redis service architecture
Article from: http://www.cnblogs.com/xuning/p/8464625.html
Redis based on memory should be the most commonly used Key-value database in various web development business, we
analysis and construction of high availability Redis service architecture
Redis based on memory should be the most commonly used Key-value database in various web development business, we often use it to store user login state (session storage) in
Reason Analysis:
There is a Readme file under the Redis unpacking package that opens this file for a passage.
Llocator---------Selecting a Non-default memory allocator when building Redis are done by settingThe ' MALLOC ' environment variable. Redis
Windows Redis InstallationDownload Windows version redis or github download
Unzip the download of the compressed package is the following figure:
Three ways to start: Enter the Downloads folder to select the version you want to unzip into the folder:
Redis is a high-performance key-value database. The emergence of Redis, to a large extent, compensates for the shortage of such key-value storage in memcached, and in some cases can complement the relational database well. It provides a
What persistence mechanisms are provided by Redis:
1). RDB Persistence:
This mechanism is to write a snapshot of an in-memory dataset to disk at a specified time interval.
2). AoF Persistence:
This mechanism will log every write that the server
Ready to
Modify the Pidfile to prepare for the following
Turn off RDB persistence to modify the location where the persisted file is saved
Start Redis
Redis-server/etc/redis.conf
Using Client connections Redis
Redis-cli
The connection is
Straight to the topic, the Java Connection virtual machine error, the code is as follows:
public class Testping {public static void Main (string[] args) {Jedis Jedis = new Jedis ("192.168.201.128", 6379);System.out.println (Jedis.ping ());}}
To run
Transferred from: http://www.linuxidc.com/Linux/2012-12/75693.htm
Suppose two redis servers, IP: 192.168.1.101 and 192.168.1.103, how to access the Redis on the 103 on 101 through REDIS-CLI. Before remote connection 103, let's talk about some key
REDIS-2.4.15 currently does not provide cluster functionality, the Redis author says in a blog that the cluster mechanism will be implemented in 3.0. At present, the method of cluster implementation of Redis mainly uses the consistent ha-sparse
Redis High Availability
Demand
(1) Redis is run in a Docker container, (2) to realize the dual-machine hot standby, when the redis-master is abnormal, Redis-slave quickly switch to master to provide services.(3) When the Redis-master data is
First, the preparatory work
Items
version
update or download URL
Windows 10
64 guests
Slightly
IntelliJ idea
2017.1.5
http://www.jetbrains.com/idea/
JDK8
64 guests
Http:
Currently Redis supports two persistence modes, one is snapshotting (snapshot) and the other is Append-only file (AOF).Snapshotting (snapshot): The default persistence mode, which is to write in-memory data to a binary file in a snapshot (the
Redisobject
First, Redis internally uses a Redisobject object to represent all key and value,redisobject most important information as shown in the figure above: type represents what data type a value object is, Encoding is how different data types
Getting started with Redis action note
Upload unzip make to folder install to the specified folder makes Prefix=/usr/local/ridis install into/usr/local/ridis can see the bin directory inside there are REDIS-CLI and redis-service, etc. Into
Although Redis is a memory-based storage system, it natively supports the persistence of in-memory data and provides two main persistence strategies: The Rdb snapshot and the AoF log describe the two different persistence strategies, respectively: 1.
A: Introduction
Redis transactions are usually done using commands such as Multi,exec,watch, and the Redis implementation mechanism is very much different from common relational databases, such as Redis transactions that do not support rollback,
Five basic Types
Key (keys)
Common commands:
Keys * Check the name of all keys exists keys in the current library
to determine if a key exists. A return of 1 indicates that there is, and 0 means not present.
move key (that key) db (which library,
original works, reproduced please indicate: http://blog.csdn.net/Xiejingfa/article/details/50550416
In the previous article, "Redis Note (ii)" In the Redis data structure-string string, we learned about Redis's most basic data structure, string, and
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.