ArticleDirectory
Memory usage
Persistence
Master-slave Replication
Fork Performance
Consistent Configuration
Slow log
Monitoring Service
Data Distribution
This article is a series of articles by Simon Maynard, co-
First, configure the environment. Here we will not talk about the redis server and the redis PHP extension package;
View code
Require 'Redis. php '; Require 'Redis _ pool. php '; Require 'Redis _ peer. php '; Class Note Extends Redis_peer {} $
As a cache server, redis has very powerful functions.
Redis also provides the master-slave mechanism. The slave synchronization time is on the testing machine (unit: MS ). In the figure, the master and slave nodes are distributed in two data
Redis is a high-performance Key-value database. The emergence of redis largely compensates for the shortage of keyValue storage such as memcached, and can play a very good complementary role in relational databases. It provides python, Ruby,
TheArticleIs a translation of the official redis documentation
String (strings)
String is the most basic type of redis value. Redis string is binary secure, which means that a redis string can contain any type of data, such as a JPEG image or a
Mind Map
As mentioned above, I am doing data synchronization for Douban. Now the synchronization operation has been completed, and the problem is reading. The reason for using redis is that there is not enough MySQL server to support my business.
RedisApsaradb for redis provides a wide range of data types. Compared with relational databases or simple key-value storage (such as memcached), apsaradb for redis data models are more similar to actual data models. For exampleFriend relationshipThe
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
Redis is a CS-mode TCP server that uses a request response protocol similar to HTTP. A client can initiate multiple request commands through a socket connection. After each request command is sent, the client usually blocks and waits for the redis
After learning about various redis types, this article introduces the redis sorting command. redis supports sorting list, set, and sorted set elements. The complete command format of the sort command is as follows:
Sort key [by pattern] [limit start
Pub/sub is a message communication mode. The main purpose is to decouple the coupling between the message publisher and the message subscriber, which is similar to the observer mode in the design mode. Pub/sub not only solves the Direct Problem of
This Article describes the redis sorting command. redis supports sorting list, set, and sorted set elements. The complete command format of the sort command is as follows: sort key [by pattern] [limit start count] [get pattern] [ASC | DESC]
About nosql
Before introducing redis, I 'd like to know nosql, that is, not only SQL, which is a non-relational data storage and key/value pair storage. Existing nosql dB products: redis/MongoDB/memcached/hbase/Cassandra/Tokyo
Document directory
How is data stored? ,
Where can data be stored?
How to export data?
How to restore Data?
Redis is a key-value database that supports multiple data types.
This section describes how to export data from redis.
How is data
Redis
Zadd key score member [[score member] [score member]...]
Set one or moreMemberElements andScoreValues are added to the sorted set.Key.
IfMemberIf it is already a member of the sorted set, update thisMemberOfScoreValue, and re-insert
Preface redis is often used for persistent storage in the project, but I don't know the principle of redis persistence. I will repost a blog here, so I can take a book note. Original article address: Workshop:
The client sends write operations to
1. Simplified commands
Analysis: commands in redis Communication Protocol use the original set, get, hset, hget, and other strings, it can be replaced by a single byte, such as 0x01, 0x02, 0x03, and 0x04.
Benefits: reduces network transmission
Learning any new knowledge is a step-by-step process. From Initial ignorance to simple familiarity, and then suddenly enlightened, the results are ecstatic and will be happy for a long time.Similar to redis + MySQL and memory + Hard Disk
First, see
Introduction
Because there is no string type in Standard C, Redis implements its own string sds.Source File
Sds. h sds. cAnalyze Data Structure
// Sds type typedef char * sds; // sdshdr structure struct sdshdr {// The length occupied by the buf
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