Network configuration distribution system, method, device, electronic device and storage medium
By setting up control clusters, configuring data storage clusters and configuring channel service clusters in the public cloud, the problems of complex configuration of server equipment and cumbersome operation and maintenance in the public cloud are solved, and the secure storage and rapid issuance of data is achieved, and the system efficiency is improved and adaptability.
Patent Information
- Application Number
- CN202211422135.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-14
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2042-11-14
AI Technical Summary
The configuration of server devices in the public cloud is complex and cumbersome to operate and maintain, resulting in loss of configuration data and inefficient efficiency. The existing technologies such as Kafka and Etcd cannot meet the data storage and issuance requirements in large-scale computing node scenarios.
Provide a network configuration issuance system, including controlling clusters, configuring data storage clusters and configuring channel service clusters, configuring data storage and cache incrementally to ensure data security and reliability, and to fill large-scale computing nodes through horizontal expansion. need.
It improves the security and reliability of configuration data, improves the efficiency of configuration issuance, ensures that computing nodes can quickly obtain the required configuration data in public cloud scenarios, and reduces the system's data transmission cost.
Smart Images

Figure CN115766455B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a network configuration delivery system, method, device, electronic device and storage medium. Background Art
[0002] With the development of science and technology, more and more individual users and enterprise users need to use server equipment. However, the installation, use and maintenance of server equipment require professionals to perform, which makes the deployment of server equipment more complicated, the operation and maintenance more cumbersome, and requires time and personnel costs. In order to solve the above problems, public cloud applications are born.
[0003] Among them, public cloud refers to cloud services provided by third-party providers to users through the public Internet. Users can access the cloud through the Internet and enjoy various services, including but not limited to computing, storage, and network. Therefore, it is particularly important to propose a configuration data distribution system for public cloud. Summary of the invention
[0004] In view of this, the present disclosure at least provides a network configuration delivery system, method, device, electronic device and storage medium.
[0005] In a first aspect, the present disclosure provides a network configuration delivery system, including:
[0006] A control cluster, configured to receive incremental configuration data for a virtual switch on a computing node, send the incremental configuration data and a channel parameter generated for the incremental configuration data to a configuration data storage cluster for associated storage, and send the incremental configuration data and the channel parameter generated for the incremental configuration data to a configuration channel service cluster for caching;
[0007] The configuration channel service cluster is used to receive the target channel parameters sent by the computing node cluster; in response to receiving the target channel parameters, obtain the current configuration data matching the target channel parameters from the cached configuration data; when the current configuration data is obtained from the cached configuration data, send the current configuration data to the computing node cluster; when the current configuration data is not obtained from the cached configuration data, obtain the current configuration data from the configuration data storage cluster and cache the current configuration data;
[0008] The computing node cluster is used to periodically send target channel parameters to the configuration channel service cluster and receive the current configuration data; and configure virtual network resources on the virtual switch based on the current configuration data.
[0009] In a possible implementation, the target channel parameter includes a channel name and a channel version number of a target configuration channel, and the configuration channel service cluster, in response to receiving the target channel parameter, obtains current configuration data matching the target channel parameter from cached configuration data, for:
[0010] According to the channel name, obtaining a cache version number of the target configuration channel from the cached configuration data;
[0011] When the cache version number is greater than the channel version number, determining a version number range based on the channel version number and a preset number;
[0012] Acquire configuration data matching the version number range from the cache module;
[0013] When configuration data matching the version number range is successfully acquired, the acquired configuration data is used as current configuration data.
[0014] In a possible implementation manner, the configuration channel service cluster is further used to: when configuration data matching the version number range is not successfully obtained from the cached configuration data, obtain the minimum version number of the target configuration channel stored in the incremental configuration storage module in the configuration data storage cluster;
[0015] Determine whether the channel version number is less than the minimum version number;
[0016] If yes, then based on the target channel parameters, obtaining the full configuration data corresponding to the target configuration channel from the cached configuration data;
[0017] If the full configuration data is successfully obtained, the full configuration data is used as the current configuration data;
[0018] If the full configuration data cannot be obtained, the full configuration data corresponding to the target configuration channel is obtained from the full configuration storage module in the configuration data storage cluster, and the full configuration data is cached.
[0019] In a possible implementation manner, the configuration channel service cluster is further used to: when the channel version number is greater than or equal to the minimum version number, and / or when the cache version number is less than the channel version number, perform the following process:
[0020] Obtaining the maximum version number corresponding to the target configuration channel in the cached configuration data and the maximum version number corresponding to the target configuration channel in the incremental configuration storage module;
[0021] When the maximum version number of the cache module is less than the maximum version number of the incremental configuration storage module, the incremental configuration data corresponding to the target configuration channel in the incremental configuration storage module is acquired and cached.
[0022] In a possible implementation, the configuration data storage cluster includes an incremental configuration storage module and a full configuration storage module; the control cluster is further configured to receive full configuration data for a virtual switch on a computing node, and send the full configuration data to the configuration data storage cluster;
[0023] The configuration data storage cluster is used to store the full configuration data in the full configuration storage module; store the incremental configuration data in the incremental configuration storage module, and use the incremental configuration data to update the full configuration data stored in the full configuration storage module.
[0024] In a possible implementation, the control cluster includes at least one private network controller; each private network controller is provided with a private network agent software development kit;
[0025] The control cluster, when sending the incremental configuration data and the channel parameters generated for the incremental configuration data to the configuration data storage cluster for associated storage, and sending the incremental configuration data and the channel parameters generated for the incremental configuration data to the configuration channel service cluster for caching, is used to:
[0026] Using the private network proxy software development kit, placing the incremental configuration data into a configuration channel that matches the incremental configuration data, and using the private network proxy software development kit to update a channel version number of the configuration channel, wherein the configuration channel is associated with a channel version number, and each time an incremental configuration data is added to the configuration channel, the channel version number increases by a preset value; and
[0027] The incremental configuration data and the updated channel version number are sent to the configuration data storage cluster through the configuration channel for associated storage, and the incremental configuration data and the updated channel version number are sent to the configuration channel service cluster through the configuration channel for over-caching.
[0028] In a possible implementation, the configuration channel includes the following types: a first configuration channel storing a private network identification number that the computing node server is concerned about;
[0029] A second configuration channel for storing single-node events under each private network that the computing node server is concerned about;
[0030] The third configuration channel for storing global events under each private network;
[0031] A fourth configuration channel for storing target events that are of interest to at least one computing node in each private network.
[0032] In a possible implementation, the configuration channel service cluster includes at least one configuration channel server, and each configuration channel server is provided with a private network proxy service module and a cache module;
[0033] The control cluster is used to send the incremental configuration data to each configuration channel server in the configuration channel service cluster;
[0034] The private network proxy service module in each of the configuration channel servers is used to receive the incremental configuration data and cache the incremental configuration data to the cache module of the configuration channel server.
[0035] In a possible implementation, the computing node cluster includes at least one computing node server, each computing node server includes a node controller, and the node controller includes a private network proxy client module;
[0036] The private network proxy client module is used to: determine the target channel parameters according to the channel name and channel version number of the stored configuration channel; send the target channel parameters to the configuration channel service cluster; and after receiving the current configuration data, verify whether the channel version number associated with the current configuration data matches the target channel parameters, if so, store the channel version number, and configure virtual network resources on the virtual switch based on the current configuration data.
[0037] The effects of the following methods, devices, electronic devices, etc. are described in the description of the above methods and will not be repeated here.
[0038] In a second aspect, the present disclosure provides a network configuration delivery method, which is applied to configure a channel service cluster, including:
[0039] Receive and cache the incremental configuration data sent by the control cluster and the channel parameters generated for the incremental configuration data;
[0040] Receive target channel parameters periodically sent by the computing node cluster;
[0041] In response to receiving the target channel parameter, acquiring current configuration data matching the target channel parameter from cached configuration data;
[0042] When the current configuration data is obtained from the cached configuration data, the current configuration data is sent to the computing node cluster; when the current configuration data is not obtained from the cached configuration data, the current configuration data is obtained from the configuration data storage cluster and cached.
[0043] In a third aspect, the present disclosure provides a network configuration delivery device, including:
[0044] A first receiving module, configured to receive and cache the incremental configuration data sent by the control cluster and the channel parameters generated for the incremental configuration data;
[0045] The second receiving module is used to receive the target channel parameters periodically sent by the computing node cluster;
[0046] An acquisition module is used to, in response to receiving the target channel parameters, acquire current configuration data matching the target channel parameters from the cached configuration data; when the current configuration data is acquired from the cached configuration data, send the current configuration data to the computing node cluster; when the current configuration data is not acquired from the cached configuration data, acquire the current configuration data from the configuration data storage cluster and cache the current configuration data.
[0047] In a fourth aspect, the present disclosure provides an electronic device, comprising: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, when the electronic device is running, the processor and the memory communicate through the bus, and when the machine-readable instructions are executed by the processor, the steps of the network configuration sending method described in the second aspect or any one of the embodiments are performed.
[0048] In a fifth aspect, the present disclosure provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the network configuration delivery method as described in the second aspect or any one of the embodiments are executed.
[0049] The disclosed embodiments provide a network configuration delivery system, method, device, electronic device and storage medium. The system is applied in a public cloud. The system includes a control cluster, a configuration data storage cluster, a configuration channel service cluster and a computing node cluster. By setting up a configuration data storage cluster to store incremental configuration data, the loss of configuration data is alleviated, the security and reliability of the system are improved, and for large-scale computing node clusters in public cloud scenarios, the configuration data storage cluster can meet the data storage requirements. A configuration channel service cluster is set up to cache the incremental configuration data so that the computing node cluster can pull data from the cached configuration data more quickly, thereby improving the efficiency of configuration delivery; and for large-scale computing node clusters in public cloud scenarios, since there is no need to synchronize data between the various cache modules in the configuration channel service cluster, the configuration channel service cluster can meet the pull requirements of large-scale computing nodes by horizontally expanding services, thereby improving the degree of adaptability in public cloud scenarios.
[0050] At the same time, when the incremental configuration data required by the computing node cluster exists in the cache module, the computing node cluster can quickly obtain the required incremental configuration data; when the incremental configuration data required by the computing node cluster does not exist in the cache module, the required incremental configuration data can be obtained from the configuration data storage cluster, thereby improving the data transmission efficiency of the system while ensuring the security of the system.
[0051] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following is a brief introduction to the drawings required for use in the embodiments. The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used together with the specification to illustrate the technical solutions of the present disclosure. It should be understood that the following drawings only illustrate certain embodiments of the present disclosure and should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can also be obtained based on these drawings without creative work.
[0053] Figure 1 A schematic diagram of the architecture of a network configuration delivery system provided by an embodiment of the present disclosure is shown;
[0054] Figure 2 A schematic diagram showing the architecture of another network configuration delivery system provided by an embodiment of the present disclosure;
[0055] Figure 3A channel relationship diagram of various configuration channels in a network configuration delivery system provided by an embodiment of the present disclosure is shown;
[0056] Figure 4 A flowchart of accessing a private network controller in a network configuration delivery system provided by an embodiment of the present disclosure is shown;
[0057] Figure 5 A schematic diagram of the structure of a private network proxy client module in a network configuration delivery system provided by an embodiment of the present disclosure is shown;
[0058] Figure 6 A flowchart of configuring a channel service cluster in a network configuration delivery system provided by an embodiment of the present disclosure is shown;
[0059] Figure 7 A schematic diagram showing a flow chart of a method for issuing a network configuration provided by an embodiment of the present disclosure;
[0060] Figure 8 A schematic diagram of the architecture of a network configuration delivery device provided by an embodiment of the present disclosure is shown;
[0061] Fig. 9 A schematic structural diagram of an electronic device provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0062] In order to make the purpose, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The components of the embodiments of the present disclosure generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the present disclosure for protection, but merely represents the selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present disclosure.
[0063] Public cloud refers to cloud services provided by third-party providers to users through the public Internet. Users can access the cloud through the Internet and enjoy various services, including but not limited to computing, storage, and networking. Generally, the private network (Virtual Private Cloud, VPC) software defined network (Software Defined Network, SDN) architecture applied to public cloud includes the user end, intermediate modules and computing node servers. The intermediate modules are connected to the user end and computing node servers respectively.
[0064] In one solution, the middle module can use the Remote Dictionary Server (Redis) as a storage solution and use the distributed publish-subscribe messaging system Kafka as a message queue. When the client receives the configuration data, it sends the configuration data to the middle module, which caches the received configuration data so that the computing node server can read it. Since Kafka caches data for a certain period of time, the middle module may lose configuration data, further reducing the credibility of the public cloud.
[0065] At the same time, when Kafka is used as a message queue, when computing nodes join or leave, a rebalance phenomenon will occur, affecting the working process of the proxy broker, resulting in low efficiency in the entire Kafka data throughput, and as the number of computing nodes increases, the efficiency will decrease.
[0066] In another solution, the intermediate module can use the distributed storage system Etcd for data storage, so that the computing nodes can listen to the watch Etcd and obtain configuration data from Etcd. On the one hand, since data synchronization is required between the storage modules in Etcd, when the number of computing nodes is large, the amount of configuration data is also large, which makes the amount of data that needs to be synchronized between the storage modules in the intermediate module large, resulting in low efficiency of computing nodes in pulling data. On the other hand, the number of watch connections that Etcd can receive is limited. When the number of computing nodes is large in the application scenario of the public cloud, Etcd cannot meet the needs of large-scale computing nodes.
[0067] At the same time, Etcd is a key-value (kv) storage structure that can represent the current configuration status of a computing node, but cannot represent the resource configuration process of a computing node. In scenarios where resources change frequently, such as the creation, mounting, and uninstallation of virtual network cards, the configuration data of each computing node cannot be accurately sent to the computing node, reducing the credibility of the public cloud. In addition, in public cloud application scenarios, when the number of computing nodes is large, the upper limit of Etcd's data storage capacity may not meet the scenario requirements.
[0068] In the above two solutions, after receiving the configuration data, the intermediate module stores the configuration data in the local storage module. After the configuration data is cleaned, if the computing node needs to pull the data, the cleaned configuration data cannot be restored, so that the computing node cannot obtain the configuration data, causing the computing node to be unable to configure virtual machine resources, thereby reducing the credibility of the public cloud.
[0069] In order to alleviate the problems existing in the above-mentioned scheme, the embodiment of the present disclosure provides a network configuration delivery system, which is applied in the public cloud. The system includes a control cluster, a configuration data storage cluster, a configuration channel service cluster and a computing node cluster. By setting up a configuration data storage cluster to store incremental configuration data, the loss of configuration data is alleviated, the security and reliability of the system are improved, and for large-scale computing node clusters in public cloud scenarios, the configuration data storage cluster can meet the data storage requirements. Setting up a configuration channel service cluster, by caching the incremental configuration data, the computing node cluster can pull data from the cached configuration data more quickly, thereby improving the efficiency of data delivery; and for large-scale computing node clusters in public cloud scenarios, since there is no need to synchronize data between the various cache modules in the configuration channel service cluster, the configuration channel service cluster can meet the pull requirements of large-scale computing nodes by horizontally expanding services, thereby improving the degree of adaptability in public cloud scenarios.
[0070] At the same time, when the incremental configuration data required by the computing node cluster exists in the cache module, the computing node cluster can quickly obtain the required incremental configuration data; when the incremental configuration data required by the computing node cluster does not exist in the cache module, the required incremental configuration data can be obtained from the configuration data storage cluster, thereby improving the data transmission efficiency of the system while ensuring the security of the system.
[0071] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0072] To facilitate understanding of the embodiments of the present disclosure, a network configuration delivery system disclosed in the embodiments of the present disclosure is first introduced in detail. The system is applied in a public cloud scenario, and the application scenario of the public cloud and the basic concepts in the application scenario are briefly described here.
[0073] VPC builds an isolated, self-configured, and managed virtual network environment for cloud resources. Different private networks are isolated from each other, and users can create and manage cloud resources such as cloud servers and load balancing in their own private networks.
[0074] Region refers to the different geographical areas where the physical data center is located. The intranets of different regions are completely isolated to maintain the maximum stability and fault tolerance between different regions. When creating cloud resources, you must select the region where the cloud resources to be created are located. The region cannot be modified after the resources are created.
[0075] An availability zone (AZ) is a physical area in the same region with isolated circuits and networks. In the same private network, the intranets between availability zones are interconnected by default. When creating some cloud resources (subnets, cloud server instances), you need to select an availability zone. After the resources are created, the availability zone cannot be modified.
[0076] In public cloud scenarios, the physical server resources of public clouds are generally set up in multiple regions, with 2-3 availability zones in each region and 10,000-20,000 physical servers deployed in each availability zone. Generally, in public cloud scenarios, the scale of computing node clusters under a single VPC may reach 50,000-100,000, which shows that the number of computing nodes in public cloud scenarios is relatively large.
[0077] See also Figure 1 As shown, it is an architectural diagram of the network configuration delivery system provided by the embodiment of the present disclosure, including: a control cluster 11, a configuration data storage cluster 12, a configuration channel service cluster 13 and a computing node cluster 14; wherein, the control cluster 11 is connected to the configuration data storage cluster 12 and the configuration channel service cluster 13 respectively; the configuration channel service cluster 13 is connected to the computing node cluster 14.
[0078] The control cluster 11 is used to receive incremental configuration data for the virtual switch on the computing node, send the incremental configuration data and the channel parameters generated for the incremental configuration data to the configuration data storage cluster 12 for associated storage, and send the incremental configuration data and the channel parameters generated for the incremental configuration data to the configuration channel service cluster 13 for caching.
[0079] The configuration channel service cluster 13 is used to receive the target channel parameters sent by the computing node cluster; in response to receiving the target channel parameters, obtain the current configuration data matching the target channel parameters from the cached configuration data; when the current configuration data is obtained from the cached configuration data, send the current configuration data to the computing node cluster; when the current configuration data is not obtained from the cached configuration data, obtain the current configuration data from the configuration data storage cluster and cache the current configuration data.
[0080] The computing node cluster 14 is used to periodically send target channel parameters to the configuration channel service cluster and receive current configuration data; and configure virtual network resources on the virtual switch based on the current configuration data.
[0081] The control cluster may be a cluster composed of at least one server, and the control cluster is used to receive the incremental configuration data for the virtual switch on the computing node sent by the user, and generate corresponding channel parameters for the incremental configuration data, and send the received incremental configuration data and the channel parameters corresponding to the incremental configuration data to the configuration data storage cluster and the configuration channel service cluster. The configuration data storage cluster associates and stores the received incremental configuration data and channel parameters. And the configuration channel service cluster caches the received incremental configuration data and channel parameters. Among them, the incremental configuration data is the data sent by the user for configuring virtual machine resources in the computing node cluster, for example, the incremental configuration data may be the configuration data for creating a network card, etc.
[0082] The computing node cluster is used to periodically pull the required configuration data from the configuration channel service cluster, where the acquisition period of the computing node cluster can be set according to the actual situation. During implementation, the computing node cluster is used to generate target channel parameters and send the target channel parameters to the configuration channel service cluster. For example, the target channel parameters may include the name of the computing node, the channel version number of the data, the channel name of the configuration channel used when the data is sent, the amount of configuration data obtained, etc.
[0083] The configuration channel service cluster receives the target channel parameters sent by the computing node cluster, and in response to receiving the target channel parameters, preferentially obtains the current configuration data matching the target channel parameters from the cached configuration data. If the current configuration data is obtained from the cached configuration data, the current configuration data is sent to the computing node cluster.
[0084] Since the configuration data cached in the configuration channel service cluster is time-sensitive, the cached configuration data may be deleted if it has not been pulled for a long time, so there is a situation where the current configuration data cannot be obtained from the cached configuration data. If the current configuration data is not obtained from the cached configuration data, the current configuration data can be obtained from the configuration data storage cluster and cached so that the computing node cluster can obtain the current configuration parameters from the configuration data cached in the configuration channel service cluster based on the target channel parameters in the next cycle.
[0085] In an alternative embodiment, see Figure 2 As shown, the configuration data storage cluster 12 includes an incremental configuration storage module 121 and a full configuration storage module 122; the control cluster 11 is also used to receive full configuration data for the virtual switch on the computing node, and send the full configuration data to the configuration data storage cluster 12; wherein the incremental configuration data and the full configuration data are used to configure virtual network resources on the virtual switch of the computing node in the computing node cluster.
[0086] The configuration data storage cluster 12 is used to store full configuration data in the full configuration storage module 122; store incremental configuration data in the incremental configuration storage module 121, and update the full configuration data stored in the full configuration storage module using the incremental configuration data.
[0087] The control cluster is also used to receive the full configuration data sent by the user, and send the full configuration data to the configuration data storage cluster. The configuration data storage cluster stores the full configuration data in the full configuration storage module, and stores the received incremental configuration data in the incremental configuration storage module. At the same time, when the incremental configuration data is received, the full configuration storage module can also be updated using the incremental configuration data, that is, the incremental configuration data is stored in the full configuration storage module to achieve the update of the full configuration storage module. For example, when the received incremental configuration data is: configuration data 3.1, and the full configuration data stored in the full configuration storage module includes: configuration data 1.1, configuration data 2.1, then after the full configuration storage module is updated using the incremental configuration data, the full configuration data stored in the updated full configuration storage module (i.e., the updated full configuration data) is: configuration data 1.1, configuration data 2.1, configuration data 3.1.
[0088] Exemplarily, the incremental configuration storage module may be a relational database management system MySQL, and the full configuration storage module may be Etcd. By using MySQL to store the incremental configuration data, the storage of the current configuration data during the configuration process is realized, and by using Etcd to store the full configuration data, the storage of each configuration data in the configuration process is realized. The above configuration meets the needs of multiple application scenarios, and can more accurately determine the distribution status and current status of the configuration data, thereby improving the efficiency and accuracy of the configuration.
[0089] By storing incremental configuration data in the incremental configuration storage module and storing full configuration data in the full configuration storage module, classified storage of configuration data is achieved, so that when the current configuration data cannot be found in the configuration channel service cluster, the current configuration data can be obtained from the configuration data storage cluster, alleviating the problem of data loss in related technologies; and by storing incremental configuration data in the incremental configuration storage module, the storage of current configuration data during the configuration process is achieved, and by storing full configuration data in the full configuration storage module, the storage of various configuration data during the configuration process is achieved.
[0090] At the same time, the full configuration data is stored in the full configuration storage module. When the configuration state of the computing node is slow, for example, the version of the incremental configuration data stored in the incremental configuration storage module is 5.1, and the version of the incremental configuration data received by the computing node is 1.1, the configuration state of the computing node is slow at this time. By sending the full configuration data to the computing node cluster, the computing node can be quickly configured and the configuration efficiency can be improved.
[0091] During implementation, when the full configuration storage module is updated, the following situation occurs: the incremental configuration data is successfully written to the incremental configuration storage module, but the incremental configuration data is not successfully written to the full configuration storage module. In order to ensure the consistency of data between the full configuration storage module and the incremental configuration storage module, the control cluster can control the incremental configuration storage module to delete the written incremental configuration data, thereby improving the security and reliability of the system.
[0092] In an alternative embodiment, see Figure 2 As shown, the control cluster includes at least one private network VPC controller; each private network controller is provided with a private network VPC broker software development kit (Software Development Kit, SDK).
[0093] The control cluster 11, when sending the incremental configuration data and the channel parameters generated for the incremental configuration data to the configuration data storage cluster for associated storage, and sending the incremental configuration data and the channel parameters generated for the incremental configuration data to the configuration channel service cluster for caching, is used to:
[0094] Using the VPC broker SDK, the incremental configuration data is placed in a configuration channel that matches the incremental configuration data, and the channel version number of the configuration channel is updated using the VPC broker SDK, wherein the configuration channel is associated with the channel version number, and the channel version number increases by a preset value each time an incremental configuration data is added to the configuration channel; and the incremental configuration data and the updated channel version number are sent to the configuration data storage cluster through the configuration channel for associated storage, and the incremental configuration data and the updated channel version number are sent to the configuration channel service cluster through the configuration channel for over-caching.
[0095] During implementation, a configuration channel channel may be set in the VPC broker, and the configuration channel may be set with at least one of the following rules: different types of configuration data are placed in different configuration channels; the configuration channel maintains a channel version number (the initial value of the channel version number may be a preset value, such as a preset value of 1), and each time an incremental configuration data is added to the configuration channel, the channel version number associated with the configuration channel increases by a preset value (such as 1); the configuration channel maintains incremental configuration data and full configuration data, wherein the incremental configuration data and the full configuration data may be placed in the configuration channel by the user of the VPC controller; the configuration channel sends the incremental configuration data in the channel to the computing node in the order in which they are placed; when the configuration channel determines that the incremental configuration data on the computing node is older (for example, the channel version number of the current incremental configuration data reported by the computing node is much smaller than the channel version number of the latest incremental configuration data sent by the user), the full configuration data is sent to the computing node, so that the configuration of the computing node can quickly catch up with the latest incremental configuration data sent by the user.
[0096] In an optional implementation, the configuration channels include the following types: a first configuration channel for storing a private network identification number (i.e., vpc_id) that the computing node server is concerned about; a second configuration channel for storing single-node events under each private network that the computing node server is concerned about; a third configuration channel for storing global events under each private network; and a fourth configuration channel for storing target events that at least one computing node under each private network is concerned about.
[0097] For the first configuration channel, the channel type of the first configuration channel may be node_vpc_control_channels, and the function of the first configuration channel may be: storing the vpc_id that each computing node needs to pay attention to, and the stored virtual switch resources may include: resource data related to VPC, control information of some computing nodes, and resource data related to VPC such as subnet resource data, security group resource data, routing table resource data, etc.; wherein, the first configuration channel is equivalent to the signaling channel of the computing node. The number of first configuration channels is related to the number of computing nodes. Generally, one computing node corresponds to one first configuration channel, that is, the number of first configuration channels may be num (computing node host). The channel name of the first configuration channel may be determined according to the set rules, for example, the naming rule of the channel name of the first configuration channel may be: "control" + "host ip", wherein host ip may be the Internet Protocol (IP) address of the computing node, for example: the channel name of the first configuration channel may be "control+10.2.3.4".
[0098] For the second configuration channel, the channel type of the second configuration channel may be: vpc_host_data_channels. The function of the second configuration channel may be: storing single-node events under a certain VPC that each computing node needs to pay attention to. The stored virtual switch resources may include: virtual port vport, elastic public IP (Elastic IP Address, EIP), high-availability virtual IP (High-Availability Virtual IP Address, HaVip), etc. The number of second configuration channels is related to the number of VPCs under the computing node. Generally, each VPC under each computing node corresponds to a second configuration channel, that is, the number of second configuration channels may be num(VPC)×num(host). The channel name of the second configuration channel may be determined according to the set rules. For example, the naming rule of the channel name of the second configuration channel may be: "host_channel"+{vpc_id}+{host ip}, for example: host_channel+vpc-mjnipf8wjy+10.2.3.4".
[0099] For the third configuration channel, the channel type of the third configuration channel can be: vpc_global_data_channels. The function of the third configuration channel can be: storing global events under each VPC. The stored virtual switch resources may include: routing table route, etc. The number of third configuration channels is related to the number of VPCs. Generally, each VPC corresponds to a third configuration channel, that is, the number of third configuration channels can be num(VPC). The channel name of the third configuration channel can be determined according to the set rules. For example, the naming rule of the channel name of the third configuration channel can be: "selfdefine" + {vpc_id} + {service type}, for example: "selfdefine + vpc-mjnipf8wjy + route".
[0100] For the fourth configuration channel, the channel type of the fourth configuration channel may be: vpc_mutil_host_data_channels, and the function of the fourth configuration channel may be: storing target events that multiple computing nodes under the VPC need to pay attention to, and the stored virtual switch resources may include: security group rules, IP address set IPset, network access control list (Access Control List, ACL), etc. The number of fourth configuration channels is related to the number of computing nodes that pay attention to the target event. For example, if the target event is a channel creation event, the number of computing nodes that pay attention to the target event is n, then the number of the fourth configuration channels is n. The name of the fourth channel is related to the target event. For example, the name of the fourth configuration channel is constructed by obtaining the corresponding creation and deletion events (target events) from the second configuration channel, that is, the virtual switch control layer controller obtains the corresponding creation and deletion events (target events) from the second configuration channel, and automatically watches the corresponding fourth configuration channel.
[0101] See also Figure 3 The channel relationship diagram shown in the figure shows the relationship between the first configuration channel, the second configuration channel, the third configuration channel and the fourth configuration channel. In specific implementation, the configuration data can be placed in the first configuration channel so that the computing node can obtain the vpc id that needs attention. When performing a VPC creation operation or a VPC deletion operation, if there is a single-node event in the VPC, the second configuration channel can be used to send down the configuration data corresponding to the single-node event. If there is a global event in the VPC, the third configuration channel can be used to send down the configuration data corresponding to the global event. If there is a target event in the VPC that requires the attention of some computing nodes, the fourth configuration channel related to the target event corresponding to some computing nodes can be determined from the second configuration channel, and the configuration data corresponding to the target event can be sent down through the fourth configuration channel.
[0102] In this solution, by setting up multiple types of configuration channels, different incremental configuration data can be sent to the computing node cluster more quickly and conveniently through different configuration channels. For example, global events can be sent to each computing node corresponding to the VPC through the third configuration channel, which improves the efficiency of data delivery.
[0103] Since the configuration channel is set in the VPC broker, the VPC broker SDK can be used to put the incremental data into the configuration channel that matches the incremental configuration data. For example, when the incremental configuration data is a single-node event under VPC1, the incremental configuration data can be put into the second configuration channel corresponding to VPC1. And the channel version number of the configuration channel is updated using the VPC broker SDK, that is, the channel version number of the configuration channel is added with the preset value to obtain the updated channel version number.
[0104] Then, the incremental configuration data is associated with the updated channel version number corresponding to the configuration channel, and the associated incremental configuration data and the updated channel version number are sent to the configuration data storage cluster and the configuration channel service cluster through the configuration channel, so that the configuration data storage cluster stores the received associated incremental configuration data and the updated channel version number in the incremental configuration storage module, and the configuration channel service cluster caches the received associated incremental configuration data and the updated channel version number in the cache module. In the subsequent process, the configuration channel service cluster can obtain the current configuration data from the cache module according to the received target channel parameters (such as channel name, channel version number).
[0105] Here, incremental configuration data is sent down through the configuration channel, which enables faster sending of incremental configuration data, and each configuration channel maintains a channel version number, so that the computing node can obtain the required configuration data more accurately based on the channel name and version number of the configuration channel.
[0106] During implementation, the VPC controller can also periodically detect the status of each configuration channel, delete the configuration channel whose status is indicated as invalid, and retain the configuration channel whose status is indicated as valid. For example, when the VPC corresponding to the configuration channel does not exist and the computing node server corresponding to the configuration channel is offline, it can be determined that the status of the configuration channel is invalid. By regularly deleting invalid configuration channels, the occupation of network resources by invalid configuration channels can be reduced, avoiding resource waste.
[0107] See also Figure 4 The VPC controller access process shown in the figure is combined with Figure 4 The functions of the VPC controller are explained. Hydra in the VPC controller is responsible for creating / deleting the configuration channel. When receiving incremental configuration data, it can call the API to send the incremental configuration data to the incremental configuration storage module MySQL through the created configuration channel, and send the incremental configuration data to the full configuration storage module Etcd through the configuration channel to update Etcd, so that there is data consistency between the incremental configuration storage module and the full configuration storage module; when receiving the full configuration data, the full configuration data is written to Etcd through the configuration channel. At the same time, it can also notify the VPC broker so that the VPC broker uses the VPCbroker SDK to write the incremental configuration data to the VPC broker server, and it can also regularly clean up expired channels, such as deleting the channel when it is determined that the channel status is invalid.
[0108] In an alternative embodiment, see Figure 2As shown, the configuration channel service cluster includes at least one configuration channel server, and each configuration channel server row is provided with a private network proxy service VPC broker server module and a cache module Redis.
[0109] The control cluster is used to send the incremental configuration data to each configuration channel server in the configuration channel service cluster. The VPC broker server module in each configuration channel server is used to receive the incremental configuration data and cache the incremental configuration data to the cache module of the configuration channel server.
[0110] When the configuration channel service cluster includes multiple configuration channel servers, considering that the computing node may pull incremental configuration data from any configuration channel server, the control cluster needs to broadcast the incremental configuration data to each configuration channel server. During implementation, the control cluster is used to send the incremental configuration data to each configuration channel server in the configuration channel service cluster. When the VPC broker server module in each configuration channel server receives the incremental configuration data, it caches the incremental configuration data to the cache module of the configuration channel server.
[0111] The number of configuration channel servers in the configuration channel service cluster can be expanded. During implementation, the configuration channel servers can be expanded horizontally so that the configuration channel service cluster can meet the needs of the computing node cluster and improve the efficiency of data transmission.
[0112] In the disclosed embodiment, at least one configuration channel server is set in the configuration channel service cluster, and each configuration channel server is provided with a VPC broker server module and a cache module. The target channel parameters are received through the VPC broker server module and the incremental configuration data is cached in the cache module, so that the computing node can obtain the incremental configuration data from the configuration channel server more quickly, thereby improving the data transmission efficiency.
[0113] During implementation, the system may further include a load balancer; the load balancer is connected to the configuration channel service cluster and the computing node cluster respectively. The load balancer is used to determine the configuration channel server corresponding to the computing node from the configuration channel servers included in the configuration channel service cluster when receiving the target channel parameters sent by any computing node in the computing node cluster; and send the target channel parameters to the VPC broker server module of the determined configuration channel server.
[0114] The VPC broker client module on any computing node in the computing node cluster can establish a Transmission Control Protocol (TCP) persistent connection with any configuration channel server in the configuration channel service cluster through the load balancer, and periodically report the local channel version number version of the configuration channel of interest through the persistent connection, so that the VPC broker server module can obtain and send incremental configuration data from version+1 to version+N (N is a preset number) from the cache module according to the version of the configuration channel channel reported by the VPC broker client module.
[0115] In an alternative embodiment, see Figure 2 As shown, the computing node cluster includes at least one computing node server, each computing node server includes a node controller, and the node controller includes a private network proxy client VPCbroker client module;
[0116] The VPC broker client module is used to: determine the target channel parameters according to the channel name and channel version number of the stored configuration channel; send the target channel parameters to the configuration channel service cluster; and after receiving the current configuration data, verify whether the channel version number associated with the current configuration data matches the target channel parameters. If they match, store the channel version number and configure virtual network resources on the virtual switch based on the current configuration data. If they do not match, re-pull data based on the target channel parameters.
[0117] During implementation, two coroutines can be started in the VPC broker client module, such as Report Channel ToBroker and Receive Channel From Broker. A TCP long connection can be used between the VPC broker client module and the VPC broker server module. Report Channel To Broker is responsible for sending configuration data (incremental configuration data and full configuration data), and Receive Channel From Broker is responsible for receiving configuration data. When the VPC brokerclient receives configuration data with the channel version number version, it will verify whether the version is correct. If it is correct, it will transfer the configuration data to the processing service response module through the callback CallBack function. The transferred configuration data is not associated with a version.
[0118] See also Figure 5As shown, the VPC broker client module may include: a version storage module, a channel version management module, a version cycle reporting module, a processing service response module and an interface module. The channel version management module is used to determine the target channel parameters according to the channel name and channel version number of the configuration channel stored in the version storage module; and send the target channel parameters to the version cycle reporting module, so that the version cycle reporting module can send the target channel parameters to the configuration channel service cluster. For example, the channel name and channel version number of the configuration channel stored in the version storage module are determined as the target channel parameters. When the channel version number of the configuration channel does not exist in the version storage module, the target value, such as -1, can be used as the target channel parameter, so that the VPC broker server can obtain and send the full configuration data according to the target value.
[0119] The channel version management module is also used to verify whether the channel version number associated with the current configuration parameters matches the target channel parameters after receiving the current configuration data. If they match, it means that the current configuration data is correct, and the current configuration data is sent to the processing service response module, and the channel version number associated with the current configuration data is stored in the version storage module. The service response module configures the virtual network resources based on the current configuration data by calling the interface module. The version storage module can be a lightweight database SQLite.
[0120] Among them, the control cluster and computing node cluster may also include other functional modules required for virtual network resource configuration. For example, the computing node server may also include a virtual switch, a virtual machine, etc. During implementation, other functional modules may be set as needed.
[0121] In an optional implementation, the target channel parameter includes a channel name and a channel version number of the target configuration channel, and the configuration channel service cluster, in response to receiving the target channel parameter, obtains the current configuration data matching the target channel parameter from the cached configuration data, for:
[0122] According to the channel name, obtain the cache version number of the target configuration channel from the cached configuration data; when the cache version number is greater than the channel version number, determine the version number range based on the channel version number and the preset number; obtain configuration data that matches the version number range from the cache module; when the configuration data that matches the version number range is successfully obtained, use the obtained configuration data as the current configuration data.
[0123] The target channel parameter may include the channel name and channel version number of the target configuration channel. After receiving the target channel parameter, the configuration channel service cluster may obtain the cache version number of the target configuration channel from the cache module according to the channel name in the target channel parameter. The cache version number is the latest version number of the target configuration channel.
[0124] Compare the channel version number in the target channel parameter with the cache version number. When the cache version number is greater than the channel version number, the incremental configuration data of the target configuration channel in the cache module is new incremental configuration data compared to the incremental configuration data received in the computing node. Therefore, the version number range can be determined based on the channel version number and the preset number. For example, when the channel version number is version2.0 and the preset number is N, the version number range can be: version2.0+1 to version2.0+N. Then obtain the configuration data that matches the version number range from the cache module, such as obtaining the configuration data corresponding to version2.0+1, version2.0+2, ..., version2.0+N in the target configuration channel. When the configuration data that matches the version number range is successfully obtained, the obtained configuration data is used as the current configuration data.
[0125] The target channel parameters may also include the name of the computing node, the preset number, etc., so that the configuration channel service cluster can determine the version number range according to the preset number and monitor various information during the system operation according to the name of the computing node.
[0126] Here, the target channel parameters include the channel name and channel version number of the target configuration channel. Through the target channel parameters, the required current configuration data can be obtained more accurately. At the same time, by comparing the cache version number with the channel version number, it is possible to quickly and preliminarily determine whether the required incremental configuration data exists in the cache module.
[0127] In an optional implementation, the configuration channel service cluster is also used to: when configuration data matching the version number range is not successfully obtained from the cached configuration data, obtain the minimum version number of the target configuration channel stored in the incremental configuration storage module in the configuration data storage cluster; determine whether the channel version number is less than the minimum version number; if so, obtain the full configuration data corresponding to the target configuration channel from the cached configuration data based on the target channel parameters; if the full configuration data is successfully obtained, use the full configuration data as the current configuration data; if the full configuration data cannot be obtained, obtain the full configuration data corresponding to the target configuration channel from the full configuration storage module in the configuration data storage cluster, and cache the full configuration data.
[0128] During implementation, when the cache version number is greater than the channel version number, there is a situation where the configuration data matching the version number range is not successfully obtained from the cache module. For example, when the cache module does not include all the incremental configuration data corresponding to the version number range, it may cause the configuration data acquisition failure. In this case, the minimum version number of the target configuration channel stored in the incremental configuration storage module in the configuration data storage cluster can be obtained; the smaller the version number, the earlier the incremental configuration data corresponding to the version number is put into the configuration channel.
[0129] Then determine whether the channel version number is less than the minimum version number. If so, it means that the channel version number is too old, that is, the incremental configuration data received in the computing node may be the older incremental configuration data sent by the user at an earlier time. At this time, based on the target channel parameters, the full configuration data corresponding to the target configuration channel can be obtained from the cache module (that is, the cached configuration data). If the full configuration data is successfully obtained, the full configuration data is used as the current configuration data so that the computing node can quickly catch up with the user's control plane; if the full configuration data cannot be obtained, the full configuration data corresponding to the target configuration channel is obtained from the full configuration storage module in the configuration data storage cluster, and the full configuration data is cached to the cache module so that the computing node can obtain the full configuration data based on the target channel parameters next time.
[0130] When the channel version number is greater than or equal to the minimum version number, the maximum version number corresponding to the target configuration channel in the cache module and the maximum version number corresponding to the target configuration channel in the incremental configuration storage module can be obtained; when the maximum version number of the cache module is less than the maximum version number of the incremental configuration storage module, it means that the incremental configuration data corresponding to the target configuration channel in the cache module does not include the latest incremental configuration data, and the incremental configuration data corresponding to the target configuration channel in the incremental configuration storage module can be synchronized to the cache module.
[0131] When the maximum version number of the cache module is equal to the maximum version number of the incremental configuration storage module, it means that the incremental configuration data corresponding to the target configuration channel in the cache module has caught up with the incremental configuration storage module, and synchronization operation is not required.
[0132] During implementation, when comparing the cache version number with the channel version number, it is possible that the cache version number is equal to the channel version number. In this case, it means that the incremental configuration data of the target configuration channel in the computing node has caught up with the configuration data sent by the vpc controller. At this time, no operation is required.
[0133] There may also be a situation where the cache version number is smaller than the channel version number. In this case, it means that the incremental configuration data cached by the cache module does not belong to the latest incremental configuration data. At this time, the maximum version number corresponding to the target configuration channel in the cache module and the maximum version number corresponding to the target configuration channel in the incremental configuration storage module can be obtained; when the maximum version number of the cache module is smaller than the maximum version number of the incremental configuration storage module, the incremental configuration data corresponding to the target configuration channel in the incremental configuration storage module is synchronized to the cache module so that the computing node can obtain the current configuration data next time.
[0134] Combination Figure 6 As shown, the process of obtaining the current configuration data matching the target channel parameters from the configuration data cached in the cache module is described in detail. The configuration channel service cluster receives the target channel parameters, that is, the input parameters: the name of the computing node, the channel version number, the channel name, and the preset number. Then obtain the cache version number of the target configuration channel from the cache module. Determine whether the cache version number is greater than the channel version number. If so, go to the cache module to obtain the incremental configuration data corresponding to the channel version number + 1 to the channel version number + N, where N is the preset number. If the acquisition is successful, the incremental configuration data (that is, the incremental configuration data corresponding to the channel version number + 1 to the channel version number + N) is returned. If the acquisition is not successful, determine whether the channel version number is less than the minimum version number in the incremental configuration storage module. If so, obtain the full configuration data from the cache module, and return the full configuration data when the full configuration data is successfully obtained; if the full configuration data fails to be obtained, execute: 1. Miss process; 2. Obtain the full configuration data from the full configuration storage module and put it in the cache module. Among them, the miss process means that no data is returned to the computing node service cluster.
[0135] If the channel version number is greater than or equal to the minimum version number in the incremental configuration storage module, execute: 1. Miss process; 2. Compare the maximum version number of the target configuration channel in the cache module and the incremental configuration storage module. If the maximum version number in the cache module lags behind, synchronize the data from the incremental configuration storage module to the cache module. That is, compare the maximum version number of the target configuration channel in the cache module with the maximum version number of the target configuration channel in the incremental configuration storage module. If the maximum version number in the cache module is less than the maximum version number in the incremental configuration storage module, synchronize the data from the incremental configuration storage module to the cache module.
[0136] If the cache version number is equal to the channel version number, no processing is performed, which means that the incremental configuration data of the target configuration channel received on the computing node is the latest data and no data pulling is required. If the cache version number is less than the channel version number, the following are executed: 1. Miss process; 2. Compare the maximum version number of the target configuration channel in the cache module and the incremental configuration storage module. If the maximum version number in the cache module is behind, synchronize the data from the incremental configuration storage module to the cache module.
[0137] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.
[0138] Based on the same concept, the present disclosure also provides a method for issuing network configuration. Figure 7 FIG. 1 is a flow chart of a method for delivering a network configuration according to an embodiment of the present disclosure, comprising the following steps:
[0139] S701, receiving and caching incremental configuration data sent by a control cluster and channel parameters generated for the incremental configuration data;
[0140] S702, receiving target channel parameters periodically sent by the computing node cluster;
[0141] S703, in response to receiving the target channel parameters, obtaining current configuration data matching the target channel parameters from the cached configuration data; when the current configuration data is obtained from the cached configuration data, sending the current configuration data to the computing node cluster; when the current configuration data is not obtained from the cached configuration data, obtaining the current configuration data from the configuration data storage cluster and caching the current configuration data.
[0142] In an optional implementation, the target channel parameter includes a channel name and a channel version number of a target configuration channel, and the response to receiving the target channel parameter, obtaining current configuration data matching the target channel parameter from cached configuration data, includes:
[0143] According to the channel name, obtaining a cache version number of the target configuration channel from the cached configuration data;
[0144] When the cache version number is greater than the channel version number, determining a version number range based on the channel version number and a preset number;
[0145] Obtaining configuration data matching the version number range from cached configuration data;
[0146] When configuration data matching the version number range is successfully acquired, the acquired configuration data is used as current configuration data.
[0147] In an optional implementation manner, the method further includes:
[0148] When configuration data matching the version number range is not successfully obtained from the cached configuration data, obtaining the minimum version number of the target configuration channel stored in the incremental configuration storage module in the configuration data storage cluster;
[0149] Determine whether the channel version number is less than the minimum version number;
[0150] If yes, then based on the target channel parameters, obtaining the full configuration data corresponding to the target configuration channel from the cached configuration data;
[0151] If the full configuration data is successfully obtained, the full configuration data is used as the current configuration data;
[0152] If the full configuration data cannot be obtained, the full configuration data corresponding to the target configuration channel is obtained from the full configuration storage module in the configuration data storage cluster, and the full configuration data is cached.
[0153] In an optional implementation manner, the method further includes:
[0154] When the channel version number is greater than or equal to the minimum version number, and / or when the cache version number is less than the channel version number, the following process is performed:
[0155] Obtaining the maximum version number corresponding to the target configuration channel in the cached configuration data and the maximum version number corresponding to the target configuration channel in the incremental configuration storage module;
[0156] When the maximum version number of the cache module is less than the maximum version number of the incremental configuration storage module, the incremental configuration data corresponding to the target configuration channel in the incremental configuration storage module is acquired and cached.
[0157] Based on the same concept, the embodiment of the present disclosure also provides a network configuration sending device, see Figure 8 FIG. 1 is a schematic diagram of the architecture of the network configuration delivery device provided in an embodiment of the present disclosure, specifically:
[0158] The first receiving module 801 is used to receive and cache the incremental configuration data sent by the control cluster and the channel parameters generated for the incremental configuration data;
[0159] The second receiving module 802 is used to receive the target channel parameters periodically sent by the computing node cluster;
[0160] The acquisition module 803 is used to obtain current configuration data matching the target channel parameters from the cached configuration data in response to receiving the target channel parameters; when the current configuration data is obtained from the cached configuration data, the current configuration data is sent to the computing node cluster; when the current configuration data is not obtained from the cached configuration data, the current configuration data is obtained from the configuration data storage cluster and the current configuration data is cached.
[0161] In a possible implementation, the target channel parameter includes a channel name and a channel version number of a target configuration channel, and the acquisition module 803, in response to receiving the target channel parameter, acquires the current configuration data matching the target channel parameter from the cached configuration data, for:
[0162] According to the channel name, obtaining a cache version number of the target configuration channel from the cached configuration data;
[0163] When the cache version number is greater than the channel version number, determining a version number range based on the channel version number and a preset number;
[0164] Obtaining configuration data matching the version number range from cached configuration data;
[0165] When configuration data matching the version number range is successfully acquired, the acquired configuration data is used as current configuration data.
[0166] In an optional implementation manner, the acquisition module 803 is further configured to:
[0167] When configuration data matching the version number range is not successfully obtained from the cached configuration data, obtaining the minimum version number of the target configuration channel stored in the incremental configuration storage module in the configuration data storage cluster;
[0168] Determine whether the channel version number is less than the minimum version number;
[0169] If yes, then based on the target channel parameters, obtaining the full configuration data corresponding to the target configuration channel from the cached configuration data;
[0170] If the full configuration data is successfully obtained, the full configuration data is used as the current configuration data;
[0171] If the full configuration data cannot be obtained, the full configuration data corresponding to the target configuration channel is obtained from the full configuration storage module in the configuration data storage cluster, and the full configuration data is cached.
[0172] In an optional implementation manner, the acquisition module 803 is further configured to:
[0173] When the channel version number is greater than or equal to the minimum version number, and / or when the cache version number is less than the channel version number, the following process is performed:
[0174] Obtaining the maximum version number corresponding to the target configuration channel in the cached configuration data and the maximum version number corresponding to the target configuration channel in the incremental configuration storage module;
[0175] When the maximum version number of the cache module is less than the maximum version number of the incremental configuration storage module, the incremental configuration data corresponding to the target configuration channel in the incremental configuration storage module is acquired and cached.
[0176] In some embodiments, the functions or templates contained in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0177] Based on the same technical concept, the embodiment of the present disclosure also provides an electronic device. Fig. 9 As shown, it is a schematic diagram of the structure of the electronic device 900 provided in the embodiment of the present disclosure, including a processor 901, a memory 902, and a bus 903. Among them, the memory 902 is used to store execution instructions, including a memory 9021 and an external memory 9022; the memory 9021 here is also called an internal memory, which is used to temporarily store the operation data in the processor 901, and the data exchanged with the external memory 9022 such as a hard disk. The processor 901 exchanges data with the external memory 9022 through the memory 9021. When the electronic device 900 is running, the processor 901 communicates with the memory 902 through the bus 903, so that the processor 901 executes the following instructions:
[0178] Receive and cache the incremental configuration data sent by the control cluster and the channel parameters generated for the incremental configuration data;
[0179] Receive target channel parameters periodically sent by the computing node cluster;
[0180] In response to receiving the target channel parameters, current configuration data matching the target channel parameters are obtained from the cached configuration data; when the current configuration data is obtained from the cached configuration data, the current configuration data is sent to the computing node cluster; when the current configuration data is not obtained from the cached configuration data, the current configuration data is obtained from the configuration data storage cluster and cached.
[0181] In a possible design, in the instruction executed by the processor 901, the target channel parameter includes a channel name and a channel version number of a target configuration channel, and the response to receiving the target channel parameter, obtaining current configuration data matching the target channel parameter from the cached configuration data, includes:
[0182] According to the channel name, obtaining a cache version number of the target configuration channel from the cached configuration data;
[0183] When the cache version number is greater than the channel version number, determining a version number range based on the channel version number and a preset number;
[0184] Obtaining configuration data matching the version number range from cached configuration data;
[0185] When configuration data matching the version number range is successfully acquired, the acquired configuration data is used as current configuration data.
[0186] In a possible design, in the instructions executed by the processor 901, the method further includes:
[0187] When configuration data matching the version number range is not successfully obtained from the cached configuration data, obtaining the minimum version number of the target configuration channel stored in the incremental configuration storage module in the configuration data storage cluster;
[0188] Determine whether the channel version number is less than the minimum version number;
[0189] If yes, then based on the target channel parameters, obtaining the full configuration data corresponding to the target configuration channel from the cached configuration data;
[0190] If the full configuration data is successfully obtained, the full configuration data is used as the current configuration data;
[0191] If the full configuration data cannot be obtained, the full configuration data corresponding to the target configuration channel is obtained from the full configuration storage module in the configuration data storage cluster, and the full configuration data is cached.
[0192] In a possible design, in the instructions executed by the processor 901, the method further includes:
[0193] When the channel version number is greater than or equal to the minimum version number, and / or when the cache version number is less than the channel version number, the following process is performed:
[0194] Obtaining the maximum version number corresponding to the target configuration channel in the cached configuration data and the maximum version number corresponding to the target configuration channel in the incremental configuration storage module;
[0195] When the maximum version number of the cache module is less than the maximum version number of the incremental configuration storage module, the incremental configuration data corresponding to the target configuration channel in the incremental configuration storage module is acquired and cached.
[0196] Among them, the specific processing flow of the processor 901 can refer to the records of the above-mentioned method embodiment, which will not be repeated here.
[0197] In addition, the embodiment of the present disclosure further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the network configuration delivery method described in the above method embodiment are executed. The storage medium can be a volatile or non-volatile computer-readable storage medium.
[0198] The embodiments of the present disclosure also provide a computer program product, which carries a program code. The instructions included in the program code can be used to execute the steps of the network configuration delivery method described in the above method embodiment. For details, please refer to the above method embodiment, which will not be repeated here.
[0199] The computer program product may be implemented in hardware, software or a combination thereof. In one optional embodiment, the computer program product is implemented as a computer storage medium. In another optional embodiment, the computer program product is implemented as a software product, such as a software development kit (SDK).
[0200] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. In the several embodiments provided in the present disclosure, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the device or unit can be electrical, mechanical or other forms.
[0201] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0202] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0203] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0204] The above are only specific embodiments of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present disclosure, which should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.
Claims
1. A network configuration distribution system, It is characterized in that include: A control cluster, configured to receive incremental configuration data for a virtual switch on a computing node, send the incremental configuration data and a channel parameter generated for the incremental configuration data to a configuration data storage cluster for associated storage, and send the incremental configuration data and the channel parameter generated for the incremental configuration data to a configuration channel service cluster for caching; The configuration channel service cluster is used to receive target channel parameters sent by the computing node cluster; In response to receiving the target channel parameter, acquiring current configuration data matching the target channel parameter from cached configuration data; When the current configuration data is obtained from the cached configuration data, the current configuration data is sent to the computing node cluster; when the current configuration data is not obtained from the cached configuration data, the current configuration data is obtained from the configuration data storage cluster and the current configuration data is cached; The computing node cluster is used to periodically send target channel parameters to the configuration channel service cluster and receive the current configuration data; and configure virtual network resources on the virtual switch based on the current configuration data.
2. The system according to claim 1, It is characterized in that The target channel parameter includes a channel name and a channel version number of a target configuration channel. The configuration channel service cluster, in response to receiving the target channel parameter, acquires current configuration data matching the target channel parameter from cached configuration data, for: According to the channel name, obtaining a cache version number of the target configuration channel from the cached configuration data; When the cache version number is greater than the channel version number, determining a version number range based on the channel version number and a preset number; Obtaining configuration data matching the version number range from cached configuration data; When configuration data matching the version number range is successfully acquired, the acquired configuration data is used as current configuration data.
3. The system according to claim 2, It is characterized in that The configuration channel service cluster is further used to: when configuration data matching the version number range is not successfully obtained from the cached configuration data, obtain the minimum version number of the target configuration channel stored in the incremental configuration storage module in the configuration data storage cluster; Determine whether the channel version number is less than the minimum version number; If yes, then based on the target channel parameters, obtaining the full configuration data corresponding to the target configuration channel from the cached configuration data; If the full configuration data is successfully obtained, the full configuration data is used as the current configuration data; If the full configuration data cannot be obtained, the full configuration data corresponding to the target configuration channel is obtained from the full configuration storage module in the configuration data storage cluster, and the full configuration data is cached.
4. The system according to claim 3, It is characterized in that The configuration channel service cluster is further used to: when the channel version number is greater than or equal to the minimum version number, and / or when the cache version number is less than the channel version number, perform the following process: Obtaining the maximum version number corresponding to the target configuration channel in the cached configuration data and the maximum version number corresponding to the target configuration channel in the incremental configuration storage module; When the maximum version number in the cached configuration data is less than the maximum version number of the incremental configuration storage module, the incremental configuration data corresponding to the target configuration channel in the incremental configuration storage module is acquired and cached.
5. A system according to any one of claims 1 to 4, It is characterized in that The configuration data storage cluster includes an incremental configuration storage module and a full configuration storage module; the control cluster is further used to receive full configuration data for the virtual switch on the computing node and send the full configuration data to the configuration data storage cluster; The configuration data storage cluster is used to store the full configuration data in the full configuration storage module; store the incremental configuration data in the incremental configuration storage module, and use the incremental configuration data to update the full configuration data stored in the full configuration storage module.
6. A system according to any one of claims 1 to 4, It is characterized in that The control cluster includes at least one private network controller; each private network controller is provided with a private network agent software development kit; The control cluster, when sending the incremental configuration data and the channel parameters generated for the incremental configuration data to the configuration data storage cluster for associated storage, and sending the incremental configuration data and the channel parameters generated for the incremental configuration data to the configuration channel service cluster for caching, is used to: Using the private network proxy software development kit, placing the incremental configuration data into a configuration channel that matches the incremental configuration data, and using the private network proxy software development kit to update a channel version number of the configuration channel, wherein the configuration channel is associated with a channel version number, and each time an incremental configuration data is added to the configuration channel, the channel version number increases by a preset value; and The incremental configuration data and the updated channel version number are sent to the configuration data storage cluster through the configuration channel for associated storage, and the incremental configuration data and the updated channel version number are sent to the configuration channel service cluster through the configuration channel for over-caching.
7. The system according to claim 6, It is characterized in that The configuration channels include the following types: A first configuration channel storing a private network identification number that the computing node server is concerned about; A second configuration channel for storing single-node events under each private network that the computing node server is concerned about; The third configuration channel for storing global events under each private network; A fourth configuration channel for storing target events that are of interest to at least one computing node in each private network.
8. A system according to any one of claims 1 to 4, It is characterized in that The configuration channel service cluster includes at least one configuration channel server, and each configuration channel server is provided with a private network proxy service module and a cache module; The control cluster is used to send the incremental configuration data to each configuration channel server in the configuration channel service cluster; The private network proxy service module in each of the configuration channel servers is used to receive the incremental configuration data and cache the incremental configuration data to the cache module of the configuration channel server.
9. A system according to any one of claims 1 to 4, It is characterized in that The computing node cluster includes at least one computing node server, each computing node server includes a node controller, and the node controller includes a private network proxy client module; The private network proxy client module is used to: determine the target channel parameters according to the channel name and channel version number of the stored configuration channel; and send the target channel parameters to the configuration channel service cluster; After receiving the current configuration data, verify whether the channel version number associated with the current configuration data matches the target channel parameter. If so, store the channel version number, and configure virtual network resources on the virtual switch based on the current configuration data.
10. A method for delivering network configuration, It is characterized in that Applicable to configure the channel service cluster, including: Receive and cache the incremental configuration data sent by the control cluster and the channel parameters generated for the incremental configuration data; Receive target channel parameters periodically sent by the computing node cluster; In response to receiving the target channel parameter, acquiring current configuration data matching the target channel parameter from cached configuration data; When the current configuration data is obtained from the cached configuration data, the current configuration data is sent to the computing node cluster; when the current configuration data is not obtained from the cached configuration data, the current configuration data is obtained from the configuration data storage cluster and cached.
11. The method according to claim 10, It is characterized in that The target channel parameter includes a channel name and a channel version number of a target configuration channel, and the response to receiving the target channel parameter, obtaining current configuration data matching the target channel parameter from cached configuration data, includes: According to the channel name, obtaining a cache version number of the target configuration channel from the cached configuration data; When the cache version number is greater than the channel version number, determining a version number range based on the channel version number and a preset number; Obtaining configuration data matching the version number range from cached configuration data; When configuration data matching the version number range is successfully acquired, the acquired configuration data is used as current configuration data.
12. The method according to claim 11, It is characterized in that The method further comprises: When configuration data matching the version number range is not successfully obtained from the cached configuration data, obtaining the minimum version number of the target configuration channel stored in the incremental configuration storage module in the configuration data storage cluster; Determine whether the channel version number is less than the minimum version number; If yes, then based on the target channel parameters, obtaining the full configuration data corresponding to the target configuration channel from the cached configuration data; If the full configuration data is successfully obtained, the full configuration data is used as the current configuration data; If the full configuration data cannot be obtained, the full configuration data corresponding to the target configuration channel is obtained from the full configuration storage module in the configuration data storage cluster, and the full configuration data is cached.
13. The method according to claim 12, It is characterized in that The method further comprises: When the channel version number is greater than or equal to the minimum version number, and / or when the cache version number is less than the channel version number, the following process is performed: Obtaining the maximum version number corresponding to the target configuration channel in the cached configuration data and the maximum version number corresponding to the target configuration channel in the incremental configuration storage module; When the maximum version number in the cached configuration data is less than the maximum version number of the incremental configuration storage module, the incremental configuration data corresponding to the target configuration channel in the incremental configuration storage module is acquired and cached.
14. A network configuration issuing device, It is characterized in that include: A first receiving module, configured to receive and cache the incremental configuration data sent by the control cluster and the channel parameters generated for the incremental configuration data; The second receiving module is used to receive the target channel parameters periodically sent by the computing node cluster; an acquisition module, configured to acquire, in response to receiving the target channel parameter, current configuration data matching the target channel parameter from cached configuration data; When the current configuration data is obtained from the cached configuration data, the current configuration data is sent to the computing node cluster; when the current configuration data is not obtained from the cached configuration data, the current configuration data is obtained from the configuration data storage cluster and cached.
15. An electronic device, It is characterized in that include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the network configuration delivery method as described in any one of claims 10 to 13 are performed.
16. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the network configuration sending method as claimed in any one of claims 10 to 13 are executed.
Citation Information
Patent Citations
method and device for preventing network configuration of virtual machine from losing
CN103532731A
Network configuration distribution method and device, control node and storage medium
CN114500257A
Network isolation control system and method of container, electronic equipment and storage medium
CN115048188A
Information processing method and device and storage medium
CN115242597A
System and method for network validation architecture for clustered and federated storage systems
US20210028987A1
