Tag:redis

  • Introduction to 11 web application scenarios of redis

    Time:2020-1-21

    Here are 11 web application scenarios. In these scenarios, you can make full use of redis features and greatly improve efficiency. 1. Display the latest item list in the home page Redis uses a memory resident cache, which is very fast. Lpush is used to insert a content ID, which is stored in the list […]

  • Redis + Lua realize distributed lock (springboot version)

    Time:2020-1-19

    Design thinking Since it is to implement distributed lock, it must ensure the exclusiveness of multiple connection centralized requests for a resource, and the single thread feature of redis meets this demand well. The set method provided by redis is the key to meet this demand. The figure below is a simple process to realize […]

  • Some optimizations and precautions of using Lua in redis

    Time:2020-1-18

    Eval, evalsha command RedisAvailable from version 2.6.0evalCommand, via the built-inLuaInterpreter, which allows the user to execute a paragraphLuaScript and return data. becauseRedisThe characteristics of single thread model can guarantee theAtomicity(Lua is only used in recent projects). Please move to official documents for detailed usage. Script performance RedisIt ensures the atomicity of script execution, so before […]

  • Implementation of current limiting algorithm (redis + Lua)

    Time:2020-1-17

    Current limiting algorithm Common current limiting algorithms Counter algorithm Leaky bucket algorithm Token Bucket Counter algorithm As the name implies, counter algorithm refers to a fixed number of requests allowed in a certain time window. For example, 10 requests are allowed in 2S, 100 requests are allowed in 30s, etc. if the finer the time […]

  • High performance ten million level timed task management service for sun

    Time:2020-1-16

    Forsun’s high-performance and high-precision timing service makes it easy to manage ten million level timing tasks.Project address: https://github.com/snower/forsun The timer of Linux system is used to provide the timing schedule to the second level, and the long-time operation ensures no error. It supports local memory storage and redis persistent storage. With redis, tens of millions […]

  • A tutorial of installing and configuring redis database under the cenos system

    Time:2020-1-16

    1: Install redis wget http://redis.googlecode.com/files/redis-2.6.14.tar.gz tar zxvf redis-2.6.14.tar.gz cd redis-2.6.14 make PREFIX=/usr/local/redis install 2: Configure redis Use the default configuration file, with a few changes 1. As a rule, the configuration file is placed in the source installation folder for easy management mkdir /usr/local/redis/etc/ cp redis-2.6.14/redis.conf /usr/local/redis/etc/ 2. Modify the configuration file / usr / […]

  • Implementation of distributed lock and task queue based on redis

    Time:2020-1-15

    I. Preface Shortly after the double 11, we all know that there are many seconds killing activities on tmall, Jingdong, Suning and other e-commerce websites. For example, when snapping up a mobile phone with the original price of 1999 and the current price of 999 seconds, it will usher in a peak period of user […]

  • Research on implementation of distributed lock to improve performance on redis

    Time:2020-1-14

    Background: In many Internet product applications, some scenarios need to be locked, such as: seckill, global incremental ID, floor generation and so on. Most of the solutions are based on DB. Redis is a single process and single thread mode. It uses queue mode to change concurrent access into serial access, and there is no […]

  • How to use redis caching tool in Windows

    Time:2020-1-13

    I. Introduction redisIs a key value storage system. Similar to memcached, it supports more value types, including string, list, set and Zset. These data types support push / pop, add / remove, intersection, union, difference, and richer operations, all of which are atomic. On this basis, redis supports various sorting methods. Like memcached, data is […]

  • Basic installation and configuration of redis database under CentOS

    Time:2020-1-12

    Redis is an open-source multi platform data storage software. It is written in ANSI C and uses data sets directly in memory, which makes it very efficient. Redis supports multiple programming languages, including Lua, C, Java, python, Perl, PHP and many other languages. Redis has a small amount of code, only about 30000 lines. It […]

  • Back end database strategy

    Time:2020-1-11

    (1) MySQL Basic test point 1. Principle characteristics and concurrency control of transactions What is a transaction? Transaction is the basic unit of database concurrency control A transaction can be seen as a collection of column SQL statements Transaction must be either all successful or all failed (rollback) Common scenario of transaction usage: bank transfer […]

  • Redis integrates spring and uses cache instances

    Time:2020-1-11

    1、 About redis What is redis? Redis is a key value storage system. Similar to memcached, it supports more value types, including string, list, set, Zset and hash. These data types support push / pop, add / remove, intersection, union, difference, and richer operations, all of which are atomic. On this basis, redis supports various […]