current location:Home > Technical Articles > Database > Redis
- Direction:
- All web3.0 Backend Development Web Front-end Database Operation and Maintenance Development Tools PHP Framework Daily Programming WeChat Applet Common Problem Other Tech CMS Tutorial Java System Tutorial Computer Tutorials Hardware Tutorial Mobile Tutorial Software Tutorial Mobile Game Tutorial
- Classify:
-
- How to install Redis under Linux
- Redis is a high-performance key-value database. The emergence of redis has largely compensated for the shortcomings of keyvalue storage such as memcached, and can play a very good supplementary role to relational databases in some situations. Installation environment Redis version 5.0.4 Server version Linux CentOS 7.64-bit Linux Specific steps to install Redis Download Redis Go to the official website and find the download address https://redis.io/download Right-click the Download button and select Copy link. Enter the Xshell console (the default is the root directory), enter wget to paste the download link copied above
- Redis 1411 2023-05-27 19:42:42
-
- What are the two implementation solutions for Redis high availability?
- In order to achieve high availability (HA) in Redis, the following two methods are used: master-slave replication of data. Sentinels are used to monitor the operation of data nodes. Once a problem occurs on the master node, the slave node continues to provide services. Master-slave replication In Redis, data replication between master-slave nodes can be divided into full replication and partial replication. The full replication function of the old version is implemented using the snyc command. The process is: the slave server sends the sync command to the master server. After receiving the sync command, the master server calls the bgsave command to generate the latest rdb file, and synchronizes this file to the slave server. In this way, after the slave server loads the rdb file, the status will be the same as that of the master server.
- Redis 1120 2023-05-27 19:42:12
-
- How to solve the stress test error when springboot inherits redis
- When using jmeter for pressure testing, the error message is an off-heap memory overflow:
- Redis 1136 2023-05-27 19:19:04
-
- How does springboot integrate redis to modify partitions
- Springboot integrates redis to modify the partition problem. Recently, springboot is integrated with redis. A system dynamic data source connects to different databases and caches the redis used. Then the data of different databases needs to be cached in different partitions of redis, that is, different libraries. Old version solution The old version here refers to the one before 2.0, and the 1.5.9 I used is ok. The redis configuration class will not be posted here, there are many online. 1. Use JedisConnectionFactory to modify @AutowiredJedisConnectionFactoryjedisConnectionFactory;j
- Redis 1237 2023-05-27 19:16:10
-
- How springboot uses Redis for caching
- 1.依赖与数据库设置org.springframework.bootspring-boot-starter-data-redisorg.apache.commonscommons-pool2org.springframework.bootspring-boot-starter-weborg.springframework.sessionspring-session-data-redisorg.springframework.bootspring-boot-starter-testtestspri
- Redis 1078 2023-05-27 19:04:04
-
- Example analysis of linux environment deployment and docker installation of redis
- Installation steps 1. Install redis and download the redis image through dockersearchredis and dockerpullredis 2. Create a new mounting configuration folder. Create two folders, data and conf, in any location. mkdir-p/root/docker/redis/datamkdir-p/root/docker/redis/conf Note: Because of the default configuration of redis, you will find that you can only connect locally and cannot access remotely. If you use redisdesktopmanager to connect, an error will be reported, so you need to manually hang it. Load the redis configuration file 3. Add the configuration file redis.conf just now
- Redis 1281 2023-05-27 18:24:42
-
- How to deploy redis cluster
- 1. Redis master-slave architecture 1.1. Master-slave replication principle The slave server connects to the master server and sends the PSYNC command; after the master server receives the PSYNC naming, it starts executing the BGSAVE command to generate the RDB file and uses the buffer to record all write commands executed thereafter; the master server After the server BGSAVE is executed, it sends snapshot files to all slave servers and continues to record the executed write commands during the sending process; after receiving the snapshot file, the slave server discards all old data and loads the received snapshot; the master server snapshot is sent. Then start sending write commands in the buffer to the slave server; the slave server completes loading the snapshot, starts receiving command requests, and executes write commands from the master server buffer; (slave server initialization is completed) the master
- Redis 1196 2023-05-27 18:05:50
-
- How does php enable the Swoole/Pool process pool to implement Redis persistent connections?
- PHP allows the Swoole|Pool process pool to implement the Redis persistent connection process pool, which is implemented based on the Manager management process module of Swoole\Server. It can manage multiple work processes. Compared with Process to implement multiple processes, Process\Pool is simpler and has a higher encapsulation level. Developers can implement process management functions without writing too much code. With Co\Server, pure coroutine style can be created. , a server-side program that can utilize multi-core CPUs. Swoole process pool implements redis data reading in the following case. Start the Redis process pool through WorkerStart and read the Redis list data persistently; when WorkerStop is disconnected
- Redis 1133 2023-05-27 17:55:12
-
- How to install redis-dump tool
- The redis-dump tool is used to build the environment for data migration in the cluster: 192.168.19.201redis-cluster637970017002rvmredis-dump192.168.19.202redis-cluster637970017002192.168.19.203redis-cluster637970017002 due to the installation of the redis-dump tool You need to use rvm and gem tools, so they must be installed in advance. 1. Install the dependency packages required to install rvm and other tools in advance #yum-yinstallzlibzlib-develpcrepcre
- Redis 1846 2023-05-27 17:52:12
-
- How to use Java to operate Redis database
- Redis is a memory-based database that interacts with Redis to greatly improve the speed of operation. First, let us create an ordinary Maven project, add the corresponding dependency redis.clientsjedis3.3.0com.alibabafastjson1.2.72 and then we can use the test connection (here I use the local reids service) // define the host number, Port number HostAndPorthostAndPort=newHostAndPort("127.0.0.1",6379);//Connect the redis service Jedisjedis=ne
- Redis 1035 2023-05-27 17:52:06
-
- Example analysis of Redis's zmalloc function
- Let's look directly at the custom zmalloc function in the Redis source code (not the latest version). This function is used in exactly the same way as regular functions such as malloc. The difference lies in its internal implementation details. void*zmalloc(size_tsize){//Allocate memory; void*ptr=malloc(size+PREFIX_SIZE);//Allocation failure throws an exception; if(!ptr)zmalloc_oom_handler(size);//Can the system use "malloc_size" function? #ifdefHAVE_MALLOC_SIZEupdate_zmalloc
- Redis 1153 2023-05-27 17:50:40
-
- How to implement responsive Redis interaction in Spring
- This article will simulate a user service and use Redis as the data storage server. Involving two javabeans, users and rights publicclassUser{privatelongid;privateStringname;//label privateStringlabel;//receiver address longitude privateDoubledeliveryAddressLon;//receipt address dimension privateDoubledeliveryAddressLat;//latest sign-in day privateStringlastSigninDay;//points privateIntege
- Redis 1188 2023-05-27 17:49:47
-
- What are the knowledge points of Redis ordered set zset?
- The redis ordered collection zset is very similar to the ordinary collection set. It is a string collection without repeated elements. The difference is that each member of an ordered set is associated with a score, and this score is used to sort the members of the set from the lowest score to the highest score. The members of the set are unique, but the ratings are repeatable. Because the elements are ordered, you can quickly get a range of elements based on score or position. Accessing intermediate elements in a sorted set is also very fast, since you can use the sorted set as a smart list without duplicate members. zadd: add element zrange:score
- Redis 1146 2023-05-27 17:23:00
-
- How to solve the problem of redis expiration time
- 1. How to modify a redis' String expiration key multiple times to ensure that it can still retain the deletion time when it was first set. For modifying String, redis has: set, setex, append, incr, decr, etc. Among them, use set and setex To modify the original existing String, the originally set expiration time will be reset. Strictly speaking, set and setex are not "modifications", but overwriting, so the originally set key-value will be overwritten by set/setex again. Drop the original one. The test results using tryredis are as follows: If you use append, incr, decr and other commands to modify, it will not be repeated.
- Redis 2157 2023-05-27 16:49:19
-
- What is the concept of Redis cache penetration and cache avalanche
- 1. Cache penetration 1. Concept The concept of cache penetration is very simple. The user wants to query a data and finds that the redis memory database does not have it, that is, the cache does not hit, so it queries the persistence layer database. It was found that there was none, so this query failed. When there are many users, the cache does not hit, so they all request the persistence layer database. This will put a lot of pressure on the persistence layer database, which is equivalent to cache penetration. Here you need to pay attention to the difference from cache breakdown. Cache breakdown means that a key is very hot and is constantly carrying large concurrency. Large concurrency focuses on accessing this point. When the key fails at the moment, it continues to Large concurrency breaks through the cache and directly requests the database, which is like cutting a hole in a barrier.
- Redis 760 2023-05-27 16:35:20