current location:Home > Technical Articles > Database > Redis

  • Example analysis of common operation commands for getting started with Redis
    Example analysis of common operation commands for getting started with Redis
    Redis Basics Redis is an open source (BSD licensed), in-memory data structure storage system that can be used as a database, cache, and messaging middleware. It supports multiple types of data structures, such as strings, hashes, lists, sets, sortedsets and range queries, bitmaps, hyperloglogs and geospatial ) index radius query. Redis has built-in replication, LUA scripting (Luascripting), LRU driven events (LRUeviction), and transactions (tr
    Redis 900 2023-05-28 11:31:24
  • How to configure redis master-slave under Docker
    How to configure redis master-slave under Docker
    1. Pull the redis image dockerpullredis2, start three redis container services, and use ports 6379, 6380, and 6381 respectively dockerrun--nameredis-6379-p6379:6379-dredisdockerrun--nameredis-6380-p6380:6379-dredisdockerrun--nameredis -6381-p6381:6379-dredis3, view container [tcy@tcy1~]$dockerps-acontaineridimagecommandcreated
    Redis 1090 2023-05-28 11:19:06
  • How to use Python code to obtain monitoring indicator values ​​​​of Azure Redis
    How to use Python code to obtain monitoring indicator values ​​​​of Azure Redis
    Problem description: Through the Metrics monitoring page, we can know the running status and various indicators of the current resources (such as Redis). What if we need to download indicators locally or generate JSON data and import it to a third-party monitoring platform? Can Azure export various indicator data through Python code or Powershell script? The solution is ok! The PowerShell command can use the Get-AzMetric or azmonitormetricslist command to obtain the Metrics value of the resource. Get-AzMetric: Getsthemetricvaluesofaresource.http
    Redis 952 2023-05-28 11:16:28
  • How to use Redis to lock resources
    How to use Redis to lock resources
    1. Overview As this technology continues to be updated and iterated, the concept of distribution is gaining more and more weight in enterprises! When talking about distributed, distributed locks will inevitably be mentioned. At this stage, there are three mainstream implementation methods of distributed locks, Zookeeper, DB, and Redis. This article uses Redis as an example! From our perspective, these three properties are the minimum guarantees required to use distributed locks effectively. Security features: mutually exclusive. At any given moment, only one client can hold the lock. Vitality attribute: No deadlock. Ultimately, the lock can always be obtained even if the client locking the resource crashes or partitions. Liveness: fault tolerance. As long as a majority of Redis nodes are running, the client can
    Redis 929 2023-05-28 11:01:45
  • How SpringBoot integrates Redis cache implementation
    How SpringBoot integrates Redis cache implementation
    Cache components supported by SpringBoot In SpringBoot, the cache management and storage of data relies on the cache-related org.springframework.cache.Cache and org.springframework.cache.CacheManager cache manager interfaces in the Spring framework. If there is no bean component of type CacheManager or a CacheResolver cache resolver named cacheResolver defined in the program, SpringBoot will try to enable the following cache components (in the specified order): (1) Generic (
    Redis 734 2023-05-28 10:58:06
  • What is PHP's redis persistence mechanism?
    What is PHP's redis persistence mechanism?
    The redis persistence mechanism stores data in memory to the hard disk to facilitate the persistence of data. Redis supports two persistence methods, Snapshotting (snapshot) and Append-onlyfile (AOF) method: 1. Snapshot is the default persistence method. It writes the data in the memory into a binary file in the form of a snapshot. The default file name is dump.rdb. 2. AOF method Since snapshots are taken at a certain time interval, if redis accidentally goes down, all modifications after the last snapshot will be lost. If the application requires that no modifications can be lost, the aof persistence method can be used. AOF has better persistence because of red
    Redis 548 2023-05-28 10:37:13
  • How to uninstall redis on ubuntu
    How to uninstall redis on ubuntu
    1. Use the shortcut key [ctrl+alt+t] to open the ubuntu terminal. 2. Enter the following command to uninstall redis. sudoapt-getautoremove--purgeredis-server#Uninstall redis3 and restart ubuntu. sudoapt-getautoremove--purgeredis-server#Uninstall redis-related operation commands: sudorm/usr/local/bin/redis-*#Delete all redis-related files in usr/local/bin/sudorm-r/etc/redis/#Delete Configuration directory and content
    Redis 3420 2023-05-28 10:37:05
  • What is the Redis data structure?
    What is the Redis data structure?
    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. 1. String The string type is the most basic data structure of redis. First of all, the key is the string type, and several other structures are built on the basis of the string type, so the string type can be used for the other four data structures. Learn the basics of Dharma. The string type can actually be a string (simple string, complex string (xml, json), number (integer, floating point number), binary (image, audio, video)), but the maximum cannot exceed 512M. make
    Redis 1169 2023-05-28 10:16:29
  • How to use Redis for scheduled inventory caching function
    How to use Redis for scheduled inventory caching function
    1. Business background In order to omit the background of our company's projects, I decided to analogize this question to a question on an examination paper. As for the details of the business, you don’t need to pay attention to it~ Just look at the title: Suppose you are the best collector in a certain country, and you have various treasures with consecutive values ​​in your hands. One day, you feel that collecting is too boring and plan to sell these treasures for some cash. But it is too low to sell these valuable treasures in the vegetable market. In the "Internet +" era, of course we have to use some different selling methods: There is a 300-room building (numbered 001 to 300) in your name, and there is a password-locked safe in each room. Every day (December 1 to December 31), you’ll pick 300 of the best
    Redis 1471 2023-05-28 10:12:23
  • How docker compose installs redis cluster
    How docker compose installs redis cluster
    1. Redis configuration information template file name: redis-cluster.tmpl#redis port port${PORT}#redis access password requirepass123456#redis access Master node password masterauth123456#Close protected mode protected-modeno#Enable cluster cluster-enabledyes#Cluster node Configure cluster-config-filenodes.conf#timeout cluster-node-timeout5000#cluster node IPhost mode is the host IP#cluste
    Redis 1438 2023-05-28 10:07:13
  • How to use Redis to generate data in batches
    How to use Redis to generate data in batches
    Redis comes with Debug method. The debug command provided by redis can be studied by yourself. It involves simulating redis abnormal scenarios such as oom, downtime, command execution failure, redis reloading rdb file, aof file, simulating redis command time-consuming, etc. We You can check the details through DEBUGhelp, as shown below. What you need to use here is the debugpopulate command. Use the following ####The number after represents how many key values ​​​​are created 127.0.0.1:6379>DEBUGPOPULATE1000OK127.0.0.1:6379>DBSIZE( integer)1000127
    Redis 1101 2023-05-28 10:05:33
  • Analysis of commands related to redis's list data type and how to use them
    Analysis of commands related to redis's list data type and how to use them
    Introduction to list List is a simple list of strings (in layman terms, it stores strings), sorted according to insertion order. You can add an element to the head (left) or tail (right) of a list, and a list can contain up to ^32-1 elements (more than 4 billion elements per list). The list in Redis is very similar to the LinkedList in Java. The bottom layer is a linked list structure. The insertion and deletion operations of the list are very fast, with a time complexity of 0(1). Unlike the insertion and deletion operations of the array structure, which require moving data. It's like a generalization, but the bottom layer of the list in redis is not as simple as a doubly linked list. When the amount of data is small, its underlying storage structure is a continuous block
    Redis 990 2023-05-28 09:32:18
  • How to solve the problem of garbled objects stored in springboot integrated redis
    How to solve the problem of garbled objects stored in springboot integrated redis
    Springboot integrated redis storage object garbled code is actually not a kind of garbled code, it is just something stored after serialization. When we use RedisTemplete to store objects, if the object is not serialized, an error will be reported. What we get after serialization is not The data we want, in order to solve this method, we can use StringRedisTemplete. Not much to say, the code uses redistemplete by default /***title:list** When what we save to redis is an object, we will find An error will be reported, prompting us that we need to serialize. *When we inherit the serialization interface and check the set value, we find that
    Redis 1711 2023-05-28 09:25:05
  • How SpringBoot introduces redis
    How SpringBoot introduces redis
    Redis is an in-memory database that can cache data that needs to be accessed frequently to Redis, which can greatly improve access efficiency. Here's how to use it: 1. Install the Windows version of redis. Download and unzip it. Use the following command to start the server in the directory where you decompressed it: (Since the powershell of win10 is used here, you need to add ./, or you can avoid using it by configuring environment variables. ./)./redis-server.exeredis.windows.conf    //It will not be registered as a windows service here. Closing the window will also close redis. Start the command terminal: ./r
    Redis 1662 2023-05-28 09:22:25
  • How to implement SpringBoot+Redis+Lua distributed current limiting
    How to implement SpringBoot+Redis+Lua distributed current limiting
    The main advantages of Redis supporting LUA scripts. The integration of LUA scripts will create more usage scenarios for the Redis database and bring out more new advantages: Efficiency: Reduce network overhead and delay, operate multiple redis server network requests, use LUA scripts Data reliability can be achieved with one request: Redis will execute the entire script as a whole, and no other commands will be inserted in the middle. Reusability: After the LUA script is executed, it will be permanently stored on the Redis server, and other clients can directly reuse it. Embeddability: It can be embedded in JAVA, C# and other programming languages, and supports cross-platform interaction with different operating systems. Simple and powerful: small and lightweight , low resource occupancy, and a programming language that supports procedural and objectification itself.
    Redis 1163 2023-05-28 08:55:05

Tool Recommendations

jQuery enterprise message form contact code

jQuery enterprise message form contact code is a simple and practical enterprise message form and contact us introduction page code.
form button
2024-02-29

HTML5 MP3 music box playback effects

HTML5 MP3 music box playback special effect is an mp3 music player based on HTML5 css3 to create cute music box emoticons and click the switch button.

HTML5 cool particle animation navigation menu special effects

HTML5 cool particle animation navigation menu special effect is a special effect that changes color when the navigation menu is hovered by the mouse.
Menu navigation
2024-02-29

jQuery visual form drag and drop editing code

jQuery visual form drag and drop editing code is a visual form based on jQuery and bootstrap framework.
form button
2024-02-29

Organic fruit and vegetable supplier web template Bootstrap5

An organic fruit and vegetable supplier web template-Bootstrap5
Bootstrap template
2023-02-03

Bootstrap3 multifunctional data information background management responsive web page template-Novus

Bootstrap3 multifunctional data information background management responsive web page template-Novus
backend template
2023-02-02

Real estate resource service platform web page template Bootstrap5

Real estate resource service platform web page template Bootstrap5
Bootstrap template
2023-02-02

Simple resume information web template Bootstrap4

Simple resume information web template Bootstrap4
Bootstrap template
2023-02-02

Cute summer elements vector material (EPS PNG)

This is a cute summer element vector material, including the sun, sun hat, coconut tree, bikini, airplane, watermelon, ice cream, ice cream, cold drink, swimming ring, flip-flops, pineapple, conch, shell, starfish, crab, Lemons, sunscreen, sunglasses, etc., the materials are provided in EPS and PNG formats, including JPG previews.
PNG material
2024-05-09

Four red 2023 graduation badges vector material (AI EPS PNG)

This is a red 2023 graduation badge vector material, four in total, available in AI, EPS and PNG formats, including JPG preview.
PNG material
2024-02-29

Singing bird and cart filled with flowers design spring banner vector material (AI EPS)

This is a spring banner vector material designed with singing birds and a cart full of flowers. It is available in AI and EPS formats, including JPG preview.
banner picture
2024-02-29

Golden graduation cap vector material (EPS PNG)

This is a golden graduation cap vector material, available in EPS and PNG formats, including JPG preview.
PNG material
2024-02-27

Home Decor Cleaning and Repair Service Company Website Template

Home Decoration Cleaning and Maintenance Service Company Website Template is a website template download suitable for promotional websites that provide home decoration, cleaning, maintenance and other service organizations. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-05-09

Fresh color personal resume guide page template

Fresh color matching personal job application resume guide page template is a personal job search resume work display guide page web template download suitable for fresh color matching style. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-02-29

Designer Creative Job Resume Web Template

Designer Creative Job Resume Web Template is a downloadable web template for personal job resume display suitable for various designer positions. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-02-28

Modern engineering construction company website template

The modern engineering and construction company website template is a downloadable website template suitable for promotion of the engineering and construction service industry. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-02-28