Step one: Yum install redis -- install the redis Database Step two: Enable the redis service after the installation is complete. Service redis start Systemctl start redis. Service -- enable redis Service PS-Ef | grep redis -- check whether redis
First access redis. Io to download the latest stable version 2.2.12, then follow the steps below 0, tar-xvzf redis-2.2.12.tar.gz
1, CD redis-2.2.12
2, make
3, edit redis/redis. conf, set maxmemory 100 MB (here, we just for test, so this size is set
1. From the storage medium, its data is stored in the memory, which is quite fast. Similar to hashmap, it also exists in the memory.2. The storage of set key values is very simple, which means fast.3. reids are single-threaded and single-process.
List Function
Lpush command/method/function descriptionadds the string value to the head (left) of the list. creates the list if the key didn't exist. if the key exists and is not a list, false is returned. add a string value to the top (left) of
It can be understood as a hash set with sorting. The order is sorted from small to large based on the size of the score value. If the score value is the same, it is sorted by member.
// Insert a record to sort set, zadd zset1 10.2 val1zadd key
1. What is redis?
Redis is a nosql (also a huge map) single thread, but it can process concurrent requests per second (data is in the memory)
Using Java to operate redis is similar to the JDBC interface standard for MySQL. There are various
1. Download the tar package
redis-3.2.8.tar.gz
2. decompress the package to the specified directory.
sudo tar -xzvf redis-3.2.8.tar.gz -C /soft
3. Install the GCC compiler
sudo yum install -y gcc
4. Compile and install redis
$> Su root $> Cd ~
1. In master-slave replication, databases are divided into two types: master database and slave database for data synchronization ). The master database can perform read/write operations. When data changes due to write operations, the data is
The preface project uses the redis data structure. I don't want to simply call the API. Here I will record my reading notes. Original article address: SDS:
// String type alias typedef char * SDS;
The other is sdshdr:
// Hold the structure of SDS
Background descriptionIn a brief description, a shard in the recent project stores data in redis, which should be recommended to users. The front-end receives HTTP requests and parses keys through nginx, the consistent hash algorithm is used to
A major system fault occurred on Weibo a few days ago, and many technical friends are concerned about it. The reason for this is no more than James Hamilton's onThe first experience of James, design for failure, is the key to the success of all
Author: nosqlfan
There is no doubt that redis has created a new way of data storage. Using redis, we don't have to focus on how to put elephants in the refrigerator in the face of monotonous databases, instead, redis uses flexible data structures
Official Website: http://redis.io/download
Windows
Reference to http://www.cnblogs.com/chenping-987123/archive/2012/01/29/2331079.html
I learned some basic operations
Redis-Server:
Redis-benchmark:
Redis-CLI:
Then PHP drops redis
Problems with traditional MySQL + memcached Architecture
MySQL is suitable for storing massive data. Many companies have used this architecture to load hotspot data to the cache through memcached to accelerate access. However, as the business data
Document directory
Template or inheritance?
New Solution-General Data operations and special basic database operations
Generalized Data Operations
Apsaradb for redis provides a series of C interfaces, which are easy to use. However, for some
Redis master-slave replication is easy to configure and use. Master-slave replication allows multiple slave servers to have the same database copies as the master server. The following are some features of redis master-slave replication:1. The
I. Preface
Because redis is used in recent projects, we need to have a deep understanding of redis design and implementation in order to better understand redis and apply it to suitable business scenarios.
The analysis process is based on entering
Windows sever package: http://code.google.com/p/servicestack/wiki/RedisWindowsDownload
Windows is only used for testing, and its performance is not as high as that in Linux.
C # usage:
Referenced servicestackredis:
In the aeprocessevents function of the AE. c file, the following code is provided for handling the returned network events:
int rfired = 0; /* note the fe->mask & mask & ... code: maybe an already processed * event removed an element that fired
: Servicestack.googlecode.com/files/redis-2.0.2.zip
After the download, decompress it to your disk, my is F: \ redis-2.0.2
You also need to add the redis configuration file redis. conf in the redis root directory. the specific content of the file is:
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service