Method and system for managing Redis based on cloud native architecture

By creating and splitting Redis clusters into service plug-ins in a virtual environment, combining cloud-native architecture management tools and message queues, the efficient management and automated deployment of Redis clusters are achieved, solving the problems of high cluster maintenance costs and complexity, and improving system stability and resource utilization.

CN120492091AInactive Publication Date: 2025-08-15HUANENG INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510702982.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-28
Publication Date
2025-08-15
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the prior art, Redis clusters have high maintenance costs and are complex to maintain, making it difficult to efficiently manage and locate abnormal locations.

Method used

Create a Redis cluster in a virtual environment, split it into multiple service plug-ins and package it into containers, use cloud-native architecture management tools for automated deployment and resource scheduling, and combine message queues to achieve asynchronous communication and resource scheduling optimization.

Benefits of technology

It improves the management efficiency and performance of the Redis cluster, optimizes system stability and resource utilization, simplifies maintenance processes, and improves the automation of abnormal positioning and update deployment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120492091A_ABST
    Figure CN120492091A_ABST
Patent Text Reader

Abstract

The invention provides a method and system for managing Redis based on a cloud native architecture, and belongs to the technical field of Redis management. The method comprises the following steps: according to a Redis preset deployment file, creating and configuring a first Redis cluster in a virtual machine; testing whether the running result of the first Redis cluster meets a preset standard or not, and if yes, splitting the Redis cluster into a plurality of service plug-ins; packaging the service plug-in into a Redis container based on an architecture management tool, and configuring the Redis container to a target test environment to obtain a second Redis cluster; constructing a message queue to perform asynchronous communication on the transmission data performance index of the second Redis cluster, and configuring an interface to be butted with the message queue; and according to the interface communication data obtained by the interface, analyzing the resource scheduling condition of the second Redis cluster, and performing update deployment on the second Redis cluster by using a cloud native algorithm. The automatic management of the Redis is realized, and the cluster maintenance efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of Redis management technology, and in particular to a method and system for managing Redis based on a cloud native architecture. Background Art

[0002] Currently, with the rapid development of Redis technology, Internet data management is increasingly dependent on Redis. To ensure high availability of Redis in a working environment, the usual approach is to directly build a Redis cluster for the working environment and transmit data through a one-to-one or one-to-many cluster structure. However, this results in high cluster maintenance costs, complex maintenance, and inconvenience in locating abnormal locations.

[0003] Therefore, the present invention proposes a method and system for managing Redis based on cloud native architecture. Summary of the Invention

[0004] The present invention provides a method and system for managing Redis based on a cloud-native architecture, which is used to build a Redis cluster in a virtual environment and perform tests and adjustments, then split the Redis cluster into multiple service plug-ins and package them to obtain containers, then configure the containers in a working test environment and monitor the resource scheduling of the cluster in real time, and automatically update and deploy the cluster when problems arise.

[0005] In one aspect, the present invention provides a method for managing Redis based on a cloud native architecture, comprising: Step 1: Create and configure the first Redis cluster in the virtual machine according to the Redis preset deployment file; Step 2: Testing whether the operation result of the first Redis cluster meets the preset standard. If so, splitting the Redis cluster into multiple service plug-ins; Step 3: Package the service plug-in into a Redis container based on the architecture management tool, and configure the Redis container to the target test environment to obtain a second Redis cluster; Step 4: Build a message queue to asynchronously communicate the transmission data performance indicators of the second Redis cluster, and configure the interface to connect to the message queue; Step 5: Analyze the resource scheduling of the second Redis cluster based on the interface communication data obtained by the interface, and use the cloud native algorithm to automatically update and deploy the second Redis cluster.

[0006] On the other hand, according to the Redis preset deployment file, create and configure the first Redis cluster in the virtual machine, including: According to the preselected configuration parameters of Redis, a corresponding target virtual machine platform is selected, and the preselected configuration parameters of Redis and its environment are compiled and installed on the target virtual machine through a management tool to obtain a first environment; Start the Redis server in the first environment, import the Redis preset deployment file, and complete the initial configuration of Redis; According to the initial first configuration, a folder is created to store the preset deployment file of Redis and configure the first Redis cluster.

[0007] On the other hand, the operation results of the first Redis cluster are tested to see whether they meet the preset standards, including: Use a node connection tool to connect to the nodes of the first Redis cluster, connect to the master node and each slave node of the first Redis cluster respectively, test the data results after executing the read and write operations, and compare them with the preset standard data results. If the deviation between the data results and the preset standard data results is greater than a preset threshold, adjust the preselected configuration parameters of Redis to obtain the first configuration parameters.

[0008] On the other hand, if the conditions are met, the Redis cluster is split into multiple service plug-ins, including: If the deviation between the data result and the preset standard data result is less than a preset threshold, the preselected configuration parameter is used as the first configuration parameter, and the first Redis cluster is split into multiple unit service plug-ins based on the first configuration parameter; For each service plug-in that needs to be split, create a new first Redis cluster configuration file and configuration parameters, and generate a configuration package corresponding to each service plug-in.

[0009] On the other hand, the service plug-in is packaged into a Redis container based on an architecture management tool, and the Redis container is configured in a target test environment to obtain a second Redis cluster, including: Build a main folder for the first Redis cluster, and store the configuration package of each service plug-in in a subfolder under the main folder; Based on the architecture management tool, the main folder and all its subfolders are packaged into a Redis container and uploaded to the cloud warehouse; In the target test environment, the container of the first Redis cluster in the cloud warehouse is obtained according to the address connection and downloaded. The Redis container is then configured in the target test environment to obtain a second Redis cluster.

[0010] On the other hand, a message queue is built to asynchronously communicate the transmission data performance indicators of the second Redis cluster, and an interface is configured to connect to the message queue, including: Create a Redis central client, configure the central routing address of the central client according to the first configuration parameter, configure the sub-routing address of the unit service plug-in, and build a listening link through all types of routing addresses; Generate a routing address queue according to the central routing address and the sub-routing address, and generate a central routing node and a sub-routing node of the central client accordingly; Configure a unique routing node ID for all nodes and a unique cluster ID for the second Redis cluster; Generate a mapping table of routing node number-cluster number-routing address, and generate a routing message according to the mapping table and the monitoring link configuration message queue; According to the preset interface specifications, the central interface is designed to connect to the routing message of the central routing node, the sub-interface is designed to connect to the routing message of the sub-routing node, and asynchronous communication is performed on all interfaces to obtain interface communication data.

[0011] On the other hand, based on the interface communication data obtained by the interface, the resource scheduling of the second Redis cluster is analyzed, and the cloud native algorithm is used to automatically update and deploy the second Redis cluster, including: According to the central interface communication data obtained by the central interface, the total resource scheduling parameters of the second Redis cluster are obtained by preprocessing; the sub-interface communication data obtained by the sub-interface is preprocessed to obtain the sub-resource scheduling parameters of different unit service plug-ins; Import the total resource scheduling parameters and sub-resource scheduling parameters into the resource allocation model to obtain the resource scheduling status of the second Redis cluster; The monitoring program analyzes the abnormal resource scheduling of different unit service plug-ins based on the resource scheduling of the second Redis cluster, and obtains the corresponding routing address and routing node number based on the mapping table of routing node number-cluster number-routing address; Use cloud-native algorithms to combine routing addresses and corresponding routing node numbers to add targeted update instructions; Integrate targeted update instructions into the automated deployment process pipeline to complete the update deployment of the second Redis cluster.

[0012] In another aspect, the present invention provides a system for managing Redis based on a cloud-native architecture, comprising: Cluster configuration module: creates and configures the first Redis cluster in the virtual machine according to the Redis preset deployment file; Splitting module: testing whether the operation result of the first Redis cluster meets the preset standard, and if so, splitting the Redis cluster into multiple service plug-ins; A packaging and configuration module packages the service plug-in into a Redis container based on an architecture management tool, and configures the Redis container to a target test environment to obtain a second Redis cluster; Interface module: Builds a message queue to asynchronously communicate the transmission data performance indicators of the second Redis cluster and configures the interface to connect to the message queue; Update and deployment module: Analyzes the resource scheduling of the second Redis cluster based on the interface communication data obtained by the interface, and uses cloud native algorithms to automatically update and deploy the second Redis cluster.

[0013] The present invention provides a method and system for managing Redis based on a cloud-native architecture, which is used to build a Redis cluster in a virtual environment and perform tests and adjustments, then split the Redis cluster into multiple service plug-ins and package them to obtain containers, then configure the containers in a working test environment and monitor the resource scheduling of the cluster in real time, and automatically update and deploy the cluster when problems arise. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction is given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0015] Figure 1 This is a flow chart of a method for managing Redis based on a cloud-native architecture provided by an embodiment of the present invention; Figure 2 This is a structural diagram of a system for managing Redis based on a cloud-native architecture provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0016] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.

[0017] Example 1: like Figure 1 As shown, an embodiment of the present invention provides a method for managing Redis based on a cloud native architecture, including: Step 1: Create and configure the first Redis cluster in the virtual machine according to the Redis preset deployment file; Step 2: Testing whether the operation result of the first Redis cluster meets the preset standard. If so, splitting the Redis cluster into multiple service plug-ins; Step 3: Package the service plug-in into a Redis container based on the architecture management tool, and configure the Redis container to the target test environment to obtain a second Redis cluster; Step 4: Build a message queue to asynchronously communicate the transmission data performance indicators of the second Redis cluster, and configure the interface to connect to the message queue; Step 5: Analyze the resource scheduling of the second Redis cluster based on the interface communication data obtained by the interface, and use the cloud native algorithm to automatically update and deploy the second Redis cluster.

[0018] In this embodiment, Redis is an open source memory data structure storage that can be used as a database, cache, and message middleware, and supports multiple data structures such as strings, hash tables, lists, sets, etc.

[0019] In this embodiment, the preset deployment file refers to a predefined configuration file or script for automatically deploying and configuring services.

[0020] In this embodiment, the virtual machine refers to a virtual computing environment created on a physical computer using virtualization technology.

[0021] In this embodiment, the first Redis cluster refers to a cluster that is created and configured according to a preset deployment file.

[0022] In this embodiment, the operation result refers to the performance, reliability and compliance with preset standards of the first Redis cluster in the test. The test content includes: performance test, function test, reliability test, security test, etc.

[0023] In this embodiment, the preset standard refers to the standard value of the results of performance testing, function testing, reliability testing, and safety testing.

[0024] In this embodiment, the service plug-in refers to splitting a larger first Redis cluster into smaller, independently running components.

[0025] In this embodiment, the architecture management tool refers to a tool used to automate and manage software architecture deployment, configuration, and management, including applications such as Docker Compose, K8s, and Ansible.

[0026] In this embodiment, the Redis container refers to a lightweight, independent and portable container that runs the Redis service.

[0027] In this embodiment, the target test environment refers to a specific environment used to verify and test the deployment system and application program.

[0028] In this embodiment, the second Redis cluster refers to a service cluster in which the Redis container completes configuration of the first Redis cluster in the target test environment.

[0029] In this embodiment, a message queue is a communication method for delivering messages between applications, allowing applications to perform data transmission through asynchronous communication. The sender sends a message to the queue, and the receiver obtains the message from the queue for processing.

[0030] In this embodiment, the data transmission performance indicators include: response time, throughput, load condition, error rate and other indicators.

[0031] In this embodiment, asynchronous communication means that after sending a request, there is no need to wait for the receiver to immediately complete the processing and return the result, but the sender is allowed to continue to perform other tasks.

[0032] In this embodiment, the interface refers to an interface for communication between systems or services, and generally refers to an API (Application Programming Interface) or other forms of interface protocols.

[0033] In this embodiment, the interface communication data refers to data obtained by configuring the corresponding API interface of the message queue.

[0034] In this embodiment, the resource scheduling situation refers to the analysis of the allocation and management of resources in the second Redis cluster, including load balancing, resource utilization, performance indicators, etc.

[0035] In this embodiment, the cloud native algorithm is a methodology based on cloud computing principles and modern application architecture, which aims to leverage the elasticity, automation, and manageability of the cloud platform to achieve efficient deployment, reliable operation, and continuous optimization of applications.

[0036] In this embodiment, “update deployment” refers to dynamically updating and deploying the second Redis cluster, which is achieved using cloud-native algorithms and automation tools.

[0037] The working principle and beneficial effects of the above technical solution are: through automated deployment and containerization advantages, the management efficiency and performance of the Redis cluster are improved, the message queue is introduced to realize asynchronous communication and data processing, and combined with cloud-native automation, the system stability and resource utilization are optimized.

[0038] Example 2: On the basis of the above embodiment 1, according to the Redis preset deployment file, a first Redis cluster is created and configured in the virtual machine, including: According to the preselected configuration parameters of Redis, a corresponding target virtual machine platform is selected, and the preselected configuration parameters of Redis and its environment are compiled and installed on the target virtual machine through a management tool to obtain a first environment; Start the Redis server in the first environment, import the Redis preset deployment file, and complete the initial configuration of Redis; According to the initial first configuration, a folder is created to store the preset deployment file of Redis and configure the first Redis cluster.

[0039] In this embodiment, the pre-selected configuration parameters refer to pre-selecting and setting configuration options of the first Redis cluster according to specific needs and environmental requirements, including: memory configuration, network configuration, security configuration, etc.

[0040] In this embodiment, the management tool refers to a tool used for automatically deploying, configuring, and managing software and systems, including Ansible, Chef, Puppet, etc.

[0041] In this embodiment, compiling refers to the process of converting source code into an executable program.

[0042] In this embodiment, the first environment refers to an initial state environment after the first configuration and preparation work are completed.

[0043] In this embodiment, the Redis server is an open source in-memory database management system that provides persistence, replication, high availability, and sharding functions.

[0044] In this embodiment, the initial first configuration is a series of preliminary settings and adjustments performed after installing and starting the Redis server.

[0045] In this embodiment, the preset deployment file refers to a set of pre-configured files and settings for quick configuration and startup when deploying Redis, including: Redis configuration files, initialization scripts, startup scripts, etc.

[0046] The working principle and beneficial effects of the above technical solution are: using automated tools and pre-selected configuration parameters, efficient deployment and configuration of Redis on the virtual machine platform are achieved, improving operation and maintenance efficiency and system stability.

[0047] Example 3: Based on the above embodiment 1, testing whether the operation result of the first Redis cluster meets the preset standard includes: Use a node connection tool to connect to the nodes of the first Redis cluster, connect to the master node and each slave node of the first Redis cluster respectively, test the data results after executing the read and write operations, and compare them with the preset standard data results. If the deviation between the data results and the preset standard data results is greater than a preset threshold, adjust the preselected configuration parameters of Redis to obtain the first configuration parameters.

[0048] In this embodiment, the node connection tool refers to a Redis command line client, such as redis-cli.

[0049] In this embodiment, the node refers to each server instance in the Redis cluster, including a master node and a slave node.

[0050] In this embodiment, the master node and the slave node include: the master node is a node in the Redis cluster, responsible for receiving write operations from the client; the slave node is another node in the Redis cluster, responsible for copying data from the master node.

[0051] In this embodiment, read and write operations include read operations and write operations. A read operation is an operation for obtaining data from Redis. A client can send a read request to Redis to obtain data stored in Redis, for example, by executing the GET key command to obtain the value of a specified key. A write operation is an operation for storing data in Redis. A client can send a write request to Redis to store data in Redis, for example, by executing the SET key value command to set the value of a specified key.

[0052] In this embodiment, the preset threshold refers to the maximum deviation allowed between the data result actually obtained and the preset standard data result after performing the read and write operations.

[0053] In this embodiment, the first configuration parameter refers to adjusting the relevant configuration parameters of Redis, including: synchronization strategy, network configuration, memory management, etc.

[0054] The working principle and beneficial effects of the above technical solution are: by connecting to Redis cluster nodes, performing read and write operations and comparing the results with preset standard data, dynamically adjusting configuration parameters to verify and optimize performance and ensure data consistency and stability.

[0055] Example 4: Based on the above embodiment 3, if the conditions are met, the Redis cluster is split into multiple service plug-ins, including: If the deviation between the data result and the preset standard data result is less than a preset threshold, the preselected configuration parameter is used as the first configuration parameter, and the first Redis cluster is split into multiple unit service plug-ins based on the first configuration parameter; For each service plug-in that needs to be split, create a new first Redis cluster configuration file and configuration parameters, and generate a configuration package corresponding to each service plug-in.

[0056] In this embodiment, the unit service plug-in refers to an independent Redis service instance divided according to business needs or functions.

[0057] In this embodiment, the configuration file and configuration parameters are described as follows: the configuration file refers to the text file used to configure the Redis instance, which contains various settings for the Redis server, such as port number, memory allocation, persistence options, security settings, etc.; the configuration parameters refer to the specific parameter values or options set in the configuration file. These parameters can be determined based on the functionality and performance requirements of each unit service plug-in, such as the maximum memory limit, data persistence method, network settings, etc.

[0058] In this embodiment, the configuration package refers to a physical collection of configuration files and configuration parameters required by each unit service plug-in.

[0059] The working principle and beneficial effects of the above technical solution are: by splitting the Redis cluster into multiple unit service plug-ins according to preset configuration parameters and customizing independent configuration for each plug-in, the system flexibility and performance optimization are improved to adapt to diverse business needs and resource management.

[0060] Example 5: Based on the above embodiment 4, the service plug-in is packaged into a Redis container based on the architecture management tool, and the Redis container is configured in the target test environment to obtain a second Redis cluster, including: Build a main folder for the first Redis cluster, and store the configuration package of each service plug-in in a subfolder under the main folder; Based on the architecture management tool, the main folder and all its subfolders are packaged into a Redis container and uploaded to the cloud warehouse; In the target test environment, the container of the first Redis cluster in the cloud warehouse is obtained according to the address connection and downloaded. The Redis container is then configured in the target test environment to obtain a second Redis cluster.

[0061] In this embodiment, the cloud warehouse is an online storage service for storing and managing container images, files, or other data required for deployment, including Docker Hub, AWS ECR, Google Container Registry, etc.

[0062] The working principle and beneficial effects of the above technical solution are: use the architecture management tool to package the Redis configuration into a container, upload it to the cloud warehouse, and then download and configure it as a new Redis cluster in the target environment to ensure configuration consistency and simplified deployment.

[0063] Example 6: Based on the above embodiment 5, a message queue is constructed to perform asynchronous communication on the transmission data performance indicator of the second Redis cluster, and an interface is configured to connect to the message queue, including: Create a Redis central client, configure the central routing address of the central client according to the first configuration parameter, configure the sub-routing address of the unit service plug-in, and build a listening link through all types of routing addresses; Generate a routing address queue according to the central routing address and the sub-routing address, and generate a central routing node and a sub-routing node of the central client accordingly; Configure a unique routing node ID for all nodes and a unique cluster ID for the second Redis cluster; Generate a mapping table of routing node number-cluster number-routing address, and generate a routing message according to the mapping table and the monitoring link configuration message queue; According to the preset interface specifications, the central interface is designed to connect to the routing message of the central routing node, the sub-interface is designed to connect to the routing message of the sub-routing node, and asynchronous communication is performed on all interfaces to obtain interface communication data.

[0064] In this embodiment, the central client is a centralized tool specially designed to manage and configure multiple Redis service plug-ins.

[0065] In this embodiment, the routing address refers to the network address information used to identify and locate different Redis service nodes.

[0066] In this embodiment, the listening link refers to a mechanism for establishing and managing a communication path, which is usually used for data transmission and message exchange between nodes in a distributed system.

[0067] In this embodiment, the routing address queue refers to a list containing all routing addresses generated according to the configuration of the central client.

[0068] In this embodiment, the routing node refers to a specific service endpoint used to determine a data transmission path in a distributed system.

[0069] In this embodiment, the routing node number is an identifier used to uniquely identify each node in the routing network.

[0070] In this embodiment, the cluster number is an identifier used to uniquely identify a cluster in Redis.

[0071] In this embodiment, the mapping table of routing node number-cluster number-routing address is a data structure that stores and associates mapping relationships between different routing nodes, Redis cluster numbers, and corresponding routing addresses.

[0072] In this embodiment, routing messages refer to messages transmitted between the central client, the central routing node, the sub-routing nodes, and the Redis cluster for controlling and managing the flow of data.

[0073] In this embodiment, the preset interface specification is a set of predefined standards used to guide how to design, implement and interact with interfaces.

[0074] In this embodiment, the interface communication data includes: routing control information, data read and write requests and responses, system management and monitoring information, metadata, etc.

[0075] The working principle and beneficial effects of the above technical solution are: using a central client to manage multiple Redis service plug-ins, realizing flexible message routing and asynchronous communication through routing address queues and node mapping tables, and improving system management efficiency and data exchange reliability.

[0076] Example 7: Based on the above embodiment 6, the resource scheduling of the second Redis cluster is analyzed according to the interface communication data obtained by the interface, and the second Redis cluster is automatically updated and deployed using the cloud native algorithm, including: According to the central interface communication data obtained by the central interface, the total resource scheduling parameters of the second Redis cluster are obtained by preprocessing; the sub-interface communication data obtained by the sub-interface is preprocessed to obtain the sub-resource scheduling parameters of different unit service plug-ins; Import the total resource scheduling parameters and sub-resource scheduling parameters into the resource allocation model to obtain the resource scheduling status of the second Redis cluster; The monitoring program analyzes the abnormal resource scheduling of different unit service plug-ins based on the resource scheduling of the second Redis cluster, and obtains the corresponding routing address and routing node number based on the mapping table of routing node number-cluster number-routing address; Use cloud-native algorithms to combine routing addresses and corresponding routing node numbers to add targeted update instructions; Integrate targeted update instructions into the automated deployment process pipeline to complete the update deployment of the second Redis cluster.

[0077] In this embodiment, preprocessing refers to a series of processing and conversion of the communication data obtained from the central interface and the sub-interface, including: data cleaning, data analysis, data conversion and other processes.

[0078] In this embodiment, the total resource scheduling parameters refer to global parameters for the allocation, scheduling, and management of the overall resources of the Redis cluster, including parameters such as the total memory capacity, memory allocation strategy, and memory fragmentation management.

[0079] In this embodiment, the sub-resource scheduling parameters refer to resource allocation and management parameters for each unit service plug-in in the second Redis cluster, including: memory requirements, CPU requirements, storage requirements, network bandwidth, etc.

[0080] In this embodiment, the resource allocation model is a mathematical model for managing and optimizing system resource allocation, and the optimal resource allocation result is obtained by combining a plurality of resource allocation conditions with an optimization algorithm linear programming.

[0081] In this embodiment, the targeted update instructions generate operation instructions for specific problems or abnormal resource scheduling situations found in the cluster, including: resource reallocation, service migration, configuration adjustment, software update and other instructions.

[0082] In this embodiment, integration refers to combining some independent systems, services and components to form an organic whole.

[0083] In this embodiment, the automated deployment process pipeline refers to an automated software process that implements automated execution of code building, testing, packaging, deployment, and monitoring through a series of preset steps and tools.

[0084] The working principle and beneficial effects of the above technical solution are: by dynamically monitoring Redis resources, efficient scheduling and allocation are achieved, abnormalities can be quickly responded to, and cluster performance and stability are optimized through cloud native and automated deployment.

[0085] Example 8: like Figure 2 As shown, an embodiment of the present invention provides a system for managing Redis based on a cloud native architecture, including: Cluster configuration module: creates and configures the first Redis cluster in the virtual machine according to the Redis preset deployment file; Splitting module: testing whether the operation result of the first Redis cluster meets the preset standard, and if so, splitting the Redis cluster into multiple service plug-ins; A packaging and configuration module packages the service plug-in into a Redis container based on an architecture management tool, and configures the Redis container to a target test environment to obtain a second Redis cluster; Interface module: Builds a message queue to asynchronously communicate the transmission data performance indicators of the second Redis cluster and configures the interface to connect to the message queue; Update and deployment module: Analyzes the resource scheduling of the second Redis cluster based on the interface communication data obtained by the interface, and uses cloud native algorithms to automatically update and deploy the second Redis cluster.

[0086] The working principle and beneficial effects of the above technical solution are: through automated deployment and containerization advantages, the management efficiency and performance of the Redis cluster are improved, the message queue is introduced to realize asynchronous communication and data processing, and combined with cloud-native automation, the system stability and resource utilization are optimized.

[0087] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A method for managing Redis based on cloud native architecture, characterized in that: include: Step 1: Create and configure the first Redis cluster in the virtual machine according to the Redis preset deployment file; Step 2: Testing whether the operation result of the first Redis cluster meets the preset standard. If so, splitting the Redis cluster into multiple service plug-ins; Step 3: Package the service plug-in into a Redis container based on the architecture management tool, and configure the Redis container to the target test environment to obtain a second Redis cluster; Step 4: Build a message queue to asynchronously communicate the transmission data performance indicators of the second Redis cluster, and configure the interface to connect to the message queue; Step 5: Analyze the resource scheduling of the second Redis cluster based on the interface communication data obtained by the interface, and use the cloud native algorithm to automatically update and deploy the second Redis cluster.

2. A method for managing Redis based on cloud native architecture according to claim 1, characterized in that: Create and configure the first Redis cluster in the virtual machine according to the Redis preset deployment file, including: According to the preselected configuration parameters of Redis, a corresponding target virtual machine platform is selected, and the preselected configuration parameters of Redis and its environment are compiled and installed on the target virtual machine using a management tool to obtain a first environment; Start the Redis server in the first environment, import the Redis preset deployment file, and complete the initial configuration of Redis; According to the initial first configuration, a folder is created to store the preset deployment file of Redis and configure the first Redis cluster.

3. A method for managing Redis based on cloud native architecture according to claim 1, characterized in that: Test whether the operation results of the first Redis cluster meet the preset standards, including: Use a node connection tool to connect to the nodes of the first Redis cluster, connect to the master node and each slave node of the first Redis cluster respectively, test the data results after executing the read and write operations, and compare them with the preset standard data results. If the deviation between the data results and the preset standard data results is greater than a preset threshold, adjust the preselected configuration parameters of Redis to obtain the first configuration parameters.

4. A method for managing Redis based on cloud native architecture according to claim 3, characterized in that: If so, the Redis cluster is split into multiple service plug-ins, including: If the deviation between the data result and the preset standard data result is less than a preset threshold, the preselected configuration parameter is used as the first configuration parameter, and the first Redis cluster is split into multiple unit service plug-ins based on the first configuration parameter; For each service plug-in that needs to be split, create a new first Redis cluster configuration file and configuration parameters, and generate a configuration package corresponding to each service plug-in.

5. A method for managing Redis based on cloud native architecture according to claim 4, characterized in that: The service plug-in is packaged into a Redis container based on an architecture management tool, and the Redis container is configured in a target test environment to obtain a second Redis cluster, including: Build a main folder for the first Redis cluster, and store the configuration package of each service plug-in in a subfolder under the main folder; Based on the architecture management tool, the main folder and all its subfolders are packaged into a Redis container and uploaded to the cloud warehouse; In the target test environment, the container of the first Redis cluster in the cloud warehouse is obtained according to the address connection and downloaded. The Redis container is then configured in the target test environment to obtain a second Redis cluster.

6. A method for managing Redis based on cloud native architecture according to claim 5, characterized in that: Build a message queue to asynchronously communicate the transmission data performance indicators of the second Redis cluster and configure the interface to connect to the message queue, including: Create a Redis central client, configure the central routing address of the central client according to the first configuration parameter, configure the sub-routing address of the unit service plug-in, and build a listening link through all types of routing addresses; Generate a routing address queue according to the central routing address and the sub-routing address, and generate a central routing node and a sub-routing node of the central client accordingly; Configure a unique routing node ID for all nodes and a unique cluster ID for the second Redis cluster; Generate a mapping table of routing node number-cluster number-routing address, and generate a routing message according to the mapping table and the monitoring link configuration message queue; According to the preset interface specifications, the central interface is designed to connect to the routing message of the central routing node, the sub-interface is designed to connect to the routing message of the sub-routing node, and asynchronous communication is performed on all interfaces to obtain interface communication data.

7. A method for managing Redis based on cloud native architecture according to claim 6, characterized in that: Based on the interface communication data obtained by the interface, analyze the resource scheduling of the second Redis cluster and use cloud native algorithms to automatically update and deploy the second Redis cluster, including: According to the central interface communication data obtained by the central interface, the total resource scheduling parameters of the second Redis cluster are obtained by preprocessing; the sub-interface communication data obtained by the sub-interface is preprocessed to obtain the sub-resource scheduling parameters of different unit service plug-ins; Import the total resource scheduling parameters and sub-resource scheduling parameters into the resource allocation model to obtain the resource scheduling status of the second Redis cluster; The monitoring program analyzes the abnormal resource scheduling of different unit service plug-ins based on the resource scheduling of the second Redis cluster, and obtains the corresponding routing address and routing node number based on the mapping table of routing node number-cluster number-routing address; Use cloud-native algorithms to combine routing addresses and corresponding routing node numbers to add targeted update instructions; Integrate targeted update instructions into the automated deployment process pipeline to complete the update deployment of the second Redis cluster.

8. A system for managing Redis based on cloud native architecture, characterized by: include: Cluster configuration module: creates and configures the first Redis cluster in the virtual machine according to the Redis preset deployment file; Splitting module: testing whether the operation result of the first Redis cluster meets the preset standard, and if so, splitting the Redis cluster into multiple service plug-ins; A packaging and configuration module packages the service plug-in into a Redis container based on an architecture management tool, and configures the Redis container to a target test environment to obtain a second Redis cluster; Interface module: Builds a message queue to asynchronously communicate the transmission data performance indicators of the second Redis cluster and configures the interface to connect to the message queue; Update and deployment module: Analyzes the resource scheduling of the second Redis cluster based on the interface communication data obtained by the interface, and uses cloud native algorithms to automatically update and deploy the second Redis cluster.