A: Learning Prerequisites
1. Redis Getting Started Guide cloud disk
2. VMware uses the window system to install a virtual machine
3. CentOS
Three: Introduction
1. History and Development
<1> High-performance key-value pairs database: (data structure server, data structure database)
C # List,hashset, dictionary
Javaarraylist Map
Features: Shared memory [dedicated memory]
Persistence of
2. Features
Features on the <1> storage structure
"1" String type
"2" Hash type Map,dictinary
"3" List type ArrayList lists
"4" collection type HashSet
"5" Ordered collection type (skiplist) sortdictionary "red black Tree" curd (LOGN)
<2> Memory storage and persistence
Data is stored in memory and persisted to the hard disk.
<3> feature Rich
As Database,cache,queue,redis can do mq,rabbitmq,activemq,zeromq.
Redis as a queue, not suitable for large data volumes, if not a front-line internet company may encounter bottlenecks, you can use
<4> Simple and stable
1. Simple Syntax (get,set)
2. Stability
Four: How to install Redis (CentOS)
1. Download the compressed package wget http://download.redis.io/releases/redis-3.0.5.tar.gz
2. Unzip the tar xzf redis-3.0.5.tar.gz
3. Go to Redis folder CD redis-3.0.5
4. Compile Make
5. Running Redis src/redis-server
Redis defaults to 6379 ports
Redis-server Redis Server
REDIS-CLI Redis Client
Redis-sentinel Dual Machine Hot standby
The difference between Redis and memcache
In performance, Redis is a single-threaded model, which is single-threaded at least on input and output, and not necessarily absolutely hundred single-threaded, such as persistent
While Mamcache is a multithreaded model, the latter performance is higher on multicore servers.
Redis performance is good enough, the vast majority of usage scenarios, performance is not a bottleneck, we should consider the difference in data storage, Redis provides more data storage structure, string,list,hashset,set,sorted set
The architect is proficient in Redis one