CN112527780A - Redis cluster creating and managing method, system, computer device and storage medium - Google Patents

Redis cluster creating and managing method, system, computer device and storage medium Download PDF

Info

Publication number
CN112527780A
CN112527780A CN202011537474.1A CN202011537474A CN112527780A CN 112527780 A CN112527780 A CN 112527780A CN 202011537474 A CN202011537474 A CN 202011537474A CN 112527780 A CN112527780 A CN 112527780A
Authority
CN
China
Prior art keywords
target
cluster
application
redis
redis cluster
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011537474.1A
Other languages
Chinese (zh)
Inventor
彭雄治
吴建峰
刘彪
杨青
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Bank Co Ltd
Original Assignee
Ping An Bank Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Bank Co Ltd filed Critical Ping An Bank Co Ltd
Priority to CN202011537474.1A priority Critical patent/CN112527780A/en
Publication of CN112527780A publication Critical patent/CN112527780A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/211Schema design and management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2255Hash tables
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution

Abstract

The invention relates to the field of data processing, and provides a method for creating and managing a Redis cluster, which comprises the following steps: receiving an application request provided by a client, wherein the application request is used for requesting to open a target Redis cluster corresponding to a target application, and the application request carries an application ID of the target application; creating the target Redis cluster according to the application request; configuring target cluster information and an application ID of a target Redis cluster to a configuration center; receiving a target application identifier returned by the configuration center; and sending the target application identifier to the client so that the client can acquire the target cluster information from the configuration center according to the target application identifier and connect the target application with the target Redis cluster according to the target cluster information. The invention realizes the unified and standardized management of the Redis cluster and improves the management efficiency of the Redis cluster; the target cluster information is synchronously updated at the client, and the updating efficiency is improved.

Description

Redis cluster creating and managing method, system, computer device and storage medium
Technical Field
The embodiment of the invention relates to the field of data processing, in particular to a method, a system, computer equipment and a computer readable storage medium for creating and managing a Redis cluster.
Background
Redis is an open source log-type and Key-Value database which is written by using ANSI C language, supports network, can be based on memory and can also be persistent, provides an Application Programming Interface (API) of multiple languages, and is generally called a data structure server, because values (Value) can be five types of strings (String), hashes (Hash/Map), lists (list), sets (sets) and ordered sets (sorted sets), and is very convenient to operate. Redis is a memory database, which is very high-speed in reading and writing, but the capacity of storing data cannot exceed the size of a host memory. Therefore, a Redis clustering mode is required for an application scene with a huge data volume.
At present, most Internet platforms use Redis memory databases to improve response speed and improve user experience. However, after a large number of Redis clusters are used in a service, the existing technology cannot perform standardized management on the Redis clusters, and corresponding code changes are required when the Redis clusters are updated, so that the updating efficiency is low; and is liable to cause a problem that the service is unavailable when the service is changed or stopped. Therefore, how to solve the problem that the Redis cluster cannot be standardized and the problem that the service is easily unavailable when the service changes or stops becomes a technical problem which needs to be solved at present.
Disclosure of Invention
In view of the foregoing, there is a need to provide a method, a system, a computer device, and a computer readable storage medium for creating and managing a Redis cluster, so as to solve the technical problems that the current Redis cluster cannot be managed in a standardized manner and is prone to service unavailability when a service changes or is down.
In order to achieve the above object, an embodiment of the present invention provides a method for creating and managing a Redis cluster, where the method includes:
receiving an application request provided by a client, wherein the application request is used for requesting to open a target Redis cluster corresponding to a target application, and the application request carries an application ID of the target application;
creating the target Redis cluster according to the application request;
configuring the target cluster information and the application ID of the target Redis cluster to a configuration center so that the configuration center can return a target application identifier with successful configuration according to the target cluster information and the application ID;
receiving the target application identification returned by the configuration center; and
and sending the target application identifier to the client so that the client can acquire the target cluster information from the configuration center according to the target application identifier and connect the target application with the target Redis cluster according to the target cluster information.
Illustratively, the application request also carries an application form;
the step of creating the target Redis cluster according to the application request comprises:
analyzing the application request to obtain the application form;
matching a corresponding target execution script from a pre-configured script library according to the application form, wherein the target execution script is used for executing and creating the target Redis cluster; and
and creating the target Redis cluster according to the target execution script.
Illustratively, the application form includes preset Redis cluster parameters corresponding to the target application, the script library includes a plurality of execution scripts, and each execution script is associated with Redis cluster information corresponding to a Redis cluster;
the step of matching the corresponding target execution script from the pre-configured script library according to the application form comprises the following steps:
judging whether an execution script completely matched with the application form exists in the script library or not;
if the execution script completely matched with the application form exists in the script library, taking the completely matched execution script as the target execution script to obtain the target execution script;
and if the execution script completely matched with the application form does not exist in the script library, matching an execution script with the highest similarity to the preset Redis cluster parameter from the script library as the target execution script according to the preset Redis cluster parameter and Redis cluster information associated with each execution script, so as to obtain the target execution script.
The following are exemplary: the preset Redis cluster parameter comprises: the minimum memory usage amount, the maximum memory usage amount, the average query amount per second, the storage data type and the cluster mode of the Redis cluster; the Redis cluster information includes: the cluster node comprises server IP address information, port number information, CPU information, memory information, network card capacity information and cluster mode information of node nodes in a cluster.
Illustratively, the step of configuring the target cluster information of the target Redis cluster and the application ID to a configuration center includes:
monitoring whether the target cluster information is changed; and
and if the target cluster information is changed, configuring the changed cluster information to the configuration center so that the configuration center can replace the target cluster information according to the changed cluster information.
Illustratively, after the step of sending the target application identification to the client, the method further comprises;
receiving the target application identification and the target cluster information sent by the client;
matching the target Redis cluster for the target application according to the cluster information; and
and connecting the target Redis cluster with the target application according to the target application identifier.
Exemplary, also include: and uploading the target application identification and the target cluster information to a block chain.
In order to achieve the above object, an embodiment of the present invention further provides a system for creating and managing a Redis cluster, including:
a receiving module, configured to receive an application request provided by a client, where the application request is used to request to open a target Redis cluster corresponding to a target application, and the application request carries an application ID of the target application;
the creating module is used for creating the target Redis cluster according to the application request;
the configuration module is used for configuring the cluster information of the target Redis cluster and the application ID to a configuration center so that the configuration center can return a target application identifier with successful configuration according to the target cluster information and the application ID; and
the return module is used for receiving the target application identifier returned by the configuration center;
and the sending module is used for sending the target application identifier to the client so that the client can acquire cluster information from the configuration center according to the target application identifier and connect the target application with the target Redis cluster according to the cluster information.
To achieve the above object, an embodiment of the present invention further provides a computer device, where the computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the computer program, when executed by the processor, implements the steps of the method for creating and managing a Redis cluster as described above.
To achieve the above object, an embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored, where the computer program is executable by at least one processor to cause the at least one processor to execute the steps of the method for creating and managing a Redis cluster as described above.
According to the method, the system, the computer device and the computer readable storage medium for creating and managing the Redis cluster, provided by the embodiment of the invention, the target cluster information of the target Redis cluster and the application ID are configured to the configuration center, so that unified and standardized management of the Redis cluster is realized, the problem that the current Redis cluster cannot be subjected to standardized management is solved, and the management efficiency of the Redis cluster is improved; and the target cluster information is synchronously configured to the client through the configuration center, so that the target cluster information is synchronously updated with the client, the problem that the service is unavailable easily when the service is changed or stopped is solved, and the updating efficiency is improved.
Drawings
Fig. 1 is a flowchart illustrating a method for creating and managing a Redis cluster according to an embodiment of the present invention.
Fig. 2 is a schematic diagram of program modules of a second embodiment of a system for creating and managing a Redis cluster according to the present invention.
Fig. 3 is a schematic diagram of a hardware structure of a third embodiment of the computer device according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the description relating to "first", "second", etc. in the present invention is for descriptive purposes only and is not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present invention.
In the following embodiments, the computer device 2 will be exemplarily described as an execution subject.
Example one
Referring to fig. 1, a flowchart illustrating steps of a method for creating and managing a Redis cluster according to an embodiment of the present invention is shown. It is to be understood that the flow charts in the embodiments of the present method are not intended to limit the order in which the steps are performed. The following description is made by way of example with the computer device 2 as the execution subject. The details are as follows.
Step S100, receiving an application request provided by a client, wherein the application request is used for requesting to open a target Redis cluster corresponding to a target application, and the application request carries an application ID of the target application.
A Remote Dictionary Server (Remote Dictionary Server) cluster management platform (computer device 2) may provide a management page for applying for a Remote Dictionary service for applications requiring the Remote Dictionary service.
The client may submit an application request for requesting to open a Redis cluster corresponding to an application associated with the client to the computer device 2 through the management page, where the application request carries an application ID of the target application.
And step S102, creating the target Redis cluster according to the application request.
After obtaining the application request provided by the client, the computer device 2 may create the target Redis cluster for the target application according to the application request, where the target Redis cluster may create the target Redis cluster according to a preconfigured execution script.
In an exemplary embodiment, the application request further carries an application form; the step S102 may further include a step S200 to a step S202, where: step S200, analyzing the application request to obtain the application form; step S202, matching a corresponding target execution script from a pre-configured script library according to the application form, wherein the target execution script is used for executing and creating the target Redis cluster; and step S204, the target Redis cluster is created according to the target execution script.
After obtaining the application request provided by the client, the computer device 2 may further analyze the application request to obtain an application form carried in the application request, where the application form may include creation conditions of multiple Redis clusters. The computer device 2 may match a corresponding target execution script from the pre-configured script library according to the application form, and create the target Redis cluster according to the target execution script.
For example, the computer device 2 may pre-configure a plurality of execution scripts and store the plurality of execution scripts in a script library. For example, the computer device 2 may create a plurality of Redis clusters in advance, and configure an execution script for creating each Redis cluster to obtain a plurality of execution scripts; the computer device 2 may further obtain cluster information of each created Redis cluster, and associate the cluster information with a corresponding execution script, so that the computer device 2 may match the corresponding execution script for the target application according to the creation condition in the application form and the cluster information associated with the execution script. In this embodiment, the computer device 2 configures an execution script for the Redis cluster in advance, so that the creating speed and the creating efficiency of the target Redis cluster are improved.
In an exemplary embodiment, the application form includes preset Redis cluster parameters corresponding to the target application, the script library includes a plurality of execution scripts, and each execution script is associated with Redis cluster information corresponding to a Redis cluster; the step S202 may further include a step S300 to a step S304, where: step S300, judging whether an execution script completely matched with the application form exists in the script library; step S302, if an execution script completely matched with the application form exists in the script library, taking the completely matched execution script as the target execution script to obtain the target execution script; and step S304, if no execution script completely matched with the application form exists in the script library, matching an execution script with the highest similarity to the preset Redis cluster parameter from the script library as the target execution script according to the preset Redis cluster parameter and Redis cluster information associated with each execution script, so as to obtain the target execution script.
When matching a corresponding target execution script from a pre-configured script library according to the application form, the computer device 2 may determine whether an execution script completely matching the application form exists in the script library, where when cluster information associated with the execution script is completely the same as a creation condition of a Redis cluster corresponding to the application form, the execution script completely matches the application form.
If the cluster information associated with one execution script is completely the same as the creating condition of the Redis cluster corresponding to the application form in the script library, the execution script is completely matched with the application form; the computer device 2 can extract this execution script and use the execution script as the target execution script. If the script library does not have an execution script completely matched with the application form, the computer device 2 may match an execution script with the highest similarity to the preset Redis cluster parameter from the script library as the target execution script according to the preset Redis cluster parameter and the Redis cluster information associated with each execution script, so as to obtain the target execution script. In this embodiment, the computer device 2 determines whether an execution script completely matched with the application form exists in the script library, so that the matching degree between the application form and the created Redis cluster is improved, and the creation efficiency of the Redis cluster is improved.
In an exemplary embodiment, the preset Redis cluster parameter includes: the minimum memory usage amount, the maximum memory usage amount, the average query amount per second, the storage data type and the cluster mode of the Redis cluster; the Redis cluster information includes: the cluster node comprises server IP address information, port number information, CPU information, memory information, network card capacity information and cluster mode information of node nodes in a cluster.
Step S104, configuring the target cluster information and the application ID of the target Redis cluster to a configuration center, so that the configuration center returns a target application identifier with successful configuration according to the target cluster information and the application ID.
After the target Redis cluster is created, the computer device 2 may obtain target cluster information of the target Redis cluster, and configure the target cluster information to a configuration center; wherein the configuration center may be configured to store the target cluster information.
The configuration center may store the target cluster information after receiving the target cluster information; when the target cluster information is successfully stored in the configuration center, the configuration center may further generate a target application identifier corresponding to the target application according to the application ID and the target cluster information, and return the target application identifier to the computer device 2. In this embodiment, the configuration center configures the corresponding target application identifier for the target application, so that the management efficiency of the computer device 2 on the created Redis cluster is improved.
In an exemplary embodiment, the step S104 may further include a step S400 to a step S402, where: step S400, monitoring whether the target cluster information is changed; and step S402, if the target cluster information is changed, the changed cluster information is configured to the configuration center, so that the configuration center replaces the target cluster information according to the changed cluster information.
In the embodiment, in order to solve the problem that the service is easily unavailable when the service is changed or stopped, the availability of the service is further improved; the computer device 2 may also monitor the target Redis cluster. For example, the computer device 2 may determine whether the target Redis cluster is changed by monitoring whether the cluster information of the target Redis cluster is changed, so that the computer device 2 may notify the configuration center to adjust the corresponding cluster information in time when the target Redis cluster is changed.
If the target cluster information is changed (e.g., the target application updates the target Redis cluster through the client), the computer device 2 may obtain updated cluster information of the target Redis cluster, and configure the changed cluster information to the configuration center, so that the configuration center changes the target cluster information according to the changed cluster information. In this embodiment, the update management of the Redis cluster is implemented by monitoring the Redis cluster, and the problem that the service is unavailable due to the change of the Redis cluster is avoided. In addition, in this embodiment, when the Redis cluster is updated, the computer device 2 does not need to change the code corresponding to the Redis cluster and issue a new application, and the application can realize smooth migration of the Redis cluster without stopping the service, thereby improving the availability of the application.
Step S106, receiving the target application identification returned by the configuration center.
Step S108, sending the target application identifier to the client, so that the client can obtain the target cluster information from the configuration center according to the target application identifier, and connect the target application with the target Redis cluster according to the target cluster information.
After receiving the target application identifier returned by the configuration center, the computer device 2 may forward the target application identifier to the client. After receiving the target application identifier, the client may obtain cluster information from the configuration center according to the target application identifier, and connect with the target Redis cluster through the cluster information.
In this embodiment, the computer device 2 configures the target cluster information of the target Redis cluster and the application ID to a configuration center, so as to implement unified and standardized management on the Redis cluster, solve the problem that the current Redis cluster cannot be managed in a standardized manner, and improve the management efficiency of the Redis cluster; and the target cluster information is synchronously configured to the client through the configuration center, so that the target cluster information is synchronously updated with the client, the problem that the service is unavailable easily when the service is changed or stopped is solved, and the updating efficiency is improved.
In an exemplary embodiment, the method for creating and managing a Redis cluster further includes step S504 and may further include step S500 to step S504, where: step S500, receiving the target application identification and the target cluster information sent by the client; step S502, matching the target Redis cluster for the target application according to the cluster information; and step S504, connecting the target Redis cluster with the target application according to the target application identifier.
The target application may be a Redis _ Client application, and the Redis _ Client application may integrate the configuration center notification message response function and may process a message sent by the configuration center. After receiving the message sent by the configuration center, resolving Redis service cluster address information in the message, and setting the address information to Redis _ Client application. In this embodiment, the computer device 2 may manage the target Redis cluster, and after cluster information is changed, the changed cluster information may be associated to the corresponding client through the configuration center, and the client does not need to be stopped and restarted, thereby solving a problem that a service is unavailable due to current service change and stoppage.
Illustratively, the method for creating and managing a Redis cluster further includes: and uploading the target application identification and the target cluster information to a block chain.
For example, uploading the call result to the blockchain can ensure the security and the fair transparency. The blockchain referred to in this example is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm, and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
Example two
Fig. 2 is a schematic diagram of program modules of a second embodiment of a system for creating and managing a Redis cluster according to the present invention. The Redis cluster creation and management system 20 may include or be divided into one or more program modules, which are stored in a storage medium and executed by one or more processors, to implement the present invention and implement the Redis cluster creation and management methods described above. The program module referred to in the embodiments of the present invention refers to a series of computer program instruction segments capable of performing specific functions, and is more suitable for describing the execution process of the Redis cluster creation and management system 20 in the storage medium than the program itself. The following description will specifically describe the functions of the program modules of the present embodiment:
the receiving module 200 is configured to receive an application request provided by a client, where the application request is used to request to open a target Redis cluster corresponding to a target application, and the application request carries an application ID of the target application.
A creating module 202, configured to create the target Redis cluster according to the application request.
Illustratively, the application request also carries an application form; the creating module 202 is further configured to: analyzing the application request to obtain the application form; matching a corresponding target execution script from a pre-configured script library according to the application form, wherein the target execution script is used for executing and creating the target Redis cluster; and creating the target Redis cluster according to the target execution script.
Illustratively, the application form includes preset Redis cluster parameters corresponding to the target application, the script library includes a plurality of execution scripts, and each execution script is associated with Redis cluster information corresponding to a Redis cluster; the creating module 202 is further configured to: judging whether an execution script completely matched with the application form exists in the script library or not; if the execution script completely matched with the application form exists in the script library, taking the completely matched execution script as the target execution script to obtain the target execution script; and if the execution script completely matched with the application form does not exist in the script library, matching an execution script with the highest similarity to the preset Redis cluster parameter from the script library as the target execution script according to the preset Redis cluster parameter and Redis cluster information associated with each execution script, so as to obtain the target execution script.
Illustratively, the preset Redis cluster parameter includes: the minimum memory usage amount, the maximum memory usage amount, the average query amount per second, the storage data type and the cluster mode of the Redis cluster; the Redis cluster information includes: the cluster node comprises server IP address information, port number information, CPU information, memory information, network card capacity information and cluster mode information of node nodes in a cluster.
A configuration module 204, configured to configure the cluster information of the target Redis cluster and the application ID to a configuration center, so that the configuration center returns a target application identifier that is successfully configured according to the target cluster information and the application ID.
Illustratively, the configuration module 204 is further configured to: monitoring whether the target cluster information is changed; and if the target cluster information is changed, configuring the changed cluster information to the configuration center so that the configuration center replaces the target cluster information according to the changed cluster information.
A returning module 206, configured to receive the target application identifier returned by the configuration center.
A sending module 208, configured to send the target application identifier to the client, so that the client obtains cluster information from the configuration center according to the target application identifier, and connects the target application with the target Redis cluster according to the cluster information.
Illustratively, the system 20 for creating and managing a Redis cluster further includes a connection module, where the connection module is configured to receive the target application identifier and the target cluster information sent by the client; matching the target Redis cluster for the target application according to the cluster information; and connecting the target Redis cluster with the target application according to the target application identifier.
Illustratively, the system 20 for creating and managing a Redis cluster further includes an uploading module, where the uploading module is configured to upload the target application identifier and the target cluster information to a block chain.
EXAMPLE III
Fig. 3 is a schematic diagram of a hardware architecture of a computer device according to a third embodiment of the present invention. In the present embodiment, the computer device 2 is a device capable of automatically performing numerical calculation and/or information processing in accordance with a preset or stored instruction. The computer device 2 may be a rack server, a blade server, a tower server or a rack server (including an independent server or a server cluster composed of a plurality of servers), and the like. As shown, the computer device 2 includes, but is not limited to, at least a memory 21, a processor 22, a network interface 23, and a Redis cluster creation and management system 20 communicatively coupled to each other via a system bus.
In this embodiment, the memory 21 includes at least one type of computer-readable storage medium including a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the storage 21 may be an internal storage unit of the computer device 2, such as a hard disk or a memory of the computer device 2. In other embodiments, the memory 21 may also be an external storage device of the computer device 2, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), or the like provided on the computer device 2. Of course, the memory 21 may also comprise both internal and external memory units of the computer device 2. In this embodiment, the memory 21 is generally used for storing an operating system and various application software installed in the computer device 2, for example, the program code of the Redis cluster creation and management system 20 in the second embodiment. Further, the memory 21 may also be used to temporarily store various types of data that have been output or are to be output.
Processor 22 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 22 is typically used to control the overall operation of the computer device 2. In this embodiment, the processor 22 is configured to run a program code stored in the memory 21 or process data, for example, run the creating and managing system 20 of the Redis cluster, so as to implement the creating and managing method of the Redis cluster in the first embodiment.
The network interface 23 may comprise a wireless network interface or a wired network interface, and the network interface 23 is generally used for establishing communication connection between the computer device 2 and other electronic apparatuses. For example, the network interface 23 is used to connect the computer device 2 to an external terminal through a network, establish a data transmission channel and a communication connection between the computer device 2 and the external terminal, and the like. The network may be a wireless or wired network such as an Intranet (Intranet), the Internet (Internet), a Global System of Mobile communication i/On (GSM), a Wideband Code Division Multiple Access (WCDMA), a 4G network, a 5G network, Bluetooth (Bluetooth), Wi-Fi, and the like.
It is noted that fig. 3 only shows the computer device 2 with components 20-23, but it is to be understood that not all shown components are required to be implemented, and that more or less components may be implemented instead.
In this embodiment, the system 20 for creating and managing a Redis cluster stored in the memory 21 may be further divided into one or more program modules, and the one or more program modules are stored in the memory 21 and executed by one or more processors (in this embodiment, the processor 22) to complete the present invention.
For example, fig. 2 is a schematic diagram illustrating program modules of the system for creating and managing a Redis cluster 20 according to a second embodiment of the present invention, where the system for creating and managing a Redis cluster 20 may be divided into a receiving module 200, a creating module 202, a configuring module 204, a returning module 206, and a sending module 208. The program module referred to in the present invention refers to a series of computer program instruction segments capable of performing specific functions, and is more suitable than a program for describing the execution process of the Redis cluster creation and management system 20 in the computer device 2. The specific functions of the program modules 200 and 208 have been described in detail in the second embodiment, and are not described herein again.
Example four
The present embodiment also provides a computer-readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, a server, an App application mall, etc., on which a computer program is stored, which when executed by a processor implements corresponding functions. The computer-readable storage medium of this embodiment is used in the system 20 for creating and managing a Redis cluster, and when executed by a processor, the method for creating and managing a Redis cluster of the first embodiment is implemented.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A Redis cluster creating and managing method, the method comprising:
receiving an application request provided by a client, wherein the application request is used for requesting to open a target Redis cluster corresponding to a target application, and the application request carries an application ID of the target application;
creating the target Redis cluster according to the application request;
configuring the target cluster information and the application ID of the target Redis cluster to a configuration center so that the configuration center can return a target application identifier with successful configuration according to the target cluster information and the application ID;
receiving the target application identification returned by the configuration center; and
and sending the target application identifier to the client so that the client can acquire the target cluster information from the configuration center according to the target application identifier and connect the target application with the target Redis cluster according to the target cluster information.
2. The Redis cluster creating and managing method of claim 1, wherein the application request further carries an application form;
the step of creating the target Redis cluster according to the application request comprises:
analyzing the application request to obtain the application form;
matching a corresponding target execution script from a pre-configured script library according to the application form, wherein the target execution script is used for executing and creating the target Redis cluster; and
and creating the target Redis cluster according to the target execution script.
3. The Redis cluster creating and managing method according to claim 2, wherein the request form includes preset Redis cluster parameters corresponding to the target application, the script library includes a plurality of execution scripts, and each execution script is associated with Redis cluster information corresponding to a Redis cluster;
the step of matching the corresponding target execution script from the pre-configured script library according to the application form comprises the following steps:
judging whether an execution script completely matched with the application form exists in the script library or not;
if the execution script completely matched with the application form exists in the script library, taking the completely matched execution script as the target execution script to obtain the target execution script; and
and if the execution script completely matched with the application form does not exist in the script library, matching an execution script with the highest similarity to the preset Redis cluster parameter from the script library as the target execution script according to the preset Redis cluster parameter and Redis cluster information associated with each execution script, so as to obtain the target execution script.
4. A method of Redis cluster creation and management according to claim 3, wherein:
the preset Redis cluster parameter comprises: the minimum memory usage amount, the maximum memory usage amount, the average query amount per second, the storage data type and the cluster mode of the Redis cluster;
the Redis cluster information includes: the cluster node comprises server IP address information, port number information, CPU information, memory information, network card capacity information and cluster mode information of node nodes in a cluster.
5. The Redis cluster creation and management method of claim 1, wherein the step of configuring the target cluster information and the application ID of the target Redis cluster to a configuration center comprises:
monitoring whether the target cluster information is changed; and
and if the target cluster information is changed, configuring the changed cluster information to the configuration center so that the configuration center can replace the target cluster information according to the changed cluster information.
6. A method for Redis cluster creation and management according to claim 1, further comprising, after said step of sending said target application identification to said client;
receiving the target application identification and the target cluster information sent by the client;
matching the target Redis cluster for the target application according to the cluster information; and
and connecting the target Redis cluster with the target application according to the target application identifier.
7. A method for Redis cluster creation and management according to claim 1, further comprising: and uploading the target application identification and the target cluster information to a block chain.
8. A system for creating and managing a Redis cluster, comprising:
a receiving module, configured to receive an application request provided by a client, where the application request is used to request to open a target Redis cluster corresponding to a target application, and the application request carries an application ID of the target application;
the creating module is used for creating the target Redis cluster according to the application request;
the configuration module is used for configuring the cluster information of the target Redis cluster and the application ID to a configuration center so that the configuration center can return a target application identifier with successful configuration according to the target cluster information and the application ID; and
the return module is used for receiving the target application identifier returned by the configuration center;
and the sending module is used for sending the target application identifier to the client so that the client can acquire cluster information from the configuration center according to the target application identifier and connect the target application with the target Redis cluster according to the cluster information.
9. A computer arrangement comprising a memory, a processor and a computer program stored on said memory and executable on said processor, characterized in that said computer program, when executed by the processor, carries out the steps of the method for Redis cluster creation and management according to any of claims 1 to 7.
10. A computer-readable storage medium, having stored therein a computer program executable by at least one processor for causing the at least one processor to perform the steps of the method for creation and management of Redis clusters as claimed in any one of claims 1 to 7.
CN202011537474.1A 2020-12-23 2020-12-23 Redis cluster creating and managing method, system, computer device and storage medium Pending CN112527780A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011537474.1A CN112527780A (en) 2020-12-23 2020-12-23 Redis cluster creating and managing method, system, computer device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011537474.1A CN112527780A (en) 2020-12-23 2020-12-23 Redis cluster creating and managing method, system, computer device and storage medium

Publications (1)

Publication Number Publication Date
CN112527780A true CN112527780A (en) 2021-03-19

Family

ID=74975884

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011537474.1A Pending CN112527780A (en) 2020-12-23 2020-12-23 Redis cluster creating and managing method, system, computer device and storage medium

Country Status (1)

Country Link
CN (1) CN112527780A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114338402A (en) * 2021-12-30 2022-04-12 中国电信股份有限公司 Redis cluster building method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109814881A (en) * 2017-11-21 2019-05-28 北京京东尚科信息技术有限公司 Method and apparatus for disposing data-base cluster
CN110138577A (en) * 2018-02-08 2019-08-16 腾讯科技(深圳)有限公司 Cluster creation method, first server and readable storage medium storing program for executing
CN111107120A (en) * 2018-10-29 2020-05-05 亿阳信通股份有限公司 Redis cluster construction method and system
CN111858628A (en) * 2020-06-30 2020-10-30 北京百度网讯科技有限公司 Database-based management method, database-based management platform, electronic device and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109814881A (en) * 2017-11-21 2019-05-28 北京京东尚科信息技术有限公司 Method and apparatus for disposing data-base cluster
CN110138577A (en) * 2018-02-08 2019-08-16 腾讯科技(深圳)有限公司 Cluster creation method, first server and readable storage medium storing program for executing
CN111107120A (en) * 2018-10-29 2020-05-05 亿阳信通股份有限公司 Redis cluster construction method and system
CN111858628A (en) * 2020-06-30 2020-10-30 北京百度网讯科技有限公司 Database-based management method, database-based management platform, electronic device and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114338402A (en) * 2021-12-30 2022-04-12 中国电信股份有限公司 Redis cluster building method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN108427705B (en) Electronic device, distributed system log query method and storage medium
CN108696372B (en) Method and system for keeping system configuration consistency
CN107682426B (en) Interface proxy method and application server
CN109951514B (en) File processing method and system based on cloud storage and computer equipment
CN110222535B (en) Processing device, method and storage medium for block chain configuration file
CN111414391A (en) Method and system for accessing multiple data sources
CN111737227B (en) Data modification method and system
CN111177776A (en) Multi-tenant data isolation method and system
CN111988419A (en) File uploading method, file downloading method, file uploading device, file downloading device, computer equipment and storage medium
CN112422450B (en) Computer equipment, and flow control method and device for service request
CN111343267A (en) Configuration management method and system
CN112527780A (en) Redis cluster creating and managing method, system, computer device and storage medium
CN112052141B (en) Data fragment verification method and device, computer equipment and readable storage medium
CN109002332B (en) Process starting and configuring method, device and system
CN111585897B (en) Request route management method, system, computer system and readable storage medium
CN115221360A (en) Tree structure configuration method and system
CN115033551A (en) Database migration method and device, electronic equipment and storage medium
CN114553859A (en) BMC configuration management method and device, electronic equipment and storage medium
CN113791735A (en) Video data storage method and device, computer equipment and storage medium
CN113420050A (en) Data query management method and device, computer equipment and readable storage medium
CN112417012A (en) Data processing method and system
CN111654398A (en) Configuration updating method and device, computer equipment and readable storage medium
CN112988738A (en) Data slicing method and device for block chain
CN110580181A (en) Cloud distributed configuration management method, electronic device and computer equipment
CN111162988B (en) Message distribution method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination