redis data type

Five common data types General Command Switch libraries, 16 libraries in total, starting from 0 127.0.0.1:6379> select 15 OK View all key s in the current library 127.0.0.1:6379[15]> keys * 1) "k1" Judge whether a key exists (no k2) 127.0.0.1:6379[15]> exists k1 (integer) 1 127.0.0.1:6379[15]> exists k2 (integer) 0 Check the type ...

Posted by mwalsh on Mon, 10 Jan 2022 09:50:44 +0100

Redis bloom anti breakdown practice

background We encountered 10000 concurrency per second in production at Christmas. After WAF combined with relevant log analysis, we found that several interfaces in our applet were flooded by people. For these interfaces, our front-end uses varnish for caching. Theoretically, they should all be returned in milliseconds. Should not cause to ...

Posted by apulmca on Mon, 10 Jan 2022 06:35:56 +0100

Realize the daily limit of users in Go (for example, you can only receive benefits three times a day)

If you write a bug management system and use this PeriodLimit, you can limit each tester to only mention one bug to you every day. Is work much easier P The essential reason for the popularity of microservice architecture today is to reduce the overall complexity of the system and spread the system risks to subsystems, so as to maximize the ...

Posted by russlock on Mon, 10 Jan 2022 04:04:34 +0100

redis_day_19_ Master slave replication setup

Single point disadvantages and Solutions redis can be a single machine, a single process, or a cache database. The persistence method can be through rdb and aof. Single machine deployment has three disadvantages: single point of failure; Limited capacity; Too many visits can be stressful. In order to solve the disadvantages of single machine d ...

Posted by intellivision on Sun, 09 Jan 2022 14:58:54 +0100

Basics: introduction to distributed locks

Basics: what is distributed lock?The synchronized keyword and ReentrantLock reentrant lock in Java can control concurrent access to resources in a multi-threaded environment, but they are JVM level local locks that will fail in distributed scenarios. Distributed locking can avoid different nodes from repeating the same work, so as to avoid mult ...

Posted by k.soule on Sun, 09 Jan 2022 05:48:55 +0100

Linux server redis 6 X cluster environment (master-slave replication)

1. Foreword When setting up a cluster, you need to ensure that there is no problem in setting up a stand-alone version of redis. You can refer to Linux server Redis 6.x installation and configuration 2. Benefits of master-slave replication Read write separation, performance expansion Disaster recovery and rapid recovery The master libra ...

Posted by phpnewbieca on Sat, 08 Jan 2022 13:48:43 +0100

Second kill system - multi level cache practice of commodity detail page

1, Background cache optimization idea The performance of a website is good or bad, and the impact of network IO and disk IO is relatively large. The purpose of introducing cache now is to improve the performance of the website. In fact, the essence is not to use the disk memory to reduce the disk IO to improve the performance. But have w ...

Posted by mortal991 on Fri, 07 Jan 2022 15:44:42 +0100

Redis OM .NET Redis object mapping framework

Redis OM Redis OM is an Object Mapping framework officially launched by redis, that is, Object Mapping. It allows developers to operate redis data more simply and conveniently. The data stored in redis is abstracted as Object Mapping and supports object-based redis data persistence and streaming query operations. Currently, only four developm ...

Posted by admin101 on Fri, 07 Jan 2022 08:20:33 +0100

Introduction to Redis

Redis overview Redis is a key value storage system (official website: http://redis.io ), is a distributed cache database Redis initial operation Start redis service Startup in docker environment (multiple containers need to be run to start docker environment): The # bottom layer of docker start redis01 is also started through redis serv ...

Posted by binujayaraj on Fri, 07 Jan 2022 06:40:09 +0100

Redis source code reading - data type and coding

catalogue redis data storage Data structure and coding string embstr Comparison between embstr and raw sds Differences between sds and c language strings: list quicklist structure diagram: set zset Implementation principle of zskiplist skiplist query process hash hash structure summary redis data storage redis is an in memory ...

Posted by smook on Thu, 06 Jan 2022 16:10:14 +0100