One: Introduction to the principle
Take a look at what the current system has set up from the boot program:
[Root@localhost init.d]# chkconfig--listNote:this output shows SYSV services only and does not include nativeSYSTEMD Services. SYSV
The default Redis program is installed in the/usr/local/redis directory;
Configuration file:/usr/local/redis/redis.conf, the port configured in this profile is the default port: 6379;
Redis boot command path:/usr/local/bin/redis-server.
You can
Redis Performance Test
Redis performance testing is accomplished by executing multiple commands at the same time. Grammar
The basic commands for Redis performance testing are as follows:
Redis-benchmark [option] [option value]
instance
The
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,
Subscribers can subscribe to one or more channels, and after the publisher sends a message to one channel, all subscribers subscribing to the channel will receive the message, and the Publisher will receive a value that is the number of subscribers
Redis Subscribe and publish Messages
First, the publisher starts the Redis-server.exe servicePublishing End pub.py
#!/usr/bin/env python
#-*-coding:utf-8-*-
' Created on
2015-9-9
@author: Sxli
'
import Redis
Import sys
class Publishchannel (object)
Operating on Linux: REDIS-CLI link redis-cli-a password
You can also enter the password individually: 127.0.0.1:6379>auth d3bcc7a988ad2d652276bca0ad8141a5
To view an existing key value pair: 127.0.0.1:6379> keys *
Configure master-Slave
After a, simple to build Redis. First, install your Ruby environment under Linux. Create a clustered folder. Mkdir-p rediscluster/7000/replication redis/redis.conf and Redis/src/redis-server to 7000 directory to modify redis.conf
Part I. Direct start
Download
Download and install the website
Tar zxvf redis-2.8.9.tar.gz
cd redis-2.8.9
#直接make compile
make #可使用root用户执行 ' do install ' to copy the executable to/usr The/local/bin directory. This allows you to run the program
Official Information https://redis.io/topics/cluster-tutorial,
First download redis,http://download.redis.io/releases/redis-4.0.6.tar.gz
Tar zxvf redis-4.0.6.tar.gz
CD redis-4.0.6
Make
Make error GCC diagnostic not allowed inside functions, check
From the following several dimensions, the Redis, Memcache, MongoDB made a comparison, welcome to shoot Bricks
1. Performance is relatively high, performance for us should not be the bottleneck overall, the TPS () aspect of Redis and Memcache is
First, installation
1. Official: http://www.redis.cn/download.html
2. Download, unzip, compile
wget http://download.redis.io/releases/redis-2.8.18.tar.gz
tar xzf redis-2.8.18.tar.gz
CD redis-2.8.18 Make
(Note: Errors that may occur when
Next, easy to build Redis. First, install your Ruby environment under Linux. Create a cluster folder. Mkdir-p rediscluster/7000/copy redis/redis.conf and redis/src/redis-server to 7000 directory to modify redis.conf configuration
Daemonize Yes
AOF (appendoffile) Introduction:
Record each write in the form of a log, record all the write commands performed by Redis (read operation not recorded), only append files but not overwrite files, Redis startup early read the file to reconstruct the
Redis Notes Grooming
One, Redis features
Second, Redis application scenario
Third, Redis operations and optimization
One, Redis features
1, Redis is an open-source, high-performance Key-value database. It runs in memory but can be persisted to
1. Preface
Redis is a common memory-based Key-value database that is more advanced than memcache and supports a variety of data structures, efficiently and quickly. Redis makes it easy to solve high-concurrency data access problems, and it is also
Related commands: DISCARD EXEC MULTI unwatch WATCH transaction
Multi,exec,discard and watch are the basis of Redis transactions. They allow a set of commands to be executed in one step, with two important guarantees: All commands in the transaction
Redis zrevrank Command
Redis ordered set (sorted set)
The Redis zrevrank command returns the rank of the member in the ordered set. Where ordered set members are sorted by fractional values descending (from large to small).
The ranking is based
Redis receives a connection from a client by listening to a TCP port or a UNIX socket, and when a connection is established, the following actions are performed within Redis:
• First, the client socket is set to non-blocking mode because Redis uses
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