First, overview:
Redis is defined at the beginning of the design as a long-running service process, so most system configuration parameters can take effect immediately without restarting the process. Even switching the current persistence mode from
Publish and subscribe mechanism
When a client sends a message to the subscriber via the PUBLISH command, we call the client Publisher.
When a client uses the SUBSCRIBE or Psubscribe command to receive information, we call the client a Subscriber
1.Master write memory snapshots, save command dispatch Rdbsave function, blocking the main thread of the work, when the snapshot is relatively large performance impact is very large, intermittent pause service, so master best not write memory
/*** Note that MySQL default is a native connection, if you want to change to LAN access, to modify the settings. Error is (Communications link failure)* 1, on the server command line input $:vim/etc/mysql/mysql.conf.d/mysqld.cnf* 2, find
Some conceptsA partition corresponds to a task, a task must exist in a executor, and a executor corresponds to a JVM.
Partition is a collection of data that can be iterated
Task essence is a thread that acts on partition
ProblemHow
In the server development process, the general use of MySQL and other relational database as the ultimate storage engine, Redis can also be used as a key-value pairs of database, but in some real-world scenarios, especially relational structure is
Android
Ios
Javascript
HTML5
Css
Jquery
Python
Php
NodeJS
Java
Spring
Mysql
Mongodb
Redis
Nosql
Vim
C++
C#
Json
Ruby
Linux
Nginx
Docker
All categories > Database related > NoSQL database nosql redis
Redis Persistence-rdbThe persistence of Redis is divided into rdb persistence and aof persistence, and this article mainly says about RDB persistence related things.
RDB persistence is the process of saving data from the current Redis
Recently in learning Redis, the initial attempt at Red Hat Linux service installation is always unsuccessful, after several attempts finally configured successfully, the process is now organized as follows:Server environment: Red Hat enterpriserver
One, Redis relies on GCC and TCL environment, so first install GCC and TCL1. ImplementationYum Install gcc-c++Install GCC, the installation process prompts whether to continue, directly enter Y can, until completed, as follows:2. ImplementationYum
Directory
1 Preparatory work
2 Concrete Implementation
1 Preparatory workWhat is Redis?Redis: A high-performance Key-value database. Support data persistence, can save in-memory data on disk, restart can be loaded again to use,
Transferred from: http://www.jb51.net/article/86021.htmTask AsyncOpen the browser, enter the address, press ENTER, open the page. An HTTP request is then sent by the client to the server, the server processes the request, and the response (response)
1.hash type OperationImport Redispool = Redis. ConnectionPool (host= "192.168.48.131", port=6379, db=0) R = Redis. Redis (Connection_pool=pool)#hash类型操作: is a name corresponding to a dictionary#语法 Hset (name, key, value)A key-value pair is set #name
Redis is used as the cache in the Spring boot project.Create a spring boot maven project to add dependencies in Pom.xml Dependency> groupId>Org.springframework.bootgroupId> Artifactid>Spring-boot-starter-webArtifactid>
The realization of the interface reading in memory, the realization of the Web site directly read the memory data, greatly reducing the waiting time brought by the access interface, this function is more practicalNeed to download ' class library '
The various data types supported by Redis include String,list, set, sorted set, and hash.REdis is essentially a key-value db, so let's start by looking at his key. First, the key is also a string type, but the key cannot include boundary
Redis concurrency Problem Redis is a single-process single-threaded mode that uses queue mode to turn concurrent access into serial access. Redis itself does not have the concept of locking, and Redis does not compete for multiple client connections,
A Web project if deployed as distributed, the usual timer serviceThere may be multiple repeated calls within a certain interval of time。 At this point, because of the competition between the different containers, the container-level lock Redis is a
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