Network configuration issuing method, system, device, apparatus and medium
By configuring the controller to merge and verify configuration update messages, the problem of incorrect configuration distribution order in large-scale network environments is solved, realizing the orderly and efficient distribution of cloud computing network resource configurations and ensuring the correctness of network configurations.
Patent Information
- Application Number
- CN202411785058.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2044-12-05
AI Technical Summary
In large-scale network environments, when the number of network configuration change requests is high and processed in parallel, it may lead to incorrect configuration distribution order, resulting in network failure.
By configuring the distribution controller to retrieve configuration update messages according to the message queue level and merging them based on the network resource ID and version number, the orderly distribution of configuration update messages is ensured. This includes verification, merging, and retransmission mechanisms to avoid errors caused by out-of-order concurrent configuration distribution.
It enables the orderly distribution of cloud computing network resource allocation, avoids configuration errors, and ensures the correctness and efficiency of network configuration.
Smart Images

Figure CN119854114B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of cloud computing, and in particular to a network configuration issuing method, system, device, equipment and medium. BACKGROUND
[0002] With the advancement of digitalization, there are a large number of servers, network devices and other hardware in each enterprise and organization that need to be uniformly managed and controlled.
[0003] In order to flexibly and quickly build a network, the SDN (Software Defined Network) mode is usually used to separate the control layer and the data forwarding layer of the network, the control layer is responsible for the issuing of network configuration, and the data forwarding layer forwards data according to the configuration. In a large-scale network environment, in the case of a large number of network configuration change requests, multiple API servers are usually deployed as the entrance of the request, and multiple servers process the request in parallel, which may have uncertain processing time, for example, a client's first creation and then update request, if the sequence of configuration issuing is reversed, it becomes first update and then creation, which may result in the final network being incorrectly configured to the state at the time of creation, and the information of the changed part is lost, resulting in network failure. SUMMARY
[0004] Therefore, the present application provides a network configuration issuing method, device, equipment, medium and product, which can avoid network failure caused by incorrect sequence of network configuration issuing as much as possible, and the technical solution is as follows.
[0005] In a first aspect, a network configuration issuing method is provided, the method is applied to a cloud computing configuration issuing system, the system includes an API service component, a message component cluster, a configuration issuing controller and a downstream component, the method is executed by the configuration issuing controller, and the method includes:
[0006] According to the message queue level, a target number of configuration update messages are obtained from the message component cluster; the configuration update message is generated according to the network resource ID and the version number after the API service component receives the network change request;
[0007] According to the network resource ID and the version number, each configuration update message is merged to obtain a merged configuration update message;
[0008] According to the merged configuration update message, the network configuration resource is issued to the downstream component to change the network configuration.
[0009] In a possible implementation, the message component cluster includes queues of different priorities, and the API service component generates a priority of the queue of the configuration update message, which is higher than a priority of the queue of the configuration update message waiting for retransmission after a sending failure.
[0010] In a possible implementation, before the merging of the configuration update messages according to the network resource ID and the version number, the method further includes:
[0011] verifying the configuration update messages and discarding abnormal configuration update messages
[0012] In a possible implementation, the merging of the configuration update messages according to the network resource ID and the version number to obtain the merged configuration update message includes:
[0013] For each network resource ID, the configuration update message with the largest version number is determined as the merged configuration update message.
[0014] In a possible implementation, the delivery of the network configuration resource to the downstream component according to the merged configuration update message includes:
[0015] triggering a retransmission operation when a sending failure of the configuration update message is detected;
[0016] returning the configuration update message to the queue of the configuration update message waiting for retransmission after a failure in the message component cluster when a retransmission number of the configuration update message reaches a threshold.
[0017] In a second aspect, a cloud computing configuration delivery system is provided, and the system includes an API service component, a message component cluster, a configuration delivery controller, and a downstream component.
[0018] The API service component is configured to receive a network change request, and generate and send a configuration update message to the message component cluster according to a network resource ID and a version number in the network change request.
[0019] The configuration delivery controller is configured to acquire a target number of configuration update messages from the message component cluster according to a message queue level, merge the configuration update messages according to a network resource ID and a version number to obtain a merged configuration update message, and deliver a network configuration resource to a downstream component according to the merged configuration update message.
[0020] The downstream component is configured to perform a network configuration change according to the network configuration resource.
[0021] In a possible implementation, the configuration delivery controller further includes:
[0022] The message receiving module is configured to obtain a target number of configuration update messages from the message component cluster according to a message queue level.
[0023] The message merging module is configured to merge the configuration update messages according to network resource IDs and version numbers, to obtain merged configuration update messages.
[0024] The interface calling module is configured to issue network configuration resources to downstream components according to the merged configuration update messages.
[0025] The interface calling module is further configured to trigger a retransmission operation when it is detected that the configuration update message fails to be sent.
[0026] The message sending module is configured to return the configuration update message to a queue of configuration update messages that fail to be retransmitted in the message component cluster when the number of times of retransmission of the configuration update message reaches a threshold.
[0027] In a third aspect, a network configuration issuing device is provided, which is applied to a cloud computing configuration issuing system, the system including an API service component, a message component cluster, a configuration issuing controller, and downstream components, and the device is arranged in the configuration issuing controller. The device includes:
[0028] The receiving unit is configured to obtain a target number of configuration update messages from the message component cluster according to a message queue level. The configuration update messages are generated by the API service component according to network resource IDs and version numbers after receiving network change requests.
[0029] The merging unit is configured to merge the configuration update messages according to network resource IDs and version numbers, to obtain merged configuration update messages.
[0030] The issuing unit is configured to issue network configuration resources to downstream components according to the merged configuration update messages, to change network configurations.
[0031] In a possible implementation, the message component cluster includes queues of different priorities, and the priority of a queue in which the API service component generates configuration update messages is higher than the priority of a queue in which configuration update messages that fail to be retransmitted are waiting.
[0032] In a possible implementation, the device further includes:
[0033] The checking unit is configured to check the configuration update messages, and discard abnormal configuration update messages.
[0034] In a possible implementation, the merging unit is further configured to determine, for each network resource ID, a configuration update message with the largest version number as the merged configuration update message.
[0035] In a possible implementation, the delivering unit is further configured to trigger a retransmission operation when it is detected that the sending of the configuration update message fails, and return the configuration update message to a queue of configuration update messages waiting for retransmission in the message component cluster when the number of retransmissions of the configuration update message reaches a threshold.
[0036] In a fourth aspect, a computer device is provided, including a memory and a processor, which are connected in communication with each other, and the memory stores computer instructions, and the processor executes the computer instructions to perform the network configuration delivering method.
[0037] In a fifth aspect, a computer readable storage medium is provided, which stores computer instructions for causing a computer to perform the network configuration delivering method.
[0038] In a sixth aspect, a computer program product or computer program is provided, which includes computer instructions for causing a computer to perform the network configuration delivering method.
[0039] The technical scheme provided in the present application can include the following beneficial effects:
[0040] In the cloud computing configuration delivering system, there are API service components, a message component cluster, a configuration delivering controller, and downstream components. At this time, the configuration delivering controller can obtain a target number of configuration update messages from the message component cluster according to the message queue level. The configuration update messages are generated by the API service components after receiving network change requests according to network resource IDs and version numbers. The configuration delivering controller then merges the configuration update messages according to the network resource IDs and the version numbers to obtain merged configuration update messages. The configuration delivering controller then delivers network configuration resources to the downstream components according to the merged configuration update messages to change the network configuration. In the above scheme, the configuration messages are bound with the version numbers to ensure the ordered delivery of the cloud computing network resource configuration, avoid configuration errors caused by out-of-order concurrent configuration delivery, and ensure the correctness of the network configuration. BRIEF DESCRIPTION OF DRAWINGS
[0041] In order to more clearly illustrate the technical solutions in the specific embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the specific embodiments or prior art description. Obviously, the drawings described below are some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.
[0042] Figure 1 A system architecture diagram of a cloud computing configuration delivery system is shown according to an exemplary embodiment.
[0043] Figure 2 A network resource update message structure diagram generated for an API service component.
[0044] Figure 3 A specific structure diagram of a configuration delivery controller related to the embodiments of the present application is shown.
[0045] Figure 4 A processing flow diagram of an interface calling module is shown.
[0046] Figure 5 A logic diagram when a configuration update message to be retried is put into a corresponding hierarchical message queue is shown.
[0047] Figure 6 A method flow diagram of a network configuration delivery method is shown according to an exemplary embodiment.
[0048] Figure 7 A schematic diagram of a cloud computing network configuration delivery processing flow related to the embodiments of the present application is shown.
[0049] Figure 8 A structure schematic diagram of a network configuration delivery device provided by the embodiments of the present application is shown.
[0050] Figure 9 A structure schematic diagram of a computer device provided by an optional embodiment of the present application is shown. DETAILED DESCRIPTION
[0051] In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the protection scope of the present application.
[0052] In the description of the embodiments of the present application, the term "corresponding" can represent a direct or indirect corresponding relationship between the two, can also represent an associated relationship between the two, and can also indicate a relationship with the indicated, configured, and the like.
[0053] With the advancement of the digitalization process, enterprises and organizations have a large number of servers, network devices and other hardware that need to be uniformly managed and controlled, and a flexible cloud computing network is constructed to provide a running platform for applications. In order to flexibly and quickly build a network, the SDN (Software Defined Network) mode is usually used to separate the control layer and the data forwarding layer of the network, and the control layer is responsible for the issuance of network configuration, and the data forwarding layer forwards data according to the configuration.
[0054] The network control layer needs to quickly and reliably issue network configuration to the data forwarding layer according to user operations. In order to cope with large-scale and diverse network environments, the network control layer is usually composed of multiple components with different functions, thereby solving the problems of maintenance difficulty, poor expansion capability, and large fault impact caused by the integration of too many functions in a single component. The components in the network control layer need to convert the user's network operation into corresponding network configuration update information, and deliver the update information to all control components related to the update. Finally, the control plane issues the configuration to the data plane to complete the change of network configuration. The ownership and management of numerous network devices may be divided into different teams, for example, intra-domain networks and inter-domain networks are usually divided into two teams for management, and the corresponding control plane components belong to different development teams. These components need to issue configuration through interfaces determined by negotiation, and decoupling between components must be considered in system design, otherwise a single component change or upgrade of a team may cause system failure. In large-scale scenarios such as public clouds involving tens of thousands of network hardware, a large number of users may frequently and concurrently change network configuration, and direct delivery of all configuration update messages to each node will cause high system load, low efficiency, and poor scalability, which cannot meet the needs of large-scale application scenarios. In large-scale network environments with a large number of network configuration change requests, multiple API servers are usually deployed as request entrances, and multiple servers may have uncertain processing time when processing requests in parallel. When multiple servers modify the configuration of the same resource, the correctness of the configuration issuance sequence is crucial, for example, if a client's create-then-update request is reversed to update-then-create when issuing the configuration, the network may be incorrectly configured to the state at the time of creation, losing the information of the changed part and causing network failure. Therefore, how to correctly, efficiently and reliably deliver and issue cloud computing network configuration information is an important problem that needs to be solved by the network control layer.
[0055] Figure 1 is a system architecture diagram of a cloud computing configuration delivery system according to an exemplary embodiment. As shown in Figure 1 , the system includes an API service component, a message component cluster, a configuration delivery controller, and a downstream component;
[0056] The API service component is configured to receive a network change request, and generate a configuration update message according to a network resource ID and a version number in the network change request, and send the configuration update message to the message component cluster;
[0057] The configuration delivery controller is configured to obtain a target number of configuration update messages from the message component cluster according to a message queue level, merge each configuration update message according to the network resource ID and the version number to obtain a merged configuration update message, and deliver a network configuration resource to the downstream component according to the merged configuration update message;
[0058] The downstream component is configured to change network configuration according to the network configuration resource.
[0059] Specifically, the API service component is an entrance of network change request, responsible for processing API request of network change, and the component stores cloud computing network configuration data persistently to database and generates strictly ordered network resource configuration update message. The API service component is deployed on multiple physical servers in multiple instances, multiple threads are started in each API service component to process received API request in parallel, so as to realize horizontal expansion of API entrance side and support a large number of frequent configuration update requests of cloud computing network. The database structure of each cloud computing network resource is designed to include: a unique network resource ID field, a version number field corresponding to the resource ID, and resource specific configuration, wherein the version number field is of non-negative integer type, and the resource is 1 when created. The API service component reads relevant inventory network configuration from the database cluster according to the request content, and uses database transaction for each modification. In the database transaction, first, the SELECT FOR UPDATE statement of SQL is used for the modified network resource, the row corresponding to the network resource is locked in the database, and through the database row lock, the temporary waiting of part of threads is ensured when multiple network requests for the same network resource operation are sent to multiple processing threads of multiple API service components, so that only one thread can perform modification operation at one time for one network resource, thereby ensuring the correctness of concurrent request processing. After the API service component acquires the lock in the database transaction, the row corresponding to the network resource is modified, then the version number field of the resource is incremented by one, the ID, version number and complete configuration of the resource are read to generate a network resource configuration update message, and finally the transaction is committed to release the database row lock of the resource, and the database will persistently store all configurations of the network resource. By locking the resource database, it is ensured that the configuration content in the message with a larger version number is newer than the message with a smaller version number, which provides a basis for subsequent ordered and merged configuration delivery. Figure 2 Structure diagram of network resource update message generated for the API service component.
[0060] As shown in Figure 2 , the network resource ID, network resource version number and network resource configuration content are all corresponding data after the last version number is incremented by one in the resource operation transaction, the configuration cumulative update retry count is set to 0 at this time, and the network resource version number does not use timestamp or message auto-increment number, thereby avoiding the problem that the new and old order of version number and network configuration content in the message cannot be determined due to time inconsistency and processing delay inconsistency between multiple nodes, which is one of the key links to ensure the ordered delivery of network configuration. The API service component sends the generated network resource configuration update message to the 0-level message queue of the message component cluster of the type of network resource, taking the network resource ID as the Key of the message and the above message content as the Value, for the next distribution of the configuration update message.
[0061] Specifically, the configuration delivery controller is a stateless component, that is, a plurality of configuration delivery controllers can process the same type of task, the plurality of controllers are relatively independent and do not depend on each other, and a single controller failure does not affect the configuration delivery. The configuration delivery controller includes four sub-modules, Figure 3 A specific structure diagram of the configuration delivery controller related to the embodiment of the application is shown. As shown in the figure, Figure 3 The configuration delivery controller specifically includes a message receiving module, a message merging module, an interface calling module, and a message sending module. The message receiving module is configured to obtain a target number of configuration update messages from the message component cluster according to a message queue level. The message merging module is configured to merge each configuration update message according to a network resource ID and a version number to obtain a merged configuration update message. The interface calling module is configured to deliver a network configuration resource to a downstream component according to the merged configuration update message. The interface calling module is further configured to trigger a retransmission operation when it is detected that the configuration update message fails to be sent. The message sending module is configured to return the configuration update message to a queue of the configuration update message that fails to be retransmitted in the message component cluster when a retransmission number of the configuration update message reaches a threshold.
[0062] Specifically, the message receiving module is responsible for connecting the message component cluster, subscribing to the message type that can be processed by the controller, subscribing to four level message queues of the network resource configuration by a single controller, receiving the network configuration update message to the configuration delivery controller, and checking whether each message conforms to the network resource update message structure and field specification as Figure 2 defined. If it is an abnormal message, the abnormal message is discarded and an error is reported.
[0063] The message receiving module is designed to continuously receive messages from the 0-level queue, receive messages from the 1-level queue every 5 minutes, receive messages from the 2-level queue every 30 minutes, and receive messages from the 3-level queue every 60 minutes. A network configuration message will be retried for a maximum of 3 times at 5 minutes, 30 minutes, and 60 minutes, respectively. The reason for this design is that the network and downstream components may be unavailable for a short period of time. Frequent retries should not be performed during this time. After a reasonable recovery time, retries are performed. Through multiple reasonable interval retries of a single configuration, the successful delivery of the configuration is ensured. When the interface calling module successfully completes message processing, the message receiving module confirms to the message component that the message has been processed. At this time, the message component deletes the message from the message component. The message merging module periodically receives a batch of messages from the message receiving module, and the number of single batch messages is less than or equal to the maximum number of single batch messages. The message merging module uses the network resource ID + version number in the message as the basis for message merging. The message merging module generates configuration delivery content cache by taking the network resource configuration content in the message with the largest network resource version number for each resource ID, thereby realizing the extraction of effective messages and the removal of old configuration messages.
[0064] When the configuration information update frequency is high, the rate of calling downstream configuration delivery can be ensured not to grow indefinitely with the growth of the update rate of a single resource configuration, protecting the downstream components and ensuring timely delivery of network configuration. For example, Figure 4 The processing flowchart of the interface calling module is shown in FIG. 6. The interface calling module obtains the network resource configuration to be delivered from the configuration delivery content cache of the message merging module, calls the corresponding configuration update interface of the downstream component, and if the interface calling is successful and the response code is correct, the message receiving module completes the confirmation operation of all messages of this batch for the resource ID to the message component. If the interface calling fails, it is determined whether the failure reason is a retryable type. For failures of the non-retryable type, such as feedback from the downstream component that the delivered network configuration is incorrect, the abnormal message is discarded and an error log is recorded for troubleshooting. For failures of the retryable type, it is determined whether the cumulative retry number of the configuration update exceeds the upper limit of the total number of calling failures for a single message. If it exceeds, the abnormal message is discarded and an error log is recorded for subsequent troubleshooting. If it does not exceed, it is determined whether the number of retries of the current node of the configuration update exceeds the upper limit of the total number of calling failures for the current node. If it does not exceed, the retry number is increased by one and the delivery is retried. If it exceeds, the retry number is increased by one and the message is placed back into the corresponding hierarchical message queue.
[0065] Figure 5The logic diagram of the configuration update message to be retried is shown when the message is re-entered into the corresponding hierarchical message queue. According to the update in the message, the number of retries is accumulated, the number of failures is less than n1, the message is entered into the first-level queue, the number of failures is between n1 and n2, the message is entered into the second-level queue, and the number of failures is n2 and above, i.e. the message with less number of retries is considered as a new high-priority message, which is entered into the queue with short pulling time interval for priority processing. The message sending module is connected to the message component as a message producer, responsible for receiving the configuration update information to be retried from the interface calling module, encapsulating the message and sending it to the message component. The configuration delivery controller component is deployed in multiple instances, and is deployed according to the amount of configuration to be delivered, the high-availability requirement, and the design and deployment of the delivery controller of the same type of network resource configuration in two or more independent physical nodes. Each configuration delivery controller independently delivers network configuration of different resource IDs. For the case of frequent configuration update, the number of configuration delivery controllers can be increased horizontally. The configuration delivery controller cluster processes configuration delivery in parallel, thereby increasing the scale of the cloud computing network that can be managed by the system.
[0066] The downstream component receives the configuration change request from the configuration delivery controller through the API interface. The change request contains the network resource ID, network resource version number, and network resource configuration content. When the local version number of the downstream component for the resource is lower than the version number in the request, the downstream component makes changes to the related network configuration according to the network resource configuration content and updates the local resource version number to return a successful response code. When the local version number of the downstream component for the resource is equal to or greater than the version number in the request, the local configuration is not updated and a successful response code is returned directly, thereby realizing automatic maintenance of the latest configuration.
[0067] When the downstream component fails, a failure code is returned, which contains the reason information of the failure and a flag indicating whether it can be retried. The downstream component and the configuration delivery controller are decoupled through the internal API, and the hierarchical interval retry of the configuration delivery controller can automatically deliver the latest configuration after service recovery when the downstream component is upgraded or temporarily fails, thereby ensuring the correct delivery of network configuration.
[0068] To sum up, in the cloud computing configuration delivery system, there are an API service component, a message component cluster, a configuration delivery controller and a downstream component. At this time, the configuration delivery controller can obtain a target number of configuration update messages from the message component cluster according to a message queue level. The configuration update message is generated by the API service component after receiving a network change request according to a network resource ID and a version number. At this time, the configuration delivery controller merges each configuration update message according to the network resource ID and the version number, thereby obtaining a merged configuration update message. At this time, the configuration delivery controller delivers the network configuration resource to the downstream component according to the merged configuration update message, thereby changing the network configuration. In the above scheme, the configuration message is bound with the version number, thereby ensuring the ordered delivery of the cloud computing network resource configuration, avoiding the configuration error caused by the out-of-order concurrent configuration delivery, and ensuring the correct network configuration.
[0069] Figure 6 is a method flow chart of a network configuration delivery method according to an exemplary embodiment. The method is applied to the cloud computing configuration delivery system as shown in Figure 1 The method is executed by the configuration delivery controller in the cloud computing configuration delivery system as shown in Figure 1 As shown in Figure 3 The network configuration delivery method can include the following steps:
[0070] Step 601, obtaining a target number of configuration update messages from the message component cluster according to a message queue level.
[0071] The configuration update message is generated by the API service component after receiving a network change request according to a network resource ID and a version number.
[0072] Optionally, the message component cluster includes queues of different priorities, and the priority of the queue in which the API service component generates the configuration update message is higher than the priority of the queue in which the configuration update message that fails to be sent and waits to be resent.
[0073] That is, the priority of the configuration update message newly generated by the API service component in the message component cluster is relatively higher, and the configuration delivery controller will preferentially obtain it. When the message component cluster does not have the configuration update message newly generated by the API service component, the configuration delivery controller will try to obtain the configuration update message that waits to be resent.
[0074] Step 602, merging each configuration update message according to a network resource ID and a version number, thereby obtaining a merged configuration update message.
[0075] Specifically, the configuration delivery controller can determine the configuration update message with the largest version number as the merged configuration update message for each network resource ID.
[0076] Due to the cloud computing configuration issuing system involved in the present application, multiple network change requests can be received and processed in parallel, and therefore there can be configuration update messages for the same network resource ID, in which case the configuration issuing controller only needs to save the configuration update message with the latest version number.
[0077] Optionally, before merging the configuration update messages, the configuration update messages need to be verified, and abnormal configuration update messages need to be discarded.
[0078] Step 603: issuing the network configuration resource to the downstream component according to the merged configuration update message to change the network configuration.
[0079] Optionally, when it is detected that the configuration update message fails to be sent, a retransmission operation is triggered; and when the retransmission number of the configuration update message reaches a threshold, the configuration update message is returned to the queue of the configuration update messages waiting for retransmission in failure in the message component cluster.
[0080] Please refer to Figure 7 , which shows a cloud computing network configuration issuing process involved in an embodiment of the present application. As shown in Figure 7 , the cloud computing network configuration issuing process involved in an embodiment of the present application can be jointly executed by various components in the cloud computing network configuration issuing system as shown in Figure 1 , including the following steps:
[0081] Step 1: the API service component receives a network change request, locks a single resource to update the business configuration into a database, and generates a network resource update message with a strictly increasing version number according to the network resource ID.
[0082] Step 2: the API service component puts the message into the 0-level message queue of the message component corresponding to the resource type for caching.
[0083] Step 3: the message receiving module of the configuration issuing controller acquires a specific number of configuration update messages from the message component according to the message queue level, and preferentially acquires the messages in the queue with a high priority and delays the acquisition of the messages in the queue with a low priority.
[0084] Step 4: the message receiving module of the configuration issuing controller verifies the message content, discards the abnormal message and reports an error.
[0085] Step 5: the message merging module of the configuration issuing controller merges the messages according to the resource ID+version number to generate a configuration issuing cache.
[0086] Step 6: The interface calling module of the configuration delivery controller calls the interface of the downstream component according to the merged message cache to perform configuration delivery, confirms the successfully delivered messages, locally retries the failed messages, and adds the messages exceeding the upper limit of the number of calling failures of the node to the corresponding level of the failure message queue for subsequent retry.
[0087] Step 7: Complete the current configuration delivery.
[0088] In actual operation, the front-end network API component is configured to receive user operation requests on network resources, store network data to a database, and place network configuration update messages generated by network configuration into a message queue. Kafka is used as a message queue component, a 3-node Kafka cluster is deployed to ensure high availability and performance, messages from the front-end network API component are received, message distribution is performed according to topics and nodes, and network configuration messages are distributed to the configuration delivery controller. The configuration delivery controller and each module thereof are implemented using the Go programming language, message receiving, merging, interface calling, and message sending are implemented, and the Go-implemented configuration delivery controller runs on two or more physical server nodes. The interface calling module is configured to connect to a network switch through SSH and perform configuration delivery. The network switch, as a downstream component, receives the request of the interface calling module, updates the forwarding configuration, and completes data forwarding according to the new configuration.
[0089] To sum up, in the cloud computing configuration delivery system, there are an API service component, a message component cluster, a configuration delivery controller, and a downstream component. At this time, the configuration delivery controller can obtain a target number of configuration update messages from the message component cluster according to the message queue level. The configuration update messages are generated by the API service component after receiving network change requests according to network resource IDs and version numbers. The configuration delivery controller then merges each configuration update message according to the network resource ID and the version number to obtain a merged configuration update message. The configuration delivery controller then delivers the network configuration resource to the downstream component according to the merged configuration update message to change the network configuration. In the above scheme, the configuration message is bound with the version number to ensure the ordered delivery of the cloud computing network resource configuration, avoid configuration errors caused by out-of-order concurrent configuration delivery, and ensure the correctness of the network configuration.
[0090] In the embodiments of the present application, a network configuration delivery device is also provided, which is used to implement the above embodiments and preferred embodiments, and details are not repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware or a combination of software and hardware is also possible and is contemplated.
[0091] The embodiment of the present application provides a network configuration issuing device, Figure 8 is a structural schematic diagram of a network configuration issuing device provided by the embodiment of the present application, the device is applied to a cloud computing configuration issuing system, the system comprises an API service component, a message component cluster, a configuration issuing controller and a downstream component, the device is arranged in the configuration issuing controller, and the device comprises:
[0092] A receiving unit 801 is configured to acquire a target number of configuration update messages from the message component cluster according to a message queue level; the configuration update message is generated by the API service component according to a network resource ID and a version number after receiving a network change request;
[0093] A merging unit 802 is configured to merge each configuration update message according to the network resource ID and the version number to obtain a merged configuration update message.
[0094] An issuing unit 803 is configured to issue a network configuration resource to the downstream component according to the merged configuration update message, so as to change the network configuration.
[0095] In a possible implementation, the message component cluster comprises queues of different priorities, and the priority of the queue in which the API service component generates the configuration update message is higher than the priority of the queue in which the configuration update message that fails to be sent and waits to be re-sent.
[0096] In a possible implementation, the device further comprises:
[0097] A checking unit is configured to check the configuration update messages and discard an abnormal configuration update message.
[0098] In a possible implementation, the merging unit is further configured to determine, for each network resource ID, a configuration update message with the largest version number as the merged configuration update message.
[0099] In a possible implementation, the issuing unit is further configured to trigger a re-sending operation when detecting that the configuration update message fails to be sent, and return the configuration update message to the queue of the configuration update message that fails to be sent and waits to be re-sent in the message component cluster when the re-sending number of the configuration update message reaches a threshold.
[0100] Further function descriptions of the above various modules and units are the same as those of the above corresponding embodiments, and will not be described here again.
[0101] In this embodiment, the network configuration distribution device is presented in the form of a functional unit. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.
[0102] This invention also provides a computer device having the above-described features. Figure 8 The network configuration distribution device shown.
[0103] Please see Figure 9 , Figure 9 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of the present invention, such as... Figure 9 As shown, the computer device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information in a graphical user interface on an external input / output device (such as a display device coupled to the interface). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 9 Take a processor 10 as an example.
[0104] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.
[0105] The memory 20 stores instructions executable by at least one processor 10 to cause the at least one processor 10 to perform the method shown in the above embodiments.
[0106] The memory 20 can include a program storage area and a data storage area. The program storage area can store an operating system, application programs required for at least one function, etc. The data storage area can store data created by the computer device, etc. In addition, the memory 20 can include a high-speed random access memory, and can also include a non-transitory memory such as at least one disk storage device, a flash memory device, or other non-transitory solid state memory device. In some alternative embodiments, the memory 20 can optionally include memory that is remotely located with respect to the processor 10, and which can be connected to the computer device through a network. Examples of such networks include, but are not limited to, the Internet, an enterprise intranet, a local area network, a mobile communications network, and combinations thereof.
[0107] The memory 20 can include a volatile memory, such as a random access memory, and / or can include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid state memory device. The memory 20 can also include an array of memories of the same kind or of different kinds.
[0108] The computer device also includes a communications interface 30 for communicating with other devices or communications networks.
[0109] The embodiments of the present application also provide a computer readable storage medium, and the method according to the embodiments of the present application can be implemented in hardware, firmware, or as software code that can be recorded in a storage medium or downloaded from a network and stored in a remote storage medium or a non-transitory machine readable storage medium and then stored in a local storage medium, so that the method described herein can be processed by such software using a general purpose computer, a special purpose processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, or a solid state disk, etc. Further, the storage medium can also include a combination of the above-mentioned kinds of memories. It can be understood that the computer, the processor, the microprocessor controller, or the programmable hardware includes a storage component that can store or receive software or computer code, when the software or computer code is accessed and executed by the computer, the processor, or the hardware, the method shown in the above embodiments is implemented.
[0110] Part of the present application can be applied as a computer program product, for example, computer program instructions, when executed by a computer, through the operation of the computer, can invoke or provide the method and / or technical solutions according to the present application. Those skilled in the art should understand that the form of computer program instructions in computer readable medium includes but is not limited to source files, executable files, installation package files and the like, and accordingly, the way of computer program instructions executed by computer includes but is not limited to: the computer directly executes the instructions, or the computer compiles the instructions and then executes the corresponding compiled program, or the computer reads and executes the instructions, or the computer reads and installs the instructions and then executes the corresponding installed program. Here, the computer readable medium can be any available computer readable storage medium or communication medium accessible to the computer.
[0111] Although the embodiments of the present application are described in conjunction with the drawings, various modifications and changes can be made by those skilled in the art without departing from the spirit and scope of the present application, and such modifications and changes fall within the scope defined by the present application.
Claims
1. A method for distributing network configurations, characterized in that, The method is applied to a cloud computing configuration distribution system, which includes an API service component, a message component cluster, a configuration distribution controller, and downstream components. The method is executed by the configuration distribution controller and includes: According to the message queue level, a target number of configuration update messages are obtained from the message component cluster; the configuration update messages are generated by the API service component after receiving a network change request, based on the network resource ID and version number; wherein, the API service component reads the existing network configuration from the database cluster according to the network change request, locks the row corresponding to the network resource in the database through a database transaction, acquires the lock from the database transaction, modifies the row corresponding to the network resource, increments the version number by one, generates a configuration update message based on the network resource ID and the incremented version number, and submits the transaction to release the database row lock of the resource so that the database can store the network resource configuration; Based on the network resource ID and version number, the various configuration update messages are merged to obtain the merged configuration update message; wherein, for each network resource ID, the configuration update message with the largest version number is determined as the merged configuration update message; The network configuration resources are distributed to downstream components based on the merged configuration update message to make changes to the network configuration.
2. The method according to claim 1, characterized in that, The message component cluster includes queues with different priorities. The priority of the queue for generating configuration update messages by the API service component is higher than the priority of the queue for configuration update messages that have failed to be sent and are waiting to be resent.
3. The method according to claim 2, characterized in that, Before merging the various configuration update messages based on the network resource ID and version number, the method further includes: Verify each configuration update message and discard any abnormal configuration update messages.
4. The method according to claim 1, characterized in that, The step of distributing network configuration resources to downstream components according to the merged configuration update message includes: When the failure to send the configuration update message is detected, a retransmission operation is triggered; When the number of retransmissions of the configuration update message reaches a threshold, the configuration update message is returned to the queue of failed configuration update messages waiting to be retransmitted in the message component cluster.
5. A cloud computing configuration distribution system, characterized in that, The system includes an API service component, a message component cluster, a configuration distribution controller, and downstream components. The API service component is used to receive network change requests, generate configuration update messages according to the network resource ID and version number in the network change request, and send them to the message component cluster. Specifically, the API service component reads existing network configuration from the database cluster based on the network change request, locks the corresponding row of the network resource in the database through a database transaction, acquires the lock from the database transaction, modifies the corresponding row of the network resource, increments the version number, generates a configuration update message based on the network resource ID and the incremented version number, and submits the transaction to release the database row lock on the resource so that the database can store the network resource configuration. The configuration distribution controller is used to obtain a target number of configuration update messages from the message component cluster according to the message queue level; merge the configuration update messages according to the network resource ID and version number to obtain the merged configuration update message; and distribute the network configuration resources to downstream components according to the merged configuration update message; wherein, for each network resource ID, the configuration update message with the largest version number is determined as the merged configuration update message. The downstream component is used to change the network configuration based on the network configuration resources.
6. The system according to claim 5, characterized in that, The configuration distribution controller also includes: The message receiving module is used to obtain a target number of configuration update messages from the message component cluster according to the message queue level; The message merging module is used to merge various configuration update messages based on the network resource ID and version number to obtain the merged configuration update message. The interface call module is used to distribute network configuration resources to downstream components based on the merged configuration update message; The interface call module is also used to trigger a retransmission operation when the failure to send the configuration update message is detected. The message sending module returns the configuration update message to the queue of failed configuration update messages waiting to be resent in the message component cluster when the number of resentments of the configuration update message reaches a threshold.
7. A network configuration distribution device, characterized in that, The device is applied to a cloud computing configuration distribution system, which includes an API service component, a message component cluster, a configuration distribution controller, and downstream components. The device is located within the configuration distribution controller and includes: The receiving unit is used to obtain a target number of configuration update messages from the message component cluster according to the message queue level; the configuration update message is generated by the API service component after receiving the network change request, according to the network resource ID and version number; wherein, the API service component reads the existing network configuration from the database cluster according to the network change request, locks the row corresponding to the network resource in the database through the database transaction, acquires the lock from the database transaction, modifies the row corresponding to the network resource, increments the version number by one, generates a configuration update message according to the network resource ID and the version number after the increment operation, and submits the transaction to release the database row lock of the resource so that the database can store the network resource configuration; The merging unit is used to merge various configuration update messages according to the network resource ID and version number to obtain the merged configuration update message; wherein, for each network resource ID, the configuration update message with the largest version number is determined as the merged configuration update message. The distribution unit is used to distribute network configuration resources to downstream components according to the merged configuration update message, so as to make changes to the network configuration.
8. A computer device, characterized in that, include: A memory and a processor are communicatively connected, the memory stores computer instructions, and the processor executes the network configuration distribution method according to any one of claims 1 to 4 by executing the computer instructions.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to execute the network configuration distribution method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Business processing method and system, computer equipment and readable medium
CN111431730A
Network controller message processing method and system
CN116361016A