Objective: RedisRedis is an open source API that is written in ANSI C, supports the web, can be persisted in memory, key-value databases, and provides multiple languages.I am using the following version:If there is no resources, I share this on the
$ wget http://download.redis.io/releases/redis-2.8.17. tar.gz$ tar xzf redis-2.8.17. tar.gz$ CD Redis -2.8.17$ MakeAfter make the redis-2.8.17 directory will appear after the compiled Redis service program Redis-server, as well as the client program
1, download the source code, unzip and compile the source codewget http://download.redis.io/releases/redis-4.0.11.tar.gzTar xzf redis-4.0.11.tar.gzCD redis-4.0.11.tar.gzMake2, after the completion of the compilation, in the SRC directory, there are
In the previous articles, we learned about all the major data structures used by Redis, such as simple dynamic strings (SDS), double-ended lists, dictionaries, compressed list, integer collections, and so on.Redis does not directly use these data
1.Clustereven with master-slave replication , each database holds all the data in the entire cluster, making it easy to create a cask effect.Use Jedis implements a shard cluster , which is the client's control over which key data is saved to which
Blocking:Redis is a typical single-threaded architecture that can be a nightmare for our applications if blocking occurs. The scenarios that cause blocking are broadly divided into intrinsic and extrinsic causes.Intrinsic reason: Unreasonable use of
Zset Features:Like set set, ordered, element is a string, each element is associated with a floating point value, and in the order of the score from small to largezadd: Add one or more elementsZadd Key [nx| XX] [CH] [INCR] score member [score member
Redis Data Type
Redis supports five data types: String, hash, list, set, and zset ).
String (string)
String is the most basic type of redis. You can think of it as the same type as memcached. A key corresponds to a value.
The string type is binary
Redis performance test
Redis performance testing is achieved by executing multiple commands at the same time.Syntax
The basic commands for redis performance testing are as follows:
redis-benchmark [option] [option value]Instance
The following
Redis persistence
Although redis is a memory-based storage system, it supports the persistence of memory data and provides two main persistence policies: RDB snapshot and aof log.
Redis RDB Snapshot
Redis supports the persistence mechanism of saving
I. Overview
Cluster is supported after redis3.0.
1.1 redis cluster status quo
Currently, redis supports the following cluster features:
1): Automatic Node Discovery
2): slave-> master election, cluster Fault Tolerance
3): Hot resharding: Online
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
Redis is a key-value storage system. Similar to memcached, memcached supports more storage value types, including string, list, set, and zset) and hash (hash type ). Today, I will share with you the installation and configuration of
Redis Introduction
Redis is a fast non-relational database that can store mappings between keys and five different types of values ), you can persistently store the key-value pairs stored in the memory to the hard disk. You can use the replication
The current stable version of redis (2.0.4) only supports Simple master-slave replication: one master write, multiple slave reads. Sharding can only be performed by the client through consistent hashing.
Redis cluster is the focus of
Redis command Chinese manual
I. Base
Del
Delete a key or a series of keys; del key1 key2 key3 key4
Type
Returns the Data Type of a key element (none: nonexistent, string: character, list, set, zset, hash)
Keys
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.