As a result of learning to develop monitoring software needs, so need to use to Redis, here is a brief introduction.1. InstallationYou can view the article here: http://www.linuxidc.com/Linux/2014-05/101544.htm2. StartSince the use of the source
1. Introduction to RedisRedis is a key-value storage system. Similar to memcached, it supports storing more value types, including string (string), list (linked list), set (set), Zset (sorted set-ordered collection), and HASHS (hash type). These
Download and install RedisHttps://github.com/MSOpenTech/redis/releases can also find this link through the Redis.io website
Unzip to the D:\Redis root directory.
Start the Redis service side.Redis-server.ext redis-windwons.conf
Start the
1, download the Redis Windows application, support 32-bit and 64-bit, according to the actual situation download: Https://github.com/dmajkic/redis/downloads2, copy the corresponding program to the directory you need, where I use the 64-bit, put in
Recently, due to the development of the company's business MySQL write has become a bottleneck, of course, there are also plans to continue to optimize, such as sub-database tables, memory tables and so on, but higher costs, such as memory
The data types commonly used by Redis are string,hash,list,set, and so on, as follows:String1, String Common command: In addition to get, set, INCR, DECR Mget and other operations, Redis also provides the following actions: Gets the string length
The leaderboard feature is a very common requirement. Using the attributes of an ordered collection in Redis to achieve a leaderboard is a good and fast choice.The general leaderboard is effective, such as the "User standings". If the results are
0. Environmentlinux:centos6.5redis:3.0.51. DownloadMode one: Download the war package, through XFTP Copy to the Linux server, unzip;Mode two: Linux server, execute command wget http://download.redis.io/releases/redis-3.0.5.tar.gz2. Compiling2.1
"Redis Collection Operations "1.SCard KeyReturns key the cardinality of the collection (the number of elements in the collection).2.sdiffstore destination key [key ...]This command works similarly to Sdiff, but it saves the result to the destination
We can use the data for the system storage in two different angles, one is divided by the size of the data, divided into big data and small data, the other is divided into cold and hot data according to the data, the thermal data refers to read or
"Redis hash Operation "1.hset key field value Sets in the field hash stored on key to value . If key does not exist, a new key holding a hash is created. If field already exists in the hash, it's overwritten.Return valueInteger reply,
Turn off and start RedisClose the Redis process./redis-cli-a Password shutdownStart the Redis process./redis-server redis.confRestarting the Redis process executes the above 2 commands in the order of shutdown and startDelete some keys in
In peacetime, we will create multiple Redis instances to alleviate the single redis stress paradigm. However, as the number of caches increases. To Redis for extensions is a non--don't matter. There are several methods for Redis to expand the
In Redis, we can see the set type as an unordered character set, and as with the list type, we can also perform operations such as adding, deleting, or judging whether an element exists on the data value of that type. It should be stated that the
Commands for set operationsSadd (Key, member): Adds an element to a set named Key memberSrem (Key, member): Removes the element in the set named Key memberSpop (key): Randomly returns and deletes an element in a set with the name keySmove (Srckey,
Redis uses SDS instead of char * strings,It is defined as follows:Char *SDS; struct SDSHDR { int len; int Free ; Char buf[];};SDS points to a char stringSDSHDR is the string headerMore ingenious structureUse char buf[] to store the
First, download, compileRedis is released as source code, first download the source code, and then compile under Linux1.1 http://www.redis.io/download first to download stable stable version, the current version is 2.8.171.2 Upload to Linux, 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.