Redis's excellent performance is because it stores all the data in memory, the same memcached do, but why Redis can stand out, largely because Redis has excellent persistence mechanism to ensure that the server restart, the data will not be lost.
1 The meaning of Rdb
Redis provides RDB persistence, which keeps the Redis database state in memory on disk to avoid accidental loss of data. RDB persistence can be performed either manually or periodically based on server configuration options,
Edis is the official preferred Java client development package for Redis. In this article we will describe how to use the Sorted set sort collection (Zsets).
Sorted set is the same as a collection, it does not have duplicate values, the biggest
I went out for an interview yesterday and was asked by the interviewer how to view the memory footprint of the Redis. I've never had a problem with this, I went back to the company, checked it out, and recorded this problem in this. How to view the
What is AOF?
There is an option called AppendOnly in the Redis configuration file that can write yes or No. This option is responsible for whether to open the aof log switch. AOF log, you can simply understand the same thing as MySQL Binlog, the
Redis is a commonly used database of non relational types.So we also need to know some of his common operating instructions.
Redis data types are mainly divided into strings, hashes, lists, sets, and so on.
String set--set name 1234//Set key
Redis Cluster Add node
1: Start the node that needs to be added first
cd/usr/local/cluster/mkdir 7006cp/usr/local/cluster/redis.conf/usr/local/cluster/7006/cd/usr/local/cluster/7006/VI redis.conf# The value of the port parameter in
Redis Common Command set
1 Connection operation Command quit: Close the connection (connection) Auth: simple password Authentication help cmd: View cmd assistance, for example: helping quit
2 Persistent Save: Synchronize data to disk Bgsave:
Before you say Redis persistence, you need to figure out what the concept of database state is, because the persistence is to save the state of the database in memory to disk. So what is the database state? Redis is a key-value database server,
Https://github.com/xetorthio/jedis explains how to add Jedis dependencies to spring boot.
Add the following code under Pom.xml
redis.clients
jedis
2.8.0
jar
compile
Adding in the main function
Jedis Jedis = new
Redis is a key-value storage system. Like memcached, it supports a relatively greater number of stored value types, including string (string), list (linked list), set (set), Zset (sorted set-ordered set), and hash (hash type). These data types
Problem Description
Recently we used spring cache + Redis to do caching. Under high concurrency the @cacheable annotation returns a null content. Look at the source code, in the use of annotations to get the cache, the Rediscache get method will
Ps-ef |grep Redis Check if the background process is running
#检测6379端口是否在监听
NETSTAT-LNTP | grep 6379
#使用 ' redis-cli ' client detects a connection is normal
./redis-cli
Stop it
#使用客户端
REDIS-CLI shutdown
#因为Redis可以妥善处理SIGTERM信号, so
Redis is a single process single-threaded server that is implemented using multiple IO multiplexing technology, that is, event-based.
Redis are divided into two types of events, file time and time events.
File events: The traditional IO operation,
SORTEDSET data Structures SortedSet and set types are very similar, and they are all collections of strings that do not allow duplicate members to appear in a set collection. The main difference between them is that each member of the SortedSet will
One: Make compile, there is an error
Solution: Take a closer look at the error location information, it is possible that some things are not installed, put these things installed will be no problem
Two:
Warning:no config file specified, using
To write the Redis inside the K-line, and the line, think should be able to both types exist in a database (db), and to distinguish between the two.
Looked up some information, finally found, the feeling is quite practical, do a record, lest forget.
Redis is a non-relational database, and unlike MongoDB, Redis is a memory database, so access is fast. Commonly used as a cache and publish-subscribe message queue. The Redis official does not provide the Windows version of the software. The Windows
Redis installation Step1: Downloadwget http://download.redis.io/releases/redis-4.0.9.tar.gzStep2: UnzipTar xzf redis-4.0.9.tar.gzStep3: Move, put it on the usr/local recordsudo mv./redis-4.0.9/usr/local/redis/Step4: Into the Redis
1. Download the latest Redis https://github.com/MicrosoftArchive/redis/releases2, decompression if it is the MIS version directly next next3, Next we set up the Redis into the environment variable;4. Start Redis server cmd into the current Redis
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