CN113726546B - Configuration method, device, system, computing equipment and storage medium - Google Patents

Configuration method, device, system, computing equipment and storage medium Download PDF

Info

Publication number
CN113726546B
CN113726546B CN202110785903.5A CN202110785903A CN113726546B CN 113726546 B CN113726546 B CN 113726546B CN 202110785903 A CN202110785903 A CN 202110785903A CN 113726546 B CN113726546 B CN 113726546B
Authority
CN
China
Prior art keywords
configuration
configuration information
resource
request
disk
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.)
Active
Application number
CN202110785903.5A
Other languages
Chinese (zh)
Other versions
CN113726546A (en
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.)
Ruijie Networks Co Ltd
Original Assignee
Ruijie Networks 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 Ruijie Networks Co Ltd filed Critical Ruijie Networks Co Ltd
Priority to CN202110785903.5A priority Critical patent/CN113726546B/en
Publication of CN113726546A publication Critical patent/CN113726546A/en
Application granted granted Critical
Publication of CN113726546B publication Critical patent/CN113726546B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0889Techniques to speed-up the configuration process
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0893Assignment of logical groups to network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the application provides a configuration method, a configuration device, a configuration system, a computing device and a storage medium. The configuration method is applied to a distributing end and comprises the following steps: acquiring a first configuration request which is triggered by a user and aims at a distributed system and comprises first configuration information; detecting whether the first configuration information is valid; if the first configuration information is valid, forwarding a first configuration request to the distributed coordination service cluster so that the distributed coordination service cluster updates the configuration information in the disk based on the first configuration information, and sending a second configuration request to the target execution end, wherein the second configuration request is used for indicating the target execution end to configure the distributed system by using the first configuration information in the disk. The technical scheme provided by the embodiment of the application can improve the configuration efficiency of the configuration distributed system.

Description

Configuration method, device, system, computing equipment and storage medium
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a configuration method, a configuration device, a configuration system, a computing device and a storage medium.
Background
A distributed system is a system consisting of a set of computer nodes that communicate over a network to coordinate work in order to accomplish a common task. In order for a distributed system to provide corresponding services, corresponding resources need to be configured for computer nodes in the distributed system. For example, the distributed storage system is to solve the bottlenecks of capacity, performance and the like existing in single-machine storage, and the problems of availability, expansibility and the like, and by dispersing and storing data on a plurality of storage devices, a storage service with large capacity, high performance, high availability and good expansibility is provided for large-scale storage applications. In order for a distributed storage system to provide corresponding storage services, storage resources including, but not limited to, storage pools, snapshots, mechanical hard disks, and solid state disks, etc., need to be deployed for each storage device in the distributed storage system.
In the related art, a configuration system formed by a distributing end, a distributed coordination service cluster and an executing end is often utilized to execute tasks of configuring the distributed system. The user transmits configuration information to a configuration system, and a distribution terminal in the configuration system receives the configuration information and transmits the configuration information to a distributed coordination service cluster; the distributed coordination service cluster stores the configuration information into the disk, and requests the execution end to acquire the configuration information in the disk to execute the configuration operation. The execution end performs validity check on the configuration information issued by the user, if the configuration information is determined to be valid, the configuration system performs the configuration operation based on the configuration information, otherwise, if the configuration information is determined to be invalid, the configuration system does not perform the configuration operation based on the configuration information.
However, in the existing configuration system, the manner of detecting the validity of the configuration information when the configuration information flows to the execution end increases the interaction overhead among the distribution end, the distributed coordination service cluster and the execution end, and affects the configuration efficiency of the configuration distributed system.
Disclosure of Invention
The embodiment of the application provides a configuration method, a device, a system, a computing device and a storage medium, which are used for improving the configuration efficiency of a configuration distributed system.
In a first aspect, an embodiment of the present application provides a configuration method, which is applied to a distributing end, including:
acquiring a first configuration request which is triggered by a user and aims at a distributed system and comprises first configuration information;
detecting whether the first configuration information is valid;
and if the first configuration information is valid, forwarding the first configuration request to a distributed coordination service cluster so that the distributed coordination service cluster updates the configuration information in the disk based on the first configuration information, and sending a second configuration request to a target execution end, wherein the second configuration request is used for indicating the target execution end to configure the distributed system by using the first configuration information in the disk.
In a second aspect, an embodiment of the present application provides a configuration system, including: a distributing end, a distributed coordination service cluster and a plurality of executing ends;
the distribution terminal is used for acquiring a first configuration request which is triggered by a user and aims at the distributed system, and the first configuration request comprises first configuration information; detecting whether the first configuration information is valid; if the first configuration information is valid, forwarding the first configuration request to a distributed coordination service cluster;
The distributed coordination service cluster is used for responding to the first configuration request, updating configuration information in a disk and sending a second configuration request to the target execution end in the plurality of execution ends;
the target execution end is used for responding to the second configuration request and acquiring the first configuration information in the disk to configure the distributed system.
In a third aspect, an embodiment of the present application provides a configuration apparatus, including:
the acquisition module is used for acquiring a first configuration request which is triggered by a user and aims at the distributed system and comprises first configuration information;
the processing module is used for detecting whether the first configuration information is valid or not; and if the first configuration information is valid, forwarding the first configuration request to a distributed coordination service cluster so that the distributed coordination service cluster updates the configuration information in the disk based on the first configuration information, and sending a second configuration request to a target execution end, wherein the second configuration request is used for indicating the target execution end to configure the distributed system by using the first configuration information in the disk.
In a fourth aspect, in an embodiment of the present application, a computing device is provided, including a processing component and a storage component;
The storage component stores one or more computer instructions; the one or more computer instructions are to be invoked for execution by the processing component;
the processing assembly is configured to:
acquiring a first configuration request which is triggered by a user and aims at a distributed system and comprises first configuration information;
detecting whether the first configuration information is valid;
if the first configuration information is valid, forwarding the first configuration request to a distributed coordination service cluster, so that the distributed coordination service cluster updates the configuration information in a disk based on the first configuration information, and sending a second configuration request to a target execution end, wherein the second configuration request is used for indicating the target execution end to configure the distributed system by using the first configuration information in the disk;
in a fifth aspect, in an embodiment of the present application, there is provided a computer storage medium storing a computer program, where the computer program is executed by a computer to implement the above configuration method.
In the embodiment of the application, the checking step of the validity of the configuration information is adjusted from the execution of the target execution end to the execution of the distribution end, so that when the distribution end receives the configuration information issued by the user, the validity of the configuration information issued by the user can be checked in time, invalid configuration information is prevented from continuing to circulate in time, the interactive expenditure among the distribution end, the distributed coordination service cluster and the execution end is further reduced, and the configuration efficiency of the configuration distributed system is improved.
These and other aspects of the application will be more readily apparent from the following description of the embodiments.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 shows a schematic diagram of one possible system architecture provided by the present application;
FIG. 2 illustrates a flow chart of one embodiment of a configuration method provided by the present application;
FIG. 3 is a flow chart illustrating another embodiment of a configuration method provided by the present application;
FIG. 4 is a flow chart illustrating another embodiment of a configuration method provided by the present application;
FIG. 5 is a schematic diagram illustrating the construction of one embodiment of a configuration device provided by the present application;
FIG. 6 is a schematic view of another embodiment of the configuration device according to the present application;
FIG. 7 illustrates a schematic diagram of one embodiment of a computing device provided by the present application.
Detailed Description
In order to enable those skilled in the art to better understand the present application, the following description will make clear and complete descriptions of the technical solutions according to the embodiments of the present application with reference to the accompanying drawings.
In some of the flows described in the specification and claims of the present application and in the foregoing figures, a plurality of operations occurring in a particular order are included, but it should be understood that the operations may be performed out of order or performed in parallel, with the order of operations such as 101, 102, etc., being merely used to distinguish between the various operations, the order of the operations themselves not representing any order of execution. In addition, the flows may include more or fewer operations, and the operations may be performed sequentially or in parallel. It should be noted that, the descriptions of "first" and "second" herein are used to distinguish different messages, devices, modules, etc., and do not represent a sequence, and are not limited to the "first" and the "second" being different types.
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to fall within the scope of the application.
A system architecture to which embodiments of the present application may be applied will first be described in conjunction with fig. 1. Fig. 1 shows a schematic diagram of one possible system architecture provided by the present application. Referring to fig. 1, the system architecture may include: a distributing end 101, a plurality of executing ends 103 and a distributed coordination service cluster 102. The distributing end 101 is in communication connection with the distributed coordination service cluster through a communication network, and any executing end 103 of the plurality of executing ends 103 is in communication connection with the distributed coordination service cluster through the communication network.
Any execution end 103 of the distribution end 101 and the plurality of execution ends 103 may be a terminal device or a server.
Wherein the distributed coordination service cluster 102 deploys a plurality of coordination services to provide the distributed coordination services. The distributed coordination service cluster 102 comprises a plurality of processing nodes 1021, each processing node 1021 may be a terminal device or a server.
It should be understood that in fig. 1, the number of distributing ends 101, the number of executing ends 103, and the number of processing nodes 1021 in the distributed coordination service cluster 102 are merely illustrative, and may be arbitrarily configured according to actual requirements, which is not limited to the present application.
Specifically, the distributing end 101 is configured to obtain a first configuration request for the distributed system triggered by a user, where the first configuration request includes first configuration information; detecting whether the first configuration information is valid; and if the first configuration information is valid, forwarding the first configuration request to the distributed coordination service cluster.
The distributed coordination service cluster 102 is configured to respond to the first configuration request, update configuration information in the disk 104, and send a second configuration request to a target execution end 103 of the plurality of execution ends 103.
The target executing end 103 is configured to obtain the first configuration information in the disk 104 to configure the distributed system in response to the second configuration request.
Optionally, the distributed coordination service cluster 102 is further configured to detect whether the distribution terminal 101 is abnormal, and if so, reselect a new distribution terminal 101.
In practical application, application software for providing configuration information distribution service can be deployed on a plurality of service servers of the service server cluster. The distributed coordination service cluster 102 may monitor the state of deploying application software on each service server, and select a service server corresponding to the application software in a normal state as the distributing end 101.
Optionally, the distributed coordination service cluster 102 is further configured to reselect a new target execution end 103 in a normal state from the plurality of execution ends 103 when the target execution end 103 fails.
The distributing end 101 may be regarded as a front end of the whole configuration flow, may interact with user information, and mainly performs tasks of acquiring and transmitting configuration information, and performs validity check on the configuration information.
The distributing end 101 may receive a first configuration request issued by a user through an application program interface (Application Programming Interface, API). By way of example, the application program interface may be a RESTful API, which is a REST-style API. REST describes a form of interaction between a client (client) and a server (server) in a network, REST is not a protocol, but a style.
For example, the user may input configuration information for the distributed system on the device side thereof, and trigger a sending operation for sending the input configuration information, at this time, the user may be considered to trigger a configuration request for the distributed system, and the distributing side 101 receives the configuration request through the application program interface, obtains corresponding configuration information from the configuration request, and distributes the configuration information to the distributed coordination service cluster.
For another example, the distributing end 101 may also provide a display interface, where a user may input configuration information for the distributed system on the display interface and trigger a sending operation for sending the input configuration information, where the user may be considered to trigger a configuration request for the distributed system, and the distributing end 101 receives the configuration request through an application program interface, obtains corresponding configuration information from the configuration request, and distributes the configuration information to the distributed coordination service cluster.
The distributed coordination service deployed by the distributed coordination service cluster 102 is software for providing a consistency service for a distributed application, and is mainly used for solving some data management problems frequently encountered in the distributed application, such as: unified naming service, state synchronization service, cluster management, management of distributed application configuration items, and the like. The distributed coordination service may employ, but is not limited to, the following framework: a ZooKeeper framework and an etcd framework. The ZooKeeper is a distributed application coordination service of distributed and open source codes, and the provided functions include but are not limited to: configuration maintenance, domain name service, distributed synchronization, group service, etc. etcd is a high available Key/Value (Key/Value pair) storage system, mainly used for sharing configuration and service discovery. See the related art for more details on ZooKeeper and etcd.
Any execution end 103 of the plurality of execution ends 103 has probability of being selected as a target execution end 103, and the target execution end 103 can be understood as the back end of the whole configuration flow and mainly bears the task of acquiring corresponding configuration information from the disk 104 to configure the distributed system.
The following describes the technical scheme of the present application and how the technical scheme of the present application solves the above technical problems in detail with specific embodiments. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Fig. 2 is a flowchart of an embodiment of a configuration method provided by the present application, where an execution body of the method is a distributing end. Referring to fig. 2, the configuration method may include the steps of:
201. a user-triggered first configuration request for the distributed system including first configuration information is obtained.
In particular, the distributed system may be any system that provides a service, such as a distributed storage system, a distributed computing system, and the like. The services provided by the distributed systems depend on the configured resources, the resource configuration tasks of different distributed systems are different, and different resource configuration tasks determine different configuration information.
To facilitate distinguishing from other configuration requests mentioned later, a configuration request sent by a user to a distribution end is referred to as a first configuration request. The first configuration information carried in the first configuration request is determined by resource configuration tasks, and different resource configuration tasks correspond to different first configuration information. Wherein the first configuration information may include one or more configuration parameters.
For ease of understanding, embodiments of the present application will be described with reference to a storage pool configuration task of a distributed storage system. The storage pool (storage pool) is based on a certain number of physical disks, a certain number of unused physical disks (physical disks) are added into the storage pool to form a certain number of virtual disks (virtual disks), and then a new volume building operation is performed on the virtual disks.
In the storage pool configuration task, the configuration information that the user may configure includes, for example, the following configuration parameters: storage pool name, volume number, volume size, and the like.
For ease of understanding, table 1 is presented. Table 1 is configuration information issued by the user. Two pieces of configuration information are recorded in table 1, one piece is the configuration information of pool-0; the other is the configuration information of the pool-1. Taking configuration information of the storage pool-0 as an example, the configuration information of the storage pool-0 includes a storage pool name, a disk, and volume configuration information of the storage pool-0. It is known from the configuration information of the storage pool-0 that two volumes, volume-0 and volume-1, respectively, are created under the storage pool-0. Wherein the configuration information for volume vol-0 indicates that volume vol-0 is named vol-0 and volume capacity is 200. The configuration information for volume vol-1 indicates that volume vol-1 is named vol-1 and volume capacity is 300.
TABLE 1
202. It is detected whether the first configuration information is valid.
In practical applications, the user may not clearly configure the rule, so that the configured configuration information does not conform to the related configuration rule, that is, the configured configuration information is invalid. It will be appreciated that invalid configuration information may cause a distributed system configuration failure situation to occur. Thus, upon receiving the first configuration information input by the user, it is necessary to perform validity detection thereof.
When the validity of the configuration information is detected, the items to be detected can be set according to the actual service requirements. For example, the detected items such as one or more of a data normalization item, a business normalization item. The data normalization items include, but are not limited to, data formats, data types, value ranges, and the like. The traffic normalization items include, for example, but are not limited to, whether the resource to be configured is available, whether the name of the resource to be configured is duplicative of the name of the configured resource, and the like.
Optionally, when the distributing end determines that the first configuration information is invalid, the distributing end may push a configuration failure message and a configuration failure reason to the user, so that the user knows whether the issued configuration information is valid or not, and downloads the new first configuration information again.
203. And if the first configuration information is valid, forwarding the first configuration request to the distributed coordination service cluster.
Specifically, the distribution end determines that the first configuration information submitted by the user is valid, and at this time, the distribution end forwards the first configuration request to the distributed coordination service cluster; the distributed coordination service cluster responds to the first configuration request, updates configuration information in the disk based on the first configuration information, and sends a second configuration request to the target execution end, wherein the second configuration request is used for indicating the target execution end to acquire the first configuration information in the disk to configure the distributed system.
In the embodiment of the application, the checking step of the validity of the configuration information is adjusted from the execution of the target execution end to the execution of the distribution end, so that when the distribution end receives the configuration information issued by the user, the validity of the configuration information issued by the user can be checked in time, invalid configuration information is prevented from going on circulation in time, the interactive expenditure among the distribution end, the distributed coordination service cluster and the execution end is further reduced, and the configuration efficiency of the configuration distributed system is improved.
In practical application, some conditions can be set according to practical service requirements to detect whether the first configuration information is valid. For example, it may be detected whether the configuration information meets a data normalization condition, a traffic normalization condition to identify whether the first configuration information is valid.
Wherein, the data normalization condition is set according to the actual business requirement. For example, the data normalization conditions may include data format conditions, data type conditions, value range conditions, and the like.
In some embodiments, the distributing end may detect validity of the first configuration information using a data normalization condition. Thus, detecting whether the first configuration information is valid may include: detecting whether the first configuration information accords with the data normalization condition; if yes, the first configuration information is determined to be valid.
In some embodiments, the data normalization conditions include at least one or more of the following: data format conditions, data type conditions, and value range conditions. Detecting whether the first configuration information meets the data normalization condition may include: for any configuration parameter in the first configuration information, detecting whether the data format of the parameter value of the configuration parameter is a preset data format or not; if yes, determining that the configuration parameters meet the data format conditions; or, for any configuration parameter, detecting whether the data type of the parameter value of the configuration parameter is a preset type; if yes, determining that the configuration parameters meet the data type conditions; for any configuration parameter, detecting whether the value range of the parameter value of the configuration parameter is a preset value range or not; if yes, determining that the configuration parameters meet the value range conditions.
The preset data format is set according to the actual service requirement, and the preset data format is, for example: html (Hyper Text Markup Language ) format, json (JavaScript Object Notation, json object profile) format.
The preset type is set according to actual service requirements. For example, the corresponding preset type of some configuration parameters is a string type, the corresponding preset type of some configuration parameters is a numeric type, and so on.
The preset value range is set according to actual service requirements. For example, when creating a new volume in a storage pool, the volume number, volume capacity size of the new volume cannot exceed the configuration data range of the corresponding volume. For example, the volume number has a configuration data range of (0, 5), and the volume capacity has a configuration data range of (0,500).
In some embodiments, in order to reduce the probability of failure of the distributed system configuration, and improve the distributed system configuration efficiency, in detecting the validity of the first configuration information, service normalization may be detected in addition to data normalization. The order of detection of data normalization and business normalization is not limited.
Optionally, if the configuration information does not conform to the data normalization, even if the configuration information conforms to the service normalization, such configuration information may cause configuration failure when configuring the distributed system. Thus, in some alternative embodiments, to further improve the configuration efficiency of the distributed system, when detecting the validity of the configuration information, it may first detect whether the configuration information meets the data normalization, and if so, then detect whether the configuration information meets the service normalization.
Fig. 3 is a flowchart of another embodiment of a configuration method provided by the present application, where an execution body of the method is a distributing end, and in this embodiment, when detecting validity of first configuration information, the distributing end may first detect whether the first configuration information accords with a data normalization condition, and then detect whether the first configuration information accords with a service normalization condition. Referring to fig. 3, the configuration method may include the steps of:
301. A user-triggered first configuration request for the distributed system including first configuration information is obtained.
The implementation manner of step 301 in the embodiment of the present application is the same as that of step 201 in the above embodiment, and will not be described herein.
302. And detecting whether the first configuration information meets the data normalization condition.
The method for detecting whether the first configuration information accords with the data normalization condition in the embodiment of the present application refers to the method for detecting whether the first configuration information accords with the data normalization condition described in the foregoing, and is not described herein again.
303. If the first configuration information accords with the data normalization condition, detecting whether the first configuration information accords with the service normalization condition.
304. If the first configuration information accords with the service normalization condition, the first configuration information is determined to be effective, and the first configuration request is forwarded to the distributed coordination service cluster.
The implementation manner of step 304 in the embodiment of the present application is the same as that of step 203 in the above embodiment, and will not be described here again.
In the embodiment of the application, the service normalization condition is set according to the actual service requirement. For example, the business normative conditions may include a resource availability check condition, a rename check condition.
The resource availability check condition is used for detecting whether the resources to be configured indicated by the configuration parameters are available.
For example, in practice, a user may wish to configure a resource for a distributed system, but the resource may fail and be unavailable. Therefore, it is necessary to check whether the resources to be configured indicated by the first configuration information are available.
The rename checking condition is used for detecting whether the resource name corresponding to the configuration parameter is used or not. That is, it is checked whether the resource name in the configuration information newly submitted by the user is the same as the resource name in the old configuration information stored in the configuration system.
For example, in the storage pool configuration task, if the storage pool configuration task indicates to create a new storage pool for the distributed storage system, the first configuration information submitted by the user includes a new storage pool name; after the configuration system receives first configuration information submitted by a user, checking whether the new storage pool name in the first configuration information is the same as the storage pool name in old configuration information stored in the configuration system; if the storage pool names are the same, the new storage pool names are used, the storage pool names do not accord with the duplicate name checking condition, namely, the corresponding storage pool is established in history, and the creation operation of the storage pool is invalid; if the storage pool names are different, the new storage pool names are not used, the storage pool names conform to the check condition of the rename, namely, the corresponding storage pool is not created in the history, and the creation operation of the storage pool is effective operation currently.
For another example, in the storage pool configuration task, if the storage pool configuration task indicates that the created storage pool is modified or deleted for the distributed storage system, the first configuration information submitted by the user carries the name of the storage pool to be processed; after the configuration system receives first configuration information submitted by a user, checking whether the names of the storage pools to be processed in the first configuration information are the same as the names of the storage pools in the old configuration information stored in the configuration system; if the modified operation or the deleted operation is the same, the method accords with the rename checking condition, namely, the history is explained that the corresponding storage pool is already created, and the current modification operation or the deletion operation aiming at the storage pool is an effective operation; if the modified operation is different, the duplicate name checking condition is not met, namely, the fact that the history has created the corresponding storage pool is indicated, and the current modification operation or deletion operation for the storage pool is an invalid operation.
The inventor finds that when the distributing end executes the detection of the rename checking condition, the distributing end can interact with the distributed coordination service cluster to request the distributed coordination service cluster to inquire whether the resource name in the configuration information newly submitted by the user exists in the disk or not, and judges whether the configuration information newly submitted by the user accords with the rename checking condition or not based on the inquiry result returned by the distributed coordination service cluster.
Over time, more and more configuration information is stored in the disk, particularly when the distributed system is larger, the distributed coordination service cluster needs to traverse a large amount of stored configuration information in the disk to complete query response, so that the detection efficiency of the distribution end for executing the rename check condition is affected.
The inventor further researches and discovers that the resource names of the configuration information in the disk can be stored in the memory, and the distribution terminal executes the rename check condition based on the resource names in the memory, so that the detection efficiency of the rename check condition is further improved, the interaction cost of the distribution terminal and the distributed coordination service cluster is further reduced, and the distribution efficiency of the distribution terminal for outwards distributing the configuration information is also improved.
Therefore, in some embodiments, before detecting whether the first configuration information meets the service normalization condition, the distributing end may further select, for any piece of configuration information in the disk, a first configuration parameter characterizing a resource name from the configuration information when the distributing end is initialized or restarted; and storing the first configuration parameters into a memory. Accordingly, the detecting, by the distributing end, whether the first configuration information meets the service normalization condition may be: and detecting whether the first configuration information accords with the rename checking condition according to the first configuration parameters in the memory.
As a possible implementation manner, "detecting whether the first configuration information meets the rename check condition according to the first configuration parameter in the memory" specifically includes:
if the first configuration request indicates that resources are created for the distributed system, searching whether the memory has a first configuration parameter matched with the resource name in the first configuration information or not;
if the memory does not have the first configuration parameters matched with the resource names in the first configuration information, determining that the first configuration information accords with the rename checking conditions;
if a first configuration parameter matched with the resource name in the first configuration information exists in the memory, determining that the first configuration information does not accord with the rename checking condition;
if the first configuration request indicates to delete the created resource for the distributed system or the first configuration request indicates to modify the created resource for the distributed system, if a first configuration parameter matched with the resource name in the first configuration information exists in the memory, determining that the first configuration information accords with the rename checking condition;
and if the first configuration parameters matched with the resource names in the first configuration information do not exist in the memory, determining that the first configuration information does not accord with the rename checking condition.
It should be understood that, in practical applications, the operation types corresponding to the first configuration request issued by the user may include: creation operation, deletion operation, modification operation, query operation.
When the operation type corresponding to the first configuration request is a creation operation, the distribution end inquires whether a resource name in the first configuration information is stored in the memory, if so, the distribution end stops responding to the first configuration request and refuses to distribute the first configuration information to the distributed coordination service cluster, and further, the situation that the distributed coordination service cluster request execution end repeatedly configures resources corresponding to the resource name for the distributed system is prevented. Of course, if the resource name in the first configuration information is not stored in the memory, the distributing end determines that the first configuration information accords with the rename checking rule, and if the distributing end determines that the first configuration information accords with other rules related to validity, the distributing end can forward the first configuration information to the distributed coordination service cluster and store the first configuration information in the disk, and of course, the distributed coordination service cluster can request the executing end to acquire the first configuration information in the disk and execute the resource creation operation for the distributed system.
When the operation type corresponding to the first configuration request is a modification operation, the distribution end inquires whether a resource name in the first configuration information is stored in the memory, if so, the distribution end indicates that the distribution end historically issues the configuration information of the resource corresponding to the resource name, at this time, the distribution end can continue responding to the first configuration request and distribute the first configuration information to the distributed coordination service cluster, so that the distributed coordination service cluster modifies the corresponding configuration information in the disk according to the first configuration information, and the distributed coordination service cluster can request the execution end to acquire the first configuration information in the disk and execute the resource modification operation aiming at the distributed system. Of course, if the resource name in the first configuration information is not stored in the memory, the distributing end determines that the first configuration information does not conform to the rename check condition, and the distributing end may stop responding to the first configuration request.
When the operation type corresponding to the first configuration request is a deletion operation, the distribution end inquires whether the resource name in the first configuration information is stored in the memory, if so, the distribution end indicates that the distribution end historically issues the configuration information of the resource corresponding to the resource ID, at this time, the distribution end can continue responding to the first configuration request and distribute the first configuration information to the distributed coordination service cluster, so that the distributed coordination service cluster deletes the corresponding configuration information in the disk according to the resource name in the first configuration information, and the distributed coordination service cluster can request the execution end to execute the resource deletion operation aiming at the distributed system according to the first configuration information. Of course, if the resource name in the first configuration information is not stored in the memory, the distributing end determines that the first configuration information does not conform to the rename check rule, and the distributing end may stop responding to the first configuration request.
When the operation type corresponding to the first configuration request is a query operation, the distribution end queries whether the resource name in the first configuration information is stored in the memory, if so, the distribution end indicates that the distribution end historically issues the configuration information of the resource corresponding to the resource name, at this time, the distribution end can continue responding to the first configuration request, distribute the first configuration information to the distributed coordination service cluster, so that the distributed coordination service cluster obtains the configuration information corresponding to the disk according to the resource name in the first configuration information, and returns the configuration information obtained by query to the distribution end. Of course, if the resource name in the first configuration information is not stored in the memory, the distributing end determines that the first configuration information does not conform to the rename check condition, and the distributing end may stop responding to the first configuration request. In the embodiment of the application, in order to reduce the memory consumption, only some important information in the configuration information in the disk is recorded in the memory, and the important information is, for example, a resource name, a resource ID and other key items related to the examination.
The resource ID is used for uniquely identifying the resource, and is the unique identifier allocated by the distributing end for the resource to be created. When the first configuration request issued by the user is a creation request, the distributing end can allocate a resource ID for the resource requested to be created after determining that the configuration information corresponding to the first configuration request is valid, and add the resource ID to the configuration information corresponding to the first configuration request. The distributing end distributes the configuration information added with the resource ID to the distributed coordination service cluster, so that the distributed coordination service cluster stores the configuration information added with the resource ID into a disk.
In practical application, when allocating a resource ID to a resource to be created, the distributing end needs to know which resource IDs have been used to determine that a new resource ID that does not overlap with the used resource ID is allocated to the resource to be created. It will be appreciated that the resource ID to be allocated for the resource ID to be created for the request may be determined faster by the distributor looking up the resource ID stored in memory to determine the resource ID that is not repeated than by the distributor traversing the resource ID in the disk.
Therefore, in some embodiments, before detecting whether the first configuration information meets the service normalization condition, the distributing end may further select, for any piece of configuration information in the disk, a first configuration parameter representing a resource name and a second configuration parameter representing a resource ID from the configuration information when the distributing end is initialized or restarted; and storing the first configuration parameters and the second configuration parameters in a memory in an associated manner.
The first configuration parameter in the memory is used for performing rename checking, and the second configuration parameter in the memory is used for distributing a non-repeated resource ID for the resource which is requested to be created by the distributing end.
In some embodiments, if the first configuration request indicates to create a resource for the distributed system, the distribution end traverses the resource ID in the memory to determine a resource ID allocated for the resource to be created, where the resource ID allocated for the resource to be created is not repeated with the resource ID in the memory; and adding the resource ID allocated for the resource to be created into the first configuration information.
In some embodiments, if the first configuration request indicates to delete the created resource for the distributed system, the distributing end deletes the resource name and the resource ID of the created resource stored in the memory.
For example, if the user requirement is to create a resource for the distributed system, when it is detected that the resource name of the resource to be created issued by the user does not have a rename based on the first configuration parameter in the memory, the resource ID in the memory may be traversed, a non-duplicate resource ID is allocated for the resource to be created, and the resource ID allocated for the resource to be created is added to the first configuration information. Accordingly, the forwarding, by the distributing end, the first configuration request to the distributed coordination service cluster may be: forwarding a first configuration request with an added resource ID allocated for the resource to be created to the distributed coordination service cluster. Therefore, when the distribution end is initialized or restarted, the resource name and the resource ID of any piece of configuration information can be obtained from the disk, and the resource name and the resource ID are associated and stored into the memory.
Of course, if the user requirement is to delete the resource for the distributed system, the distributing end may delete the resource name and the resource ID of the corresponding created resource stored in the memory. For ease of understanding, the description is given in tables 2 and 3. Table 2 is configuration information recorded in the disk. Table 3 is key configuration information recorded in the memory.
Two pieces of configuration information are recorded in table 2, one piece is the configuration information of pool-0; the other is the configuration information of the pool-1. Taking configuration information of the storage pool-0 as an example, the configuration information of the storage pool-0 includes a storage pool name, an id, a disk and volume configuration information of the storage pool-0. It is known from the configuration information of the storage pool-0 that two volumes, volume-0 and volume-1, respectively, are created under the storage pool-0. Wherein the configuration information for volume vol-0 indicates that the name of volume vol-0 is vol-0, the id of volume vol-0 is 0, and the volume capacity is 200. The configuration information for volume vol-1 indicates that the name of volume vol-1 is vol-1, the id of volume vol-1 is 1, and the volume capacity is 300.
TABLE 2
The key configuration information in each piece of configuration information in table 2 is recorded in table 3. Specifically, one of the pieces of key configuration information in Table 3 is the key configuration information of pool-0, and the other piece of key configuration information is the key configuration information of pool-1. Taking the key configuration information of the storage pool-0 as an example, the key configuration information of the storage pool-0 includes the storage pool name, id, and key configuration information of the volume of the storage pool-0. Wherein the critical configuration information for volume vol-0 indicates that volume vol-0 is named vol-0 and that volume vol-0 has an id of 0. The critical configuration information for volume vol-1 indicates that the name of volume vol-1 is vol-1 and the id of volume vol-1 is 1.
TABLE 3 Table 3
In practical application, the distribution end can also detect whether the first configuration information is effective, if so, the distribution end can push a configuration success message to the user; if the first configuration information is detected to be not effective, the distributing end can push a configuration failure message to the user.
In some embodiments, after the distributing end forwards the first configuration request to the distributed coordination service cluster, when a preset time arrives, whether the first configuration information is effective or not may also be determined according to the first configuration request and a configuration result in the disk, where the configuration result is used to instruct the target executing end to configure an execution result of the distributed system based on the configuration information.
The preset time is set according to the actual service requirement, and is, for example, 30 seconds.
The configuration result is used for indicating the target execution end to configure the execution result of the distributed system based on the configuration information.
In the embodiment of the application, the executive end responds to the second configuration request sent by the distributed coordination service cluster and configures the distributed system based on the first configuration information in the disk. In addition, the execution end also sends the configuration result of the configuration distributed system to the distributed coordination service cluster, and the distributed coordination service cluster stores the configuration result into the disk.
In some embodiments, when the preset time arrives, determining whether the first configuration information is valid according to the first configuration request and the configuration result in the disk includes:
when the preset time is reached, if the first configuration request indicates that resources are created for the distributed system or the created resources are modified, searching whether a disk comprises a configuration result corresponding to the first configuration information; if the disk comprises a configuration result corresponding to the first configuration information, determining that the first configuration information is effective; if the disk does not comprise the configuration result corresponding to the first configuration information, determining that the first configuration information is invalid; or,
when the preset time arrives, if the configuration request indicates that the created resource for the distributed system is deleted, searching whether a disk comprises a configuration result corresponding to the first configuration information or not; if the disk does not comprise the configuration result corresponding to the first configuration information, determining that the first configuration information is effective; if the disk comprises a configuration result corresponding to the first configuration information, determining that the first configuration information is invalid.
In some embodiments, after the distributing end determines whether the first configuration information is valid, if the first configuration information is invalid, the distributing end may further send a rollback request to the distributed coordination service cluster, so that the distributed coordination service cluster performs a rollback operation on the first configuration information in the disk.
Specifically, if the operation type corresponding to the first configuration request is a creation operation, the distributed coordination service cluster deletes the first configuration information in the disk based on the rollback request issued by the distributing end.
If the operation type corresponding to the first configuration request is modification operation, the distributed coordination service cluster rolls back the modified configuration information in the disk to the configuration information before modification based on the rollback request issued by the distributing end.
If the operation type corresponding to the first configuration request is a deleting operation, the distributed coordination service cluster restores the deleted configuration information in the disk based on the rollback request issued by the distributing end.
In some embodiments, after the distributing end obtains the first configuration request for the distributed system triggered by the user, a lock may also be set for a resource corresponding to the first configuration information;
of course, when the preset time arrives, after determining whether the first configuration information is effective according to the first configuration request and the configuration result in the disk, the distributing end may also release the lock set for the resource corresponding to the first configuration information.
It can be understood that the lock can protect the resource corresponding to the first configuration information, so that the executing end and the distributing end can be prevented from operating the resource at the same time. The relevant description of lock technology is more detailed in the prior art.
Fig. 4 is a flowchart of another embodiment of the configuration method provided by the present application, where an execution body of the method is an execution end. Referring to fig. 4, the configuration method may include the steps of:
401. the target execution end obtains a second configuration request sent by the distributed coordination service cluster.
When the distribution end determines that the first configuration information in the first configuration request is valid, the distribution end sends the first configuration request to the distributed coordination service cluster; the distributed coordination service cluster responds to the first configuration request forwarded by the distributing end and sends a second configuration request to the target executing end.
The target execution end is selected from the plurality of execution ends by the distributed coordination service cluster, and if the distributed coordination service cluster monitors that the target execution end has a fault, the distributed coordination service can also select a new target execution end from the plurality of execution ends.
402. And acquiring configuration information and configuration results in the disk.
403. And comparing the configuration information in the disk with the configuration result to determine first configuration information corresponding to the first configuration request.
404. The distributed system is configured based on the first configuration information.
Specifically, the target execution end responds to the second configuration request, requests the distributed coordination service cluster to send configuration information and configuration results in the disk, and compares the configuration information and the configuration results in the disk to determine first configuration information corresponding to the first configuration request.
The configuration result indicates an execution result of the target execution end for configuring the distributed system based on the configuration information. When the target execution end obtains one piece of configuration information from the disk, the distributed system is configured based on the configuration information, the configuration result of the distributed system configured by the configuration information is obtained, and the configuration result is stored in the disk. It can be understood that if the configuration information in the disk is not acquired by the target execution end and the corresponding configuration operation is executed, the configuration result of the configuration information will not exist in the disk. If the configuration information in the disk is acquired by the target execution end and corresponding configuration operation is executed, the configuration result of the configuration information exists in the disk. In addition, the configuration result can indicate which piece of configuration information is executed by the target execution end, so that the newly-added configuration information which is not executed in the disk can be determined by comparing the configuration information in the disk with the configuration result.
The target execution end may specifically relate to the following cases when executing the configuration operation based on the first configuration request:
if the operation type corresponding to the first configuration request is a creation operation, the first configuration information in the first configuration request is newly added in the disk, and at this time, the target execution end creates corresponding resources for the distributed system based on the first configuration information.
If the operation type corresponding to the first configuration request is a modification operation, the configuration information modified by the first configuration information is stored in the disk, and at this time, the target execution end modifies the corresponding resource for the distributed system based on the first configuration information.
If the operation type corresponding to the first configuration request is a deleting operation, deleting the created configuration information in the disk, and deleting the resource corresponding to the created configuration information for the distributed system by the target execution end.
In some embodiments, in order to facilitate monitoring the configuration result, the target executing end may further save the configuration result corresponding to the first configuration information to the disk after configuring the distributed system based on the first configuration information.
In some embodiments, before the target execution end configures the distributed system based on the first configuration information, a lock may also be set for a resource corresponding to the first configuration information.
Of course, after the target execution end configures the distributed system based on the first configuration information, the lock set for the resource corresponding to the first configuration information may also be released.
It can be understood that the lock can protect the resource corresponding to the first configuration information, so that the executing end and the distributing end can be prevented from operating the resource at the same time.
In the embodiment of the application, the checking step of the validity of the configuration information is adjusted from the execution of the target execution end to the execution of the distribution end, thereby improving the configuration efficiency of the distributed system configured by the target execution end.
Fig. 5 shows a schematic structural diagram of an embodiment of the configuration device provided by the present application. Referring to fig. 5, the configuration apparatus may include:
an obtaining module 501, configured to obtain a first configuration request including first configuration information, which is triggered by a user, for a distributed system;
a processing module 502, configured to detect whether the first configuration information is valid; if the first configuration information is valid, forwarding a first configuration request to the distributed coordination service cluster so that the distributed coordination service cluster updates the configuration information in the disk based on the first configuration information, and sending a second configuration request to the target execution end, wherein the second configuration request is used for indicating the target execution end to configure the distributed system by using the first configuration information in the disk.
Optionally, when the processing module 502 detects whether the first configuration information is valid, the processing module is specifically configured to:
detecting whether the first configuration information accords with the data normalization condition;
if yes, determining that the first configuration information is valid;
wherein the data normalization conditions include at least one or more of the following conditions: data format conditions, data type conditions and value range conditions;
The processing module 502 detects whether the first configuration information meets the data normalization condition specifically is:
for any configuration parameter in the first configuration information, detecting whether the data format of the parameter value of the configuration parameter is a preset data format or not; if yes, determining that the configuration parameters meet the data format conditions; or,
for any configuration parameter, detecting whether the data type of the parameter value of the configuration parameter is a preset type; if yes, determining that the configuration parameters meet the data type conditions; or,
for any configuration parameter, detecting whether the value range of the parameter value of the configuration parameter is a preset value range or not; if yes, determining that the configuration parameters meet the value range conditions.
Optionally, after detecting whether the first configuration information meets the data normalization condition, the processing module 502 is further configured to:
if the first configuration information accords with the data normalization condition, detecting whether the first configuration information accords with the service normalization condition;
if yes, the first configuration information is determined to be valid.
Optionally, before detecting whether the first configuration information meets the service normalization condition, the processing module 502 is further configured to: when the distribution end is initialized or restarted, aiming at any piece of configuration information in the magnetic disk, a first configuration parameter representing a resource name is screened out from the configuration information;
Storing the first configuration parameters into a memory;
the processing module 502 detects whether the first configuration information meets the service normalization condition specifically:
and detecting whether the first configuration information accords with the rename checking condition according to the first configuration parameters in the memory.
Optionally, when the processing module 502 detects whether the first configuration information meets the rename check condition, the processing module is specifically configured to:
if the first configuration request indicates that resources are created for the distributed system, searching whether a first configuration parameter matched with the resource name in the first configuration information exists in the memory or not;
if the first configuration parameters matched with the resource names in the first configuration information do not exist in the memory, determining that the first configuration information accords with the rename checking conditions;
if the first configuration parameters matched with the resource names in the first configuration information exist in the memory, determining that the first configuration information does not accord with the duplicate name checking condition;
if the first configuration request indicates that the created resource is deleted for the distributed system or the first configuration request indicates that the created resource is modified for the distributed system, if a first configuration parameter matched with the resource name in the first configuration information exists in the memory, determining that the first configuration information accords with the rename checking condition;
If the first configuration parameters matched with the resource names in the first configuration information do not exist in the memory, determining that the first configuration information does not accord with the rename checking condition.
Optionally, before detecting whether the first configuration information meets the service normalization condition, the processing module 502 is further configured to:
screening a second configuration parameter representing the resource ID from the configuration information aiming at any piece of configuration information in the disk;
the processing module 502 stores the first configuration parameters into the memory specifically:
and storing the first configuration parameters and the second configuration parameters in a memory in an associated manner.
Optionally, the processing module 502 is further configured to:
if the first configuration request indicates to create resources for the distributed system, traversing the resource IDs in the memory to determine the resource IDs allocated for the resources to be created, wherein the resource IDs allocated for the resources to be created are not repeated with the resource IDs in the memory;
adding the resource ID allocated for the resource to be created into the first configuration information;
if the first configuration request indicates to delete the created resource for the distributed system, deleting the resource name and the resource ID of the created resource stored in the memory.
Optionally, the processing module 502 is further configured to, after forwarding the first configuration request to the distributed coordination service cluster:
When the preset time is reached, determining whether the first configuration information is effective or not according to the first configuration request and a configuration result in the disk, wherein the configuration result is used for indicating an execution result of the target execution end for configuring the distributed system based on the configuration information.
Optionally, when the processing module 502 determines whether the first configuration information is valid, the processing module is specifically configured to:
when the preset time is reached, if the first configuration request indicates that resources are created for the distributed system or the created resources are modified, searching whether a disk comprises a configuration result corresponding to the first configuration information;
if the disk comprises a configuration result corresponding to the first configuration information, determining that the first configuration information is effective;
if the disk does not comprise the configuration result corresponding to the first configuration information, determining that the first configuration information is invalid; or,
when the preset time arrives, if the configuration request indicates that the created resource for the distributed system is deleted, searching whether a disk comprises a configuration result corresponding to the first configuration information or not;
if the disk does not comprise the configuration result corresponding to the first configuration information, determining that the first configuration information is effective;
if the disk comprises a configuration result corresponding to the first configuration information, determining that the first configuration information is invalid.
Optionally, after the processing module 502 determines whether the first configuration information is valid, the processing module is further configured to:
and if the first configuration information is invalid, sending a back-off request to the distributed coordination service cluster so that the distributed coordination service cluster carries out back-off operation on the first configuration information in the disk.
Optionally, after the processing module 502 obtains the first configuration request for the distributed system triggered by the user, the processing module is further configured to:
setting a lock for a resource corresponding to the first configuration information;
when the preset time arrives, after determining whether the first configuration information is valid according to the first configuration request and the configuration result in the disk, the processing module 502 is further configured to:
and releasing the lock set for the resource corresponding to the first configuration information.
The configuration device of fig. 5 may perform the configuration method of the embodiment shown in fig. 2 or fig. 3, and its implementation principle and technical effects will not be described again. The specific manner in which the respective modules and units perform the operations in the configuration apparatus in the above embodiments has been described in detail in the embodiments related to the method, and will not be described in detail here.
Fig. 6 shows a schematic structural diagram of another embodiment of the configuration device provided by the present application. Referring to fig. 6, the configuration apparatus may include:
The obtaining module 601 is configured to obtain a second configuration request sent by the distributed coordination service cluster, where the second configuration request is sent by the distributed coordination service cluster in response to the first configuration request forwarded by the distributing end, and when determining that the first configuration information in the first configuration request is valid, the distributing end sends the first configuration request to the distributed coordination service cluster.
The obtaining module 601 is further configured to obtain configuration information and a configuration result in a disk;
the processing module 602 is configured to compare the configuration information in the disk with the configuration result to determine first configuration information corresponding to the first configuration request; the distributed system is configured based on the first configuration information.
In some embodiments, the processing module 602, after configuring the distributed system based on the first configuration information, is further to:
and storing the configuration result corresponding to the first configuration information into a disk.
In some embodiments, before the processing module 602 configures the distributed system based on the first configuration information, it is further configured to:
and setting a lock for the resource corresponding to the first configuration information.
In some embodiments, after the processing module 602 configures the distributed system based on the first configuration information, it is further configured to: and releasing the lock set for the resource corresponding to the first configuration information.
The configuration device of fig. 6 may perform the configuration method of the embodiment shown in fig. 4, and its implementation principle and technical effects are not repeated. The specific manner in which the respective modules and units perform the operations in the configuration apparatus in the above embodiments has been described in detail in the embodiments related to the method, and will not be described in detail here.
In one possible design, the configuration apparatus of the embodiments shown in fig. 5 or 6 may be implemented as a computing device, which may include a storage component 701 and a processing component 702, as shown in fig. 7;
the storage component 701 stores one or more computer instructions, wherein the one or more computer instructions are for execution by the processing component call.
The processing component 702 is configured to:
acquiring a first configuration request which is triggered by a user and aims at a distributed system and comprises first configuration information;
detecting whether the first configuration information is valid;
if the first configuration information is valid, forwarding a first configuration request to the distributed coordination service cluster so that the distributed coordination service cluster updates the configuration information in the disk based on the first configuration information, and sending a second configuration request to the target execution end, wherein the second configuration request is used for indicating the target execution end to configure the distributed system by using the first configuration information in the disk;
Alternatively, the processing component 701 is configured to:
and acquiring a second configuration request sent by the distributed coordination service cluster, wherein the second configuration request is sent by the distributed coordination service cluster in response to the first configuration request forwarded by the distributing end, and the distributing end sends the first configuration request to the distributed coordination service cluster when determining that the first configuration information in the first configuration request is valid.
Acquiring configuration information and configuration results in a disk;
comparing the configuration information in the disk with the configuration result to determine first configuration information corresponding to the first configuration request;
the distributed system is configured based on the first configuration information.
Wherein the processing component 702 may include one or more processors to execute computer instructions to perform all or part of the steps in the methods described above. Of course, the processing component may also be implemented as one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic elements for executing the methods described above.
The storage component 701 is configured to store various types of data to support operations at the terminal. The memory component may be implemented by any type or combination of volatile or nonvolatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
In addition, the computing device may include a display component 703, which display component 703 may be an electronic light Emitting (EL) element, a liquid crystal display or a micro display having a similar structure, or a retina-directly displayable or similar laser-scanned display.
Of course, the computing device may necessarily include other components, such as input/output interfaces, communication components, and the like.
The input/output interface provides an interface between the processing component and a peripheral interface module, which may be an output device, an input device, etc.
The communication component is configured to facilitate wired or wireless communication between the computing device and other devices, and the like.
The computing device may be a physical device or an elastic computing host provided by the cloud computing platform, and at this time, the computing device may be a cloud server, and the processing component, the storage component, and the like may be a base server resource rented or purchased from the cloud computing platform.
The embodiment of the application also provides a computer readable storage medium, which stores a computer program, and the computer program can implement the configuration method of the embodiment shown in fig. 2 or fig. 3 when executed by a computer.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein.
The apparatus embodiments described above are merely illustrative, wherein elements illustrated as separate elements may or may not be physically separate, and elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on such understanding, the foregoing technical solutions may be embodied essentially or in part in the form of a software product, which may be stored in a computer-readable storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform the various embodiments or methods of some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and are not limiting; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims (18)

1. A configuration method, applied to a distributing end, comprising:
acquiring a first configuration request which is triggered by a user and aims at a distributed system and comprises first configuration information, wherein the first configuration information is used for indicating the configuration of resources of corresponding services in a distributed coordination service cluster;
detecting whether the first configuration information is valid;
and if the first configuration information is valid, forwarding the first configuration request to a distributed coordination service cluster so that the distributed coordination service cluster updates the configuration information in the disk based on the first configuration information, and sending a second configuration request to a target execution end, wherein the second configuration request is used for indicating the target execution end to configure the distributed system by using the first configuration information in the disk.
2. The method of claim 1, wherein detecting whether the first configuration information is valid comprises:
detecting whether the first configuration information accords with a data normalization condition;
if yes, determining that the first configuration information is valid;
wherein the data normalization conditions include at least one or more of the following conditions: data format conditions, data type conditions and value range conditions;
detecting whether the first configuration information meets a data normalization condition comprises:
for any configuration parameter in the first configuration information, detecting whether the data format of the parameter value of the configuration parameter is a preset data format or not; if yes, determining that the configuration parameters meet the data format conditions; or,
for any configuration parameter, detecting whether the data type of the parameter value of the configuration parameter is a preset type; if yes, determining that the configuration parameters meet the data type conditions; or,
for any configuration parameter, detecting whether the value range of the parameter value of the configuration parameter is a preset value range or not; if yes, determining that the configuration parameters meet the value range conditions.
3. The method of claim 1, wherein after detecting whether the first configuration information meets a data normalization condition, the method further comprises:
If the first configuration information accords with the data normalization condition, detecting whether the first configuration information accords with the service normalization condition;
if yes, determining that the first configuration information is valid.
4. A method according to claim 3, wherein prior to detecting whether the first configuration information meets a traffic normalization condition, the method further comprises:
when the distribution terminal is initialized or restarted, aiming at any piece of configuration information in the magnetic disk, a first configuration parameter representing a resource name is screened out from the configuration information;
storing the first configuration parameters into a memory;
the detecting whether the first configuration information meets the service normalization condition comprises:
and detecting whether the first configuration information accords with a rename checking condition according to the first configuration parameter in the memory.
5. The method of claim 4, wherein detecting whether the first configuration information meets a rename check condition according to a first configuration parameter in the memory comprises:
if the first configuration request indicates that the resource is created for the distributed system, searching whether a first configuration parameter matched with the resource name in the first configuration information exists in the memory or not;
If the memory does not have the first configuration parameters matched with the resource names in the first configuration information, determining that the first configuration information accords with the rename checking conditions;
if a first configuration parameter matched with the resource name in the first configuration information exists in the memory, determining that the first configuration information does not accord with the rename checking condition;
if the first configuration request indicates to delete the created resource for the distributed system or the first configuration request indicates to modify the created resource for the distributed system, if a first configuration parameter matched with the resource name in the first configuration information exists in the memory, determining that the first configuration information accords with the rename checking condition;
and if the first configuration parameters matched with the resource names in the first configuration information do not exist in the memory, determining that the first configuration information does not accord with the rename checking condition.
6. The method of claim 4, wherein prior to detecting whether the first configuration information meets a traffic normalization condition, the method further comprises:
screening out a second configuration parameter representing the resource ID from the configuration information aiming at any piece of configuration information in the magnetic disk;
Storing the first configuration parameter into a memory includes:
and storing the first configuration parameters and the second configuration parameters in a memory in an associated manner.
7. The method as recited in claim 6, further comprising:
if the first configuration request indicates that the resource is created for the distributed system, traversing the resource ID in the memory to determine the resource ID allocated for the resource to be created, wherein the resource ID allocated for the resource to be created is not repeated with the resource ID in the memory;
adding a resource ID allocated for the resource to be created to the first configuration information;
and if the first configuration request indicates to delete the created resource for the distributed system, deleting the resource name and the resource ID of the created resource stored in the memory.
8. The method according to any of claims 1 to 7, wherein after forwarding the first configuration request to a distributed coordination service cluster, the method further comprises:
and when the preset time is reached, determining whether the first configuration information is effective or not according to the first configuration request and a configuration result in the disk, wherein the configuration result is used for indicating a target execution end to configure an execution result of the distributed system based on the configuration information.
9. The method of claim 8, wherein determining whether the first configuration information is valid based on the first configuration request and a configuration result in the disk when a preset time is reached comprises:
when the preset time is reached, if the first configuration request indicates that resources are created for the distributed system or the created resources are modified, searching whether a configuration result corresponding to the first configuration information is included in the disk;
if the disk comprises a configuration result corresponding to the first configuration information, determining that the first configuration information is effective;
if the disk does not comprise the configuration result corresponding to the first configuration information, determining that the first configuration information is invalid; or,
when the preset time arrives, if the configuration request indicates that the created resource for the distributed system is deleted, searching whether the disk comprises a configuration result corresponding to the first configuration information or not;
if the disk does not comprise the configuration result corresponding to the first configuration information, determining that the first configuration information is effective;
if the disk comprises a configuration result corresponding to the first configuration information, determining that the first configuration information is invalid.
10. The method of claim 9, wherein after determining whether the first configuration information is valid, the method further comprises:
and if the first configuration information fails, sending a rollback request to the distributed coordination service cluster so that the distributed coordination service cluster can rollback the first configuration information in the disk.
11. The method of claim 9, wherein after the distributing side obtains the first configuration request for the distributed system triggered by the user, the method further comprises:
setting a lock for the resource corresponding to the first configuration information;
when the preset time arrives, determining whether the first configuration information is effective or not according to the first configuration request and a configuration result in the disk, wherein the method further comprises the following steps:
and releasing the lock set for the resource corresponding to the first configuration information.
12. The method of claim 1, wherein the distributed coordination service cluster determines, from a plurality of service servers, the service server for which the corresponding service is in a normal state as the distribution terminal.
13. A configuration system, comprising: a distributing end, a distributed coordination service cluster and a plurality of executing ends;
The distribution terminal is used for acquiring a first configuration request which is triggered by a user and aims at the distributed system, and the first configuration request comprises first configuration information; detecting whether the first configuration information is valid; if the first configuration information is valid, forwarding the first configuration request to a distributed coordination service cluster;
the distributed coordination service cluster is used for responding to the first configuration request, updating configuration information in a disk and sending a second configuration request to a target execution end in the plurality of execution ends;
the target execution end is used for responding to the second configuration request and acquiring the first configuration information in the disk to configure the distributed system.
14. The system of claim 13, wherein the distributed coordination service cluster is further configured to detect whether the distribution peer is abnormal, and if so, reselect a new distribution peer.
15. The system of claim 13, wherein the distributed coordination service cluster is further configured to reselect a new target execution end in a normal state from a plurality of execution ends when the target execution end fails.
16. A configuration device, comprising:
The acquisition module is used for acquiring a first configuration request which is triggered by a user and aims at the distributed system and comprises first configuration information;
the processing module is used for detecting whether the first configuration information is valid or not; and if the first configuration information is valid, forwarding the first configuration request to a distributed coordination service cluster so that the distributed coordination service cluster updates the configuration information in the disk based on the first configuration information, and sending a second configuration request to a target execution end, wherein the second configuration request is used for indicating the target execution end to configure the distributed system by using the first configuration information in the disk.
17. A computing device comprising a processing component and a storage component;
the storage component stores one or more computer instructions; the one or more computer instructions are to be invoked for execution by the processing component;
the processing assembly is configured to:
acquiring a first configuration request which is triggered by a user and aims at a distributed system and comprises first configuration information;
detecting whether the first configuration information is valid;
and if the first configuration information is valid, forwarding the first configuration request to a distributed coordination service cluster so that the distributed coordination service cluster updates the configuration information in the disk based on the first configuration information, and sending a second configuration request to a target execution end, wherein the second configuration request is used for indicating the target execution end to configure the distributed system by using the first configuration information in the disk.
18. A computer storage medium, characterized in that a computer program is stored, which, when executed by a computer, implements the configuration method according to any one of claims 1 to 12.
CN202110785903.5A 2021-07-12 2021-07-12 Configuration method, device, system, computing equipment and storage medium Active CN113726546B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110785903.5A CN113726546B (en) 2021-07-12 2021-07-12 Configuration method, device, system, computing equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110785903.5A CN113726546B (en) 2021-07-12 2021-07-12 Configuration method, device, system, computing equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113726546A CN113726546A (en) 2021-11-30
CN113726546B true CN113726546B (en) 2023-11-21

Family

ID=78673177

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110785903.5A Active CN113726546B (en) 2021-07-12 2021-07-12 Configuration method, device, system, computing equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113726546B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115208754B (en) * 2022-06-28 2024-02-23 深信服科技股份有限公司 Configuration issuing method, device, computer equipment and storage medium
CN116719481B (en) * 2023-08-08 2024-01-26 腾讯科技(深圳)有限公司 Configuration data processing method and device and related equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9171019B1 (en) * 2013-02-19 2015-10-27 Amazon Technologies, Inc. Distributed lock service with external lock information database
CN111026723A (en) * 2019-11-21 2020-04-17 望海康信(北京)科技股份公司 Big data cluster management control method and device, computer equipment and storage medium
CN112835524A (en) * 2021-02-04 2021-05-25 中国工商银行股份有限公司 Storage resource allocation method, storage resource controller and scheduling system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104283906B (en) * 2013-07-02 2018-06-19 华为技术有限公司 Distributed memory system, clustered node and its section management method
US11470146B2 (en) * 2018-08-25 2022-10-11 Panzura, Llc Managing a cloud-based distributed computing environment using a distributed database

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9171019B1 (en) * 2013-02-19 2015-10-27 Amazon Technologies, Inc. Distributed lock service with external lock information database
CN111026723A (en) * 2019-11-21 2020-04-17 望海康信(北京)科技股份公司 Big data cluster management control method and device, computer equipment and storage medium
CN112835524A (en) * 2021-02-04 2021-05-25 中国工商银行股份有限公司 Storage resource allocation method, storage resource controller and scheduling system

Also Published As

Publication number Publication date
CN113726546A (en) 2021-11-30

Similar Documents

Publication Publication Date Title
US10785140B2 (en) System and method for identifying components of a computer network based on component connections
US9971823B2 (en) Dynamic replica failure detection and healing
US8954391B2 (en) System and method for supporting transient partition consistency in a distributed data grid
US20190220274A1 (en) Systems and methods for tracking configuration file changes
TWI520062B (en) Placing objects on hosts using hard and soft constraints
CN113726546B (en) Configuration method, device, system, computing equipment and storage medium
JP7270755B2 (en) Metadata routing in distributed systems
CN110071978B (en) Cluster management method and device
CN112532675A (en) Method, device and medium for establishing network edge computing system
US10447553B2 (en) Systems and methods for service-aware mapping of a system infrastructure
US9390156B2 (en) Distributed directory environment using clustered LDAP servers
US11025507B2 (en) System and method of associating metadata with computing resources across multiple providers
US20160036665A1 (en) Data verification based upgrades in time series system
CN110543512B (en) Information synchronization method, device and system
US10726140B2 (en) System and method for configuration management database governance
CN103488526A (en) System and method for locking business resource in distributed system
WO2016074167A1 (en) Lock server malfunction processing method and system thereof in distribution system
CA2960982A1 (en) Method for processing acquire lock request and server
US20200186432A1 (en) System and method for automating the discovery process
US20200334080A1 (en) Systems and methods for recomputing services
KR102665749B1 (en) Method and apparatus for ensuring continued device operational reliability in cloud-degraded mode
CN110611688B (en) Method, electronic device and computer program product for searching nodes
US11157454B2 (en) Event-based synchronization in a file sharing environment
JP6076882B2 (en) Information processing system, management device, and key assignment program
US20240022627A1 (en) Domain name system based global server load balancing service

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
GR01 Patent grant
GR01 Patent grant