Redis Introduction
Remote DIctionary server, which is completely open source free, written in C, and following the BSD protocol, is a high-performance (KV) distributed memory database that runs on memory and supports persistent NoSQL databases, is
Redis more than 3.0 support clusters, because the cluster needs ruby support, you need to install the Ruby environment and download the Communication Management Pack
Ruby Environment Installation
Redis Command Reference:
Jedis provides a variety of modes of operation: Single connection mode, single connection pool mode, multi-machine distributed + connection pool. Prepare
jedis-2.5.2Commons-pool2-2.2.jar Use single connection
This method is recommended only for use
Overview
In the actual development process will often encounter some time-sensitive data, such as limited time discount activities, caching or verification code, and so on. After a while, you need to delete this data. In a relational database, you
Principle:
Gets the specified name key if present, if there is no key, if there is no value assigned to the key, then set the expiration time;
The logic to unlock deletes the key.
1. Custom class
Package com.xxx.cloud.assets.redis.lock;
Import
Although Redis has excellent performance, we can still master/slave this simple architecture, read and write separation, further mining redis performance, improve system availability.
Redis How to do master and slave copy. Redis replication is
9, Redis data type
1) String type and operation
String is the simplest type, and a key corresponding to a value,string type is binary security. A Redis string can contain any data, such as a JPG picture or a serialized object.
Set: Set key
Redis EventsI. SUMMARY OF EVENTS
1 File Event: Redis is an event driver, Redis server connects to clients through sockets, handles command requests, generates command replies, and these processes become file events.
2 time Event: The Redis server
Spring Data Redis single node and cluster configuration and redistemplate usage
tags (space delimited): Spring-data
Using Springdata makes it easier for us to operate on relational and non-relational databases, encapsulating common code and making
Zset ordered set common operation instruction
The ordered set is based on the set, adding a score value, such as the previous set is K v1 v2 v3, now Zset is k score1 v1 score2 v2 score3 v3Zadd key score value [score value]
Adding elements to an
What is NoSQL?
NoSQL is the database solution to solve a series of problems, such as high concurrency, high availability, high scalability, and big data storage.
NOSQL, called a non-relational database, whose full name is not the only SQL. It can
Write by Yin Mingjun, quote please specify.
The article was originally sent in the Baidu space, Baidu said there are problems, had to send to CSDN.
The previous article described how to use Sentinel to create a highly available master and
1. Preface
Redis is an advanced Key-value database. It is similar to memcached, but the data can be persisted and the supported data types are rich. There are strings, lists, collections, and ordered collections. Supports the addition, intersection
Six features of Redis
L Strings
L HASHS
L Lists
L Sets
L Sorted Sets
L PUB/SUB Application Scenarios for Redis features Strings
The Strings data structure is a simple key-value type, and value is not only a string, it can also be a number. Common
* Features * Key-value
Java map:string value = Map.get ("key") Python dict:dictionary["key"] value ...
BitMaps Bitmap bron Filter Hyperloglog Ultra Small Memory unique value Count GEO Geographic information positioning speed fast
10w OPS is the
Implement function Description:
Redis Server for Master-slaver-slaver-.... Master-slave configuration, through 2 sentinel failover failover, automatic switching, using the code can be directly used in the actual production environment.
Off
Pipelines and multiplexers
The delay is intolerable. Modern computers can generate data at an alarming rate, and high-speed Internet (often with multiple parallel connections between important servers) provides great bandwidth, but this nasty delay
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