Network configuration data distribution method and device, computer equipment and storage medium
By generating configuration logs in the SDN cloud network and migrating the storage cluster, the problem of low network configuration data distribution efficiency caused by high latency between the controller and the switch is solved, and efficient network configuration data distribution is achieved.
Patent Information
- Application Number
- CN202311558278.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-21
- Publication Date
- 2025-05-23
AI Technical Summary
In an SDN-based cloud network, high communication latency between the controller and the switch results in inefficient issuance of network configuration data.
By generating a configuration log corresponding to a network change request and writing it to the first storage cluster, after triggering a compression event, the compressed historical configuration log obtains the stock configuration data and migrates it to the second storage cluster. For changing network spaces, the associated target inventory configuration data is obtained from the stock configuration data, the associated target incremental configuration data is obtained from the incremental configuration data, and the target full configuration data is merged into the target full configuration data, and sent to the network space to update the network configuration.
With the assistance of the storage cluster, the asynchronous issuance and on-demand issuance of network configuration data is realized, which reduces the communication overhead between different planes in the network, improves the concurrent processing capability, ensures that the communication delay is within milliseconds, and improves the issuance efficiency of network configuration data.
Smart Images

Figure CN120034426A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the fields of cloud computing technology and network technology, and in particular to a method, apparatus, computer equipment, storage medium and computer program product for distributing network configuration data. Background Art
[0002] With the development of cloud computing and virtualization technology, virtual networks based on software defined network (SDN) technology can be deployed in cloud networks to realize the virtualization of network resources. Users can manage private virtual networks (Virtual Private Cloud, VPC) through SDN to achieve network configuration management of IP addresses, subnets, routing tables, network access control lists, flow logs and other functions.
[0003] In the related SDN-based network configuration technology, although the network configuration information of network devices can be centrally controlled through the programmable control plane, the controller needs to communicate with the switch frequently, such as sending flow tables, querying status, etc. If the communication delay between the controller and the switch is high, it will cause transmission delays in control messages and extend network response time, resulting in low efficiency in sending network configuration data. Summary of the invention
[0004] Based on this, it is necessary to provide a method, apparatus, computer device, computer-readable storage medium and computer program product for distributing network configuration data, which can improve the efficiency of sending network configuration data, in order to solve the above technical problems.
[0005] On the one hand, the present application provides a method for distributing network configuration data, comprising:
[0006] In the case of receiving a network change request, generating a configuration log corresponding to the network change request, and writing the configuration log to the first storage cluster; the network change request is used to indicate that the network configuration of at least one network space has changed;
[0007] If the configuration log written to the first storage cluster triggers a compression event, determining a historical configuration log based on the configuration log that triggers the compression event, and compressing the historical configuration log to obtain stock configuration data;
[0008] Migrating the existing configuration data to the second storage cluster; after the compression event, the newly added configuration log in the first storage cluster is the incremental configuration data;
[0009] For the changed network space, acquiring the associated target stock configuration data from the stock configuration data, and acquiring the associated target incremental configuration data from the incremental configuration data;
[0010] The target existing configuration data and the target incremental configuration data are sent to the network space as target full configuration data; the sent full configuration data is used to update the network configuration of the network space.
[0011] On the other hand, the present application also provides a network configuration data distribution device, including:
[0012] A generating module, configured to generate a configuration log corresponding to a network change request upon receiving the network change request, and write the configuration log to a first storage cluster; the network change request is used to indicate that a network configuration of at least one network space has changed;
[0013] a compression module, configured to, if the configuration log written to the first storage cluster triggers a compression event, determine a historical configuration log based on the configuration log that triggered the compression event, and compress the historical configuration log to obtain stock configuration data;
[0014] A migration module, configured to migrate the existing configuration data to a second storage cluster; after the compression event, the newly added configuration log in the first storage cluster is incremental configuration data;
[0015] An acquisition module, for acquiring, for a changed network space, associated target stock configuration data from the stock configuration data, and associated target incremental configuration data from the incremental configuration data;
[0016] The sending module is used to use the target existing configuration data and the target incremental configuration data as target full configuration data; the sent full configuration data is used to update the network configuration of the network space.
[0017] On the other hand, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0018] In the case of receiving a network change request, generating a configuration log corresponding to the network change request, and writing the configuration log to the first storage cluster; the network change request is used to indicate that the network configuration of at least one network space has changed;
[0019] If the configuration log written to the first storage cluster triggers a compression event, determining a historical configuration log based on the configuration log that triggers the compression event, and compressing the historical configuration log to obtain stock configuration data;
[0020] Migrating the existing configuration data to the second storage cluster; after the compression event, the newly added configuration log in the first storage cluster is the incremental configuration data;
[0021] For the changed network space, acquiring the associated target stock configuration data from the stock configuration data, and acquiring the associated target incremental configuration data from the incremental configuration data;
[0022] The target existing configuration data and the target incremental configuration data are sent to the network space as target full configuration data; the sent full configuration data is used to update the network configuration of the network space.
[0023] On the other hand, the present application also provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
[0024] In the case of receiving a network change request, generating a configuration log corresponding to the network change request, and writing the configuration log to the first storage cluster; the network change request is used to indicate that the network configuration of at least one network space has changed;
[0025] If the configuration log written to the first storage cluster triggers a compression event, determining a historical configuration log based on the configuration log that triggers the compression event, and compressing the historical configuration log to obtain stock configuration data;
[0026] Migrating the existing configuration data to the second storage cluster; after the compression event, the newly added configuration log in the first storage cluster is the incremental configuration data;
[0027] For the changed network space, acquiring the associated target stock configuration data from the stock configuration data, and acquiring the associated target incremental configuration data from the incremental configuration data;
[0028] The target existing configuration data and the target incremental configuration data are sent to the network space as target full configuration data; the sent full configuration data is used to update the network configuration of the network space.
[0029] On the other hand, the present application also provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0030] In the case of receiving a network change request, generating a configuration log corresponding to the network change request, and writing the configuration log to the first storage cluster; the network change request is used to indicate that the network configuration of at least one network space has changed;
[0031] If the configuration log written to the first storage cluster triggers a compression event, determining a historical configuration log based on the configuration log that triggers the compression event, and compressing the historical configuration log to obtain stock configuration data;
[0032] Migrating the existing configuration data to the second storage cluster; after the compression event, the newly added configuration log in the first storage cluster is the incremental configuration data;
[0033] For the changed network space, acquiring the associated target stock configuration data from the stock configuration data, and acquiring the associated target incremental configuration data from the incremental configuration data;
[0034] The target existing configuration data and the target incremental configuration data are sent to the network space as target full configuration data; the sent full configuration data is used to update the network configuration of the network space.
[0035] The above-mentioned method, device, computer equipment, storage medium and computer program product for distributing network configuration data, first, in the case of receiving a network change request, generate a configuration log corresponding to the network change request and write it to the first storage cluster, so that the simplified transmission and storage of network configuration data can be achieved through a configuration log with a unified format, which can reduce the computing resource consumption of data parsing and data matching, and improve the transmission efficiency of the configuration log in the entire network. Afterwards, if it is detected that the configuration log triggers a compression event, the historical configuration log is determined based on the configuration log that triggers the compression event, the historical configuration log is compressed to obtain the stock configuration data, and the stock configuration data is migrated to the second storage cluster. After the compression event, the newly added configuration log in the first storage cluster is the incremental configuration data. In this way, the storage separation of the stock configuration data and the incremental configuration data can be achieved based on different storage clusters, and the storage space consumption of the first storage cluster is reduced on the premise of ensuring the consistency of the network configuration data through the first storage cluster, and the efficiency of the first storage cluster is improved. At the same time, for the changed network space, the associated target stock configuration data is obtained from the stock configuration data, and the associated target incremental configuration data is obtained from the incremental configuration data. Then, the target stock configuration data and the target incremental configuration data are used as the target full configuration data and sent to the network space to indicate the update of the network configuration of the network space. In this way, with the assistance of middleware such as storage clusters, the configuration log generation process can be decoupled from the sending process of the full configuration data determined based on the configuration log, and the asynchronous and on-demand sending of network configuration data can be realized, thereby reducing the communication overhead between different planes in the network, improving the concurrent processing capability, ensuring that the communication delay is within milliseconds, and improving the sending efficiency of network configuration data. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0037] Figure 1A-1B An architecture diagram of a network system based on SDN in one embodiment;
[0038] Figure 2 A structural diagram of a distribution system for network configuration data in one embodiment;
[0039] Figure 3 A schematic diagram of a flow chart of a method for distributing network configuration data in one embodiment;
[0040] Figure 4 A schematic diagram of a flow chart of a method for generating a configuration log in an embodiment;
[0041] Figure 5 A schematic diagram of a flow chart of a method for triggering a compression event in one embodiment;
[0042] Figure 6 A schematic diagram of a flow chart of configuring a log compression operation in one embodiment;
[0043] Figure 7 A schematic diagram of a flow chart of a method for generating a device configuration snapshot in one embodiment;
[0044] Figure 8 A schematic diagram of a process of initializing a target network space in one embodiment;
[0045] Fig. 9 A structural diagram of a distribution system for network configuration data in another embodiment;
[0046] Fig.10 A schematic diagram of a specific structure of a control plane in an embodiment;
[0047] Fig.11 A schematic diagram of a business data flow corresponding to a specific business scenario in an embodiment;
[0048] Fig.12 A schematic diagram of a flow chart of configuring a log compression operation in another embodiment;
[0049] Fig.13 A schematic diagram of the node changes of ZK during the compression process in an embodiment;
[0050] Fig.14A schematic diagram of a flow chart of a method for generating a device configuration snapshot in one embodiment;
[0051] Fig.15 A structural block diagram of a device for distributing network configuration data in one embodiment;
[0052] Fig.16 FIG. 4 is a diagram showing the internal structure of a controller in one embodiment. DETAILED DESCRIPTION
[0053] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0054] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.
[0055] 1) VPC (Virtual Private Cloud) is a dedicated cloud network space built based on cloud technology. It provides network services for users' resources in the cloud space and completely logically isolates different private networks.
[0056] 2) OpenFlow: It is a network communication protocol used for communication between controllers and forwarders in SDN architecture.
[0057] 3) Routing Table: It is a table used by network devices to make packet forwarding decisions. It records the best path to a specific network or host.
[0058] 4) Routing snapshot: It is the full routing table status of the entire SDN network at a certain point in time.
[0059] 5) Binlog: It is a "text message" used by the SDN controller to describe a change event that has occurred in a specified routing table, such as routing table A creating a routing rule or routing table B deleting a routing rule. This "text message" contains all the input information required to change the routing table entry. It has two important uses: on the one hand, it is used for data synchronization from the primary storage device to the secondary storage device, and on the other hand, it is used for data recovery. After restoring from the routing snapshot, all events recorded in the binlog will be re-executed to keep the data up to date.
[0060] Before explaining the present application, based on the above explanations of the terms and terms involved in the embodiments of the present application, the network architecture of SDN is explained. SDN is an implementation method of network virtualization based on the OpenFlow protocol. Its core point is to separate the control plane from the data plane of the network device, and to centrally control the network device through a programmable control plane, thereby realizing flexible management of network traffic. Specifically, Figure 1A In the SND network architecture diagram shown in the figure, the northbound interface is the interface for manufacturers or operators to access and manage the network, that is, the interface provided upward. The southbound interface is the interface for managing other manufacturers' network management or equipment (such as switching equipment), that is, the interface provided downward. Figure 1B The entire OpenFlow protocol architecture consists of a controller, an OpenFlow switch, and a secure channel. The SDN controller centrally controls the SDN network to implement the functions of the control layer; the OpenFlow switch is responsible for forwarding the data layer, and exchanges messages with the controller through a secure channel to implement functions such as table entry delivery and status reporting. The OpenFlow controller is located in the control layer of the SDN architecture and is the "brain" of the SDN. It guides the forwarding of network devices in the forwarding plane through the OpenFlow protocol. Among them, the OpenFlow controller can be the open source Open Day light (ODL). ODL is a modular, scalable, upgradeable, and multi-protocol controller framework developed based on SDN. It supports a variety of southbound protocol plug-ins and has strong northbound interface scalability.
[0061] In actual applications, in the above SDN network architecture, the controller based on the OpenFlow protocol may need to process multiple concurrent requests and events at the same time. If the controller's concurrent processing capability is insufficient, it may lead to performance degradation and increased latency. At the same time, due to the communication delay between the controller and the switch, the OpenFlow controller needs to communicate with the switch frequently, such as sending flow tables, querying status, etc. If the communication delay between the controller and the switch is high, it will cause transmission delays in control messages and extend network response time, resulting in low efficiency in sending network configuration data.
[0062] Based on this, the embodiment of the present application provides another network configuration data distribution system based on the SDN network architecture, see Figure 2 , Figure 2The structure diagram of a network configuration data distribution system in an embodiment is a middleware-based maintenance system for network configuration data in a control plane. The system includes upper-layer applications (various apps, etc.), a control plane, and a forwarding plane. The composition of the control plane of the present system is different from that of FIG1. In the above embodiment, the control plane includes a controller, a middleware, and each proxy node corresponding to a host in the forwarding plane. The middleware includes a secure channel component for transmitting configuration logs in the control plane, and a storage component for storing and managing network configuration data in the control plane. The storage component includes a first storage cluster for storing incremental configuration data and a second storage cluster for storing stock configuration data. The proxy nodes associated with each host in the forwarding plane have a "registration-callback" relationship with the first storage cluster in the storage middleware.
[0063] In some embodiments, based on Figure 2 In the system shown, when any proxy node accesses the system, it first registers the network space that its host machine is concerned about and the routing table name under the corresponding network space with the first storage cluster (that is, the first storage cluster can use a tree structure to store data, so the registration operation of the proxy node in the first storage cluster actually determines the storage path that it is concerned about in the first storage cluster). When the system is running, the controller receives a network change request triggered by an upper-layer application (the network change request is used to indicate that the network configuration of at least one network space has changed), calls the sub-process corresponding to the controller, generates a configuration log corresponding to the network change request, and writes the configuration log to the first storage cluster through the secure channel component. If the configuration log written to the first storage cluster triggers a compression event, the compression sub-process in the control plane is called, and the historical configuration log is determined based on the configuration log that triggers the compression event, and the historical configuration log is compressed to obtain the stock configuration data, and the stock configuration data is migrated to the second storage cluster; after the compression event, the newly added configuration log in the first storage cluster is the incremental configuration data; any proxy node detects the change of the incremental configuration data in the first storage cluster, and for the changed network space, obtains the associated target stock configuration data from the stock configuration data, and obtains the associated target incremental configuration data from the incremental configuration data; the target stock configuration data and the target incremental configuration data are used as the target full configuration data, and are sent to the changed network space to update the network configuration of the changed network space based on the target full configuration data.
[0064] In some embodiments, the controller may include one or more processors configured to implement functionality and / or execute instructions. The controller may be executed by one or more computing devices such as real or virtual servers. The controller may include, for example, a microprocessor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or an equivalent discrete or integrated logic circuit, or a combination of any of the foregoing devices or circuits. The controller may be various controllers provided by third-party manufacturers, such as VPCOSS, etc. As a message bus, the secure channel component may include message agent software executed by one or more computing devices, such as the open source message middleware ActiveMQ developed by the Apache Software Foundation, the open source message system project Apache Kafka, etc. The storage component may include an open source distributed application coordination service Zookeeper component, an Oracle Cluster Ready Service (CRS) component, etc.
[0065] It should be noted that the network configuration data distribution system provided in the embodiment of the present application implements the distribution of existing configuration data and corresponding incremental configuration data based on the middleware on the control plane, and can decouple the control plane's acceptance of concurrent requests and the direct communication between the control plane and the forwarding plane, thereby improving the control plane's concurrent processing capability, while ensuring that the communication delay between all control planes and forwarding planes is within milliseconds.
[0066] Next, we will continue to explain Figure 2 In an exemplary embodiment, the network configuration data distribution system implemented by the network configuration data distribution method is as follows: Figure 3 As shown, Figure 3 A schematic diagram of a method for distributing network configuration data in an embodiment of the present invention is shown in FIG. Figure 2 Taking the controller of the control plane in as an example, the method includes the following steps 302 to 306. Among them:
[0067] Step 302: upon receiving a network change request, generating a configuration log corresponding to the network change request and writing the configuration log to the first storage cluster; the network change request is used to indicate that a network configuration of at least one network space has changed.
[0068] In actual implementation, during the operation of the above-mentioned network configuration data distribution system, if a target event occurs that causes the network configuration of the entire system to change, a corresponding network change request will be generated. At this time, the network change request can be used to indicate that the network configuration of at least one network space in the entire system has changed. Among them, the target event that can cause the network configuration of the entire system to change can be adding a resource server to the network configuration data distribution system, modifying or deleting an existing resource server, or adding a load balancing service to the network configuration data distribution system, modifying or deleting the configuration information of the load balancing service, etc. This embodiment does not limit the specific form of the target event. It should be noted that the network change request carries all the network configuration information of the network configuration change, wherein the network configuration information can be routing configuration information.
[0069] The controller of the control plane receives a network change request that matches the target event. In order to facilitate the transmission and analysis of the network configuration information in the network change request, the controller can encapsulate the network configuration information in the network change request according to a preset log format, generate a configuration log corresponding to the network change request, and write it into the first storage cluster. Among them, the preset log format can be adapted to the data structure of the first storage cluster for data storage. If the data structure of the first storage cluster is in the form of a key-value pair, the network configuration information in the network change request can be encapsulated in the format of a key-value pair to obtain a configuration log. If the data structure of the first storage cluster for data storage is a tree structure, the network configuration information in the network change request can be encapsulated in the format of a storage path (similar to a file directory in a file system) to obtain a configuration log.
[0070] To explain the configuration log, the configuration log is a form of encapsulation for the changed network configuration information, that is, the changed network configuration information is encapsulated according to the preset log format to obtain the corresponding configuration log. The configuration log can be used as a "text message" to indicate the event that the network configuration has changed in the network space. Taking the network configuration information as routing configuration information as an example, the configuration log can be used as a "text message" for the event that the corresponding routing table has changed, such as routing table A creating a routing rule or routing table B deleting a routing rule. The "text message" contains all the input information required to change the routing table entry.
[0071] For example, binlog is used as the preset log format. Binlog is a log format similar to a file directory. Assume that a resource server with an address of ×××.×××.×.100 is added to the routing table VM under the network space VPC1, and its corresponding host machine IP address is ×.××.×××.100. The network configuration information is encapsulated in the binlog format, and the following configuration log can be obtained:
[0072] / BINLOG / VPC1 / VM / 1_INSERT_×××.×××.×.100_0_×.××.×××.100.
[0073] The first storage cluster is explained as a storage middleware that can provide consistency services, and has the ability to store, maintain and detect changes in the state of the stored network configuration data (such as new data or deletion), and broadcast changes in network configuration information in the form of messages. In an embodiment of the present application, the first storage cluster is used to centrally manage all configuration logs generated during the operation of the network configuration distribution system, including storage configuration logs, and real-time detection of changes in the state of the stored configuration logs to ensure the consistency of data in the system, thereby realizing data-based cluster management.
[0074] For example, in combination Figure 2 The first storage cluster can be a cluster built by the Zookeeper component. The Zookeeper component obtains the configuration log generated by the controller through the secure channel component, stores and manages the configuration log, and sends a message about the change of network configuration information to the proxy node with which it has a "registration-callback" relationship.
[0075] Step 304: If the configuration log written to the first storage cluster triggers a compression event, a historical configuration log is determined based on the configuration log that triggers the compression event, and the historical configuration log is compressed to obtain stock configuration data.
[0076] In actual implementation, since the scale of the first storage cluster directly affects the investment cost of the system, the configuration log in the first storage cluster can be compressed to reduce the consumption of storage cost in the first storage cluster. During the operation of the network configuration data distribution system, a compression subprocess for performing compression operation is started at the same time. The compression subprocess detects in real time whether the configuration log written to the first storage cluster can trigger a compression event. If the compression event is successfully triggered, the compression operation for the configuration log of the first storage cluster is performed. Whether the configuration log currently written to the first storage cluster can trigger a compression event is related to the log attribute of the configuration log. The log attribute of the configuration log can at least include the generation time of the configuration log, the change time point of the network configuration information indicated by the network change request associated with the configuration log, and the number of changes used to characterize the order of the configuration log in the configuration log set participating in this compression operation. If the time interval between the change time point of the configuration log and the operation time point of the last compression operation reaches the time length threshold, or if the number of changes in the configuration log reaches the preset number, it can be considered that the configuration log has triggered a compression event.
[0077] Among them, when the compression subprocess detects during its operation that at least one log attribute of the configuration log currently written to the first storage cluster has triggered a compression event for the configuration log, it starts to perform a compression operation. First, the historical configuration log is determined based on the configuration log that triggered the compression event, and then the historical configuration log is compressed. The compression result obtained is the full network configuration status of the distribution network of the entire network configuration information at the time point of the compression operation. The compression result can be used as the stock configuration data to participate in the subsequent network configuration data distribution operation. It should be noted that the historical configuration log is other historical configuration logs between the compression time points when the compression operation is performed in the first storage cluster. The number of compression operations can be one or more times.
[0078] The storage format of the stock configuration data is explained. The stock configuration data is usually stored in the form of key-value pairs, where the key can be composed of at least one of the routing table name, the space identifier of the network space, and the version information of the stock configuration data, and the value is a compressed configuration snapshot. That is, when performing network configuration based on the target full configuration data, the configuration snapshot is actually used as the basic data, and the corresponding configuration operations in the incremental configuration data are executed in order from low to high according to the version information of the incremental configuration data to complete the network configuration for the network space.
[0079] Step 306: Migrate the existing configuration data to the second storage cluster. After the compression event, the newly added configuration log in the first storage cluster is the incremental configuration data.
[0080] Regarding the incremental configuration data, the incremental configuration data is the configuration log added to the first storage cluster after the compression event. The incremental configuration data represents the change process of the network configuration of a specific network space and is a dynamic description. The existing configuration data represents the network configuration status at the compression time point and is a static description. The second storage cluster mainly provides storage capacity for storing existing configuration data. Compared with the first storage cluster, the storage cost and expansion cost of the second storage cluster are lower. In this way, through the second storage cluster that stores the existing configuration data and the first storage cluster that stores the incremental configuration data, the data can be stored separately and the utilization rate of the storage space can be maximized.
[0081] Step 308 , for the changed network space, obtain the associated target stock configuration data from the stock configuration data, and obtain the associated target incremental configuration data from the incremental configuration data.
[0082] In actual implementation, the network space has a network identifier, and each network space generally includes at least one routing table, and the routing table has a routing table name. Changes in the network space are essentially changes in the network configuration information in at least one routing table in the network space. The configuration log includes the network configuration information of at least one network space that has changed. Parsing the configuration log can not only determine the one or more network spaces that have changed, but also determine the target routing table in the network space where the network configuration information has changed. For each routing table in which the network configuration information has changed in the changed network space, the network identifier of the network space and the corresponding routing table name can be used as an index to obtain the target stock configuration data that matches the index from the stock configuration data in the second storage cluster, and at the same time, obtain the target incremental configuration data that matches the index from the incremental configuration data.
[0083] It should be noted that, for the configuration log that triggers the compression operation, after the compression operation, in order to ensure the correlation between the incremental configuration data corresponding to the routing table associated with the configuration log that triggers the compression operation in the first storage cluster and the existing configuration data corresponding to the routing table in the second storage cluster, the configuration log will also be retained in the first storage cluster. Therefore, after the first screening is performed from the incremental configuration data through the above-mentioned index to obtain the intermediate incremental configuration data, it is also necessary to remove the intermediate incremental configuration data with the same version information as the target existing configuration data from the intermediate incremental configuration data, so as to finally obtain the target incremental configuration data.
[0084] Step 310: send the target existing configuration data and the target incremental configuration data as the target full configuration data to the network space. The sent full configuration data is used to update the network configuration of the network space.
[0085] In actual implementation, the target stock configuration data and target incremental configuration data of the changed network space are sent to the changed network space as full configuration data through the proxy node associated with the changed network space. The full configuration data is used to update the network configuration of the changed network space.
[0086] In the above-mentioned method for distributing network configuration data, first, when a network change request is received, a configuration log corresponding to the network change request is generated and written to the first storage cluster, so that the simplified transmission and storage of network configuration data can be realized through the configuration log with a unified format, which can reduce the computing resource consumption of data parsing and data matching, and improve the transmission efficiency of the configuration log in the entire network. Afterwards, if it is detected that the configuration log triggers a compression event, the historical configuration log is determined based on the configuration log that triggers the compression event, and the historical configuration log is compressed to obtain the stock configuration data; the stock configuration data is migrated to the second storage cluster; after the compression event, the newly added configuration log in the first storage cluster is the incremental configuration data; in this way, the stock configuration data (also called cold data) is stored through the second storage cluster with low storage cost, and the first storage cluster is used to store hot data, that is, incremental configuration data, so that the storage separation of stock configuration data and incremental configuration data can be realized based on different storage clusters, that is, the separation of cold and hot data is realized, and the storage space consumption of the first storage cluster is reduced and the efficiency of the first storage cluster is improved on the premise of ensuring the consistency of network configuration data through the first storage cluster. At the same time, for the changed network space, the associated target stock configuration data is obtained from the stock configuration data, and the associated target incremental configuration data is obtained from the incremental configuration data; the target stock configuration data and the target incremental configuration data are used as the target full configuration data and sent to the network space. In this way, the asynchronous and on-demand sending of network configuration data can be realized, reducing the communication overhead between different planes in the network and improving the sending efficiency of network configuration data.
[0087] In some embodiments, Figure 4 As shown, when a network change request is received, a configuration log corresponding to the network change request is generated, including:
[0088] Step 402: When a network change request is received, the network change request is parsed to obtain at least one configuration parameter pair, where the configuration parameter pair includes a parameter name and a corresponding parameter value.
[0089] In actual implementation, the control plane parses the network change request and can obtain multiple configuration parameter pairs corresponding to each changed network space, each configuration parameter pair including a parameter name and a corresponding parameter value. It should be noted that the configuration parameter pairs in the network change request are different in different application scenarios, and the application scenarios at least include operations on sub-machines (such as adding a sub-machine, deleting a sub-machine, updating the next item corresponding to the sub-machine, that is, updating the host corresponding to the sub-machine) and operations on load balancing services.
[0090] For example, taking the application scenario of triggering a network change request as an addition operation for a sub-machine as an example, at this time, the control plane receives an addition request for a virtual cloud host (the sub-machine IP is ×××.×××.×.100), the host machine IP of which is ×.××.×××.100, the network space to which the host belongs is VPC1, and the corresponding network configuration space is VM. The network change request includes at least the following configuration parameter pairs:
[0091]
[0092] In another example, the control plane receives a network change request for a newly created load balancing service CLB under VPC1 (×××.×××.×.0 / 24), where vip: ×××.×××.×.200, creates a detector, protocol: TCP, vport: 80, and the backend host is bound to port 8080 of ×××.×××.×.100. The control plane parses the network change request and obtains at least one of the following configuration parameter pairs:
[0093]
[0094] Step 404: Obtain the configuration log format, and format each configuration parameter pair according to the configuration log format to obtain a configuration log corresponding to the network change request.
[0095] In actual implementation, in order to simplify the storage and transmission operations of multiple configuration parameter pairs, when generating a configuration log, the control plane can format all configuration parameter pairs in the network change request according to a preset configuration log format to obtain a corresponding configuration log.
[0096] Exemplarily, the preset configuration log format can be flexibly configured according to different business scenarios. For example, the configuration log format corresponding to the management sub-machine in step 302 is as follows:
[0097] / BINLOG / VPC / ROUTETABLE / BINLOGVERSION_ACTION_VMIP_REMOTETYPE_HO STIP
[0098] Based on the configuration log format, the configuration log in the network change request corresponding to the newly added slave in step 302 is:
[0099] / BINLOG / VPC1 / VM / 1_INSERT_×××.×××.×.100_0_×.××.×××.100.
[0100] The configuration log format corresponding to the load balancing scenario is as follows:
[0101] / BINLOG / VPC / ROUTETABLE / BINLOGVERSION_ACTION_PROTO_VIP_VPORT_RSIP_RSPORT_WEIGHT
[0102] Based on the configuration log format, at least one configuration log in the corresponding network change request is:
[0103] / BINLOG / VPC1 / SERVICE / 1_INSERT_TCP_×××.×××.×.200_80_×.××.×××.100_8080_100.
[0104] The above configuration log format is similar to the file directory in the file system, and there is a hierarchical relationship, that is, the first level is BINLOG, the second level is the VPC identifier, the third level is the ROUTETABLE identifier, etc. The configuration log with a hierarchical relationship can be adapted to the tree storage structure in the first storage cluster, and can improve the writing efficiency in the subsequent writing operations in the first storage cluster.
[0105] In the above embodiment, by encapsulating multiple configuration parameter pairs in the network change request to obtain a configuration log that can be transmitted or stored in a standard format, the storage and transmission of network configuration data can be simplified and the efficiency of operations based on the configuration log can be improved.
[0106] In some embodiments, the first storage cluster includes at least one storage node, and the storage node uses a tree structure to store data. Writing the configuration log to the first storage cluster includes: determining a target storage node from the first storage cluster; determining multiple sub-data in the configuration log, and parsing the hierarchical relationship between each sub-data; based on the hierarchical relationship, determining the storage path of the configuration log in the tree structure of the target storage node; and writing the configuration log to the target storage node according to the storage path.
[0107] In actual implementation, the first storage cluster is usually deployed in a distributed manner, including multiple storage nodes, which can store configuration logs based on a directory node tree similar to a file system. For any configuration log, the control plane first determines the target storage node for storing the configuration log, then determines multiple sub-data in the configuration log, where the sub-data are parameter values of the configuration parameter pairs included in the network change request, and determines the hierarchical relationship between the sub-data. According to the hierarchical relationship between the sub-data, the storage path corresponding to the hierarchical relationship is determined in the storage node, and the configuration log is written to the target storage node along the storage path, completing the operation of writing the configuration log to the first storage cluster.
[0108] In the above embodiment, the configuration log is written by utilizing the hierarchical relationship of sub-data in the configuration log and the relationship between the tree storage forms of the storage nodes, which can improve the efficiency of determining the storage path required for the configuration log, thereby improving the query efficiency.
[0109] The triggering method of the compression event is described below. In some embodiments, Figure 5 As shown, the control plane may also determine that a compression operation on the configuration log in the first storage cluster is triggered in the following manner:
[0110] Step 502: Obtain log attributes of the configuration log, where the log attributes include at least one of the following: change time point and change times.
[0111] In actual implementation, the log attributes of the configuration log include the change time point and the number of changes, wherein the change time point refers to the time point when the configuration log is written to the first storage cluster, and the number of changes refers to the number of times the first storage cluster receives the configuration log starting from 1 after the most recent compression operation. After each compression operation is performed, the number of times the configuration log is received is re-counted starting from 1.
[0112] Step 504: If the time interval between the change time point of the current configuration log and the change time point of the previous configuration log reaches the time length threshold, it is determined that the current configuration log written to the first storage cluster triggers a compression event.
[0113] In actual implementation, if the time interval between the latest configuration log change time point and the previous configuration log change time point reaches the time length threshold, it indicates that the latest configuration log triggers a compression event. For example, the last change is more than 24 hours.
[0114] Step 506: If the number of changes to the current configuration log is the preset number, it is determined that the current configuration log written to the first storage cluster triggers a compression event.
[0115] In actual implementation, a compression operation is performed every time the number of changes in the received configuration log reaches a preset number, such as performing compression once every one thousand times. The preset number is 1000 times, and each time a compression operation is triggered, the number of times is re-counted from 1. If the number of times the current configuration log is written to the first storage cluster for the 1000th time, the current configuration log triggers a compression event.
[0116] In the above embodiment, when judging whether the triggering condition of the compression operation is met, not only the timeliness of the compression operation can be guaranteed by the change time point of the configuration log, but also the number of configuration log changes can be guaranteed when the compression operation is triggered, thereby effectively reducing the number of executions of unsaturated compression operations, improving the saturation of each compression operation, and reducing the consumption of computing resources.
[0117] In some embodiments, Figure 6 As shown in the figure, the configuration log includes the routing table name of the changed network space. The historical configuration log is compressed to obtain the stock configuration data, including:
[0118] Step 602: Group historical configuration logs according to the routing table name to obtain at least one configuration log group.
[0119] In actual implementation, the changed network space includes at least one routing table name, and the routing table name can usually be set according to the business scenario of data (access traffic) forwarding.
[0120] For example, the routing table name VM in the / BINLOG / VPC1 / VM / 1_INSERT_×××.×××.×.100_0_×.××.×××.100 configuration log can be used to record the access traffic forwarding scenario when the sub-machine is created, modified, deleted, etc. By grouping the historical configuration logs according to the routing table name, at least one configuration log group can be obtained. For example, there is the following configuration log group obtained by grouping by the routing table name VM:
[0121] / BINLOG / VPC1 / VM / 1_INSERT_×××.×××.×.100_0_×.××.××.100
[0122] / BINLOG / VPC1 / VM / 2_UPDATE_×××.×××.×.100_0_×.××.××.100>×.××.××.101
[0123] / BINLOG / VPC1 / VM / 3_DELETE_×××.×××.×.100_0_×.××.××.101
[0124] Step 604: compress at least one configuration log group according to the target format to obtain at least one routing snapshot; the at least one routing snapshot is used to form the stock configuration data.
[0125] In actual implementation, after obtaining the configuration log group, in order to reduce the consumption of storage space, the configuration log group can be compressed to obtain the routing snapshot corresponding to each routing table name. The compression operation actually compresses multiple configuration logs with a time sequence relationship in the configuration log group into a routing snapshot with a target format. Since the configuration log describes the change process of the network configuration in the routing table indicated by the routing table name, after the compression operation, the final state of the network configuration in the routing table at the operation time point of the compression operation is obtained. For a routing table name, multiple routing snapshots with a time sequence relationship can be obtained, and the routing snapshot can be used to constitute the stock configuration data. Among them, the target format can be a key-value pair format, in which the key can be the routing table name, the space identifier of the network space to which the routing table belongs, and the version information of the last configuration log in the configuration log (which can be a version number), and the value is the final network configuration snapshot corresponding to the compression operation time point.
[0126] Continuing with the above example, the above configured log group is compressed in the form of "routing table name + VPC identifier + version number" as the key to obtain the following routing snapshot: "vm_vpc1_3: empty" or "vm_vpc2_3: ×××.××.×.110_0_××.××.×××.101".
[0127] In the above embodiment, the efficiency of the compression operation can be improved by grouping the configuration logs; the compression operation with the configuration log group as the granularity can also ensure the accuracy of the routing snapshot.
[0128] In some embodiments, the historical configuration logs in the configuration log group have a time sequence relationship. After the existing configuration data is migrated to the second storage cluster, in order to reduce the consumption of storage space in the first storage cluster, the configuration logs in the first storage cluster can also be configured to perform the following deletion operations: the configuration logs except the last configuration log in each configuration log group are taken as configuration logs to be deleted; and each log to be deleted is deleted from the first storage cluster.
[0129] In actual implementation, the configuration log group is divided based on the routing table name under the network space, that is, in the first storage cluster, a configuration log group can be determined by using "space identifier + routing table identifier" as the index. Among them, the space identifier is the identifier of the network space, indicating the uniqueness of the corresponding network space, and the routing table identifier is the identifier of the routing table, which can be the routing table name. The configuration log group is compressed to obtain the stock configuration data corresponding to the "space identifier + routing table identifier" and stored in the second storage cluster.
[0130] For the existing configuration data indicated by each "space identifier + routing table identifier" and the corresponding incremental configuration data, in order to realize the data merging operation between the two, since the configuration logs in the configuration log group have a time relationship, the last configuration log in the configuration log group can usually be used as the relationship configuration log that establishes the relationship between the two. Based on this, when performing the configuration log deletion operation in the configuration log group in the first storage cluster, other configuration logs in each configuration log group whose log generation time is lower than the generation time of the relationship configuration log are usually used as logs to be deleted, and all configuration logs to be deleted are deleted from the first storage cluster.
[0131] For example, there is a configuration log group with "VPC2 / VM" as the index:
[0132] / BINLOG / VPC2 / VM / 1_INSERT_×××.××.×.100_0_×.××.100.100
[0133] / BINLOG / VPC2 / VM / 2_INSERT_×××.××.×.110_0_××.××.100.101
[0134] / BINLOG / VPC2 / VM / 3_DELETE_×××.××.×.100_0_××.××.100.100
[0135] There is also a configuration log group indexed by "VPC1 / VM":
[0136] / BINLOG / VPC1 / VM / 1_INSERT_×××.×××.×.100_0_×.××.×××.100
[0137] / BINLOG / VPC1 / VM / 2_UPDATE_×××.×××.×.100_0_×.××.×××.100>×.××.100.101
[0138] / BINLOG / VPC1 / VM / 3_DELETE_×××.×××.×.100_0_×.××.×××.101
[0139] After compressing the above configuration log group, the corresponding routing snapshot is obtained:
[0140] vm_vpc1_3: empty
[0141] vm_vpc2_3:×××.××.×.110_0_×.××.×××.101
[0142] Then, " / BINLOG / VPC2 / VM / 3_DELETE_×××.××.×.100_0_××.××.×××.100" and " / BINLOG / VPC1 / VM / 3_DELETE_×××.×××.×.100_0_×.××.×××.101" are respectively used as the above-mentioned relationship configuration logs. In this way, after the configuration logs to be deleted in the two configuration log groups are deleted, the above-mentioned relationship configuration logs are retained in the first storage cluster.
[0143] The above-mentioned method for deleting configuration logs reduces the consumption of storage space in the first storage cluster by historical configuration logs, and at the same time maintains the closeness of the association relationship between the two storage clusters based on the highest version of the configuration log in each configuration log group connected to the existing configuration data in the first storage cluster.
[0144] In some embodiments, for the changed network space, the associated target stock configuration data is obtained from the stock configuration data, and the associated target incremental configuration data is obtained from the incremental configuration data, including: obtaining the network identifier of the changed network space and the target routing table name that has changed this time; obtaining the target stock configuration data that matches the network identifier and the target routing table name from the stock configuration data; and obtaining the target incremental configuration data that matches the network identifier and the target routing table name from the incremental configuration data.
[0145] In actual implementation, the stock configuration data includes the stock configuration data corresponding to multiple routing tables under multiple network spaces in the distribution system of the entire network configuration data. The target stock configuration data of the changed network space can be queried from the second storage cluster through the network identifier of the changed network space and the name of the target routing table that has changed this time as an index, and the target incremental configuration data corresponding to the changed network space can be queried from the first storage cluster. Among them, the target stock configuration data includes a routing snapshot of at least one changed routing table in the changed network space.
[0146] In the above embodiment, the information query efficiency can be improved by using the space identifier and the routing table name as an index for searching.
[0147] In some embodiments, the existing configuration data includes a routing table name and a version number, and target incremental configuration data that matches the network identifier and the target routing table name is obtained from the incremental configuration data, including: filtering out the incremental configuration data that matches the network identifier and the target routing table name from the incremental configuration data; determining the historical maximum version number in the target existing configuration data; and using the incremental configuration data whose version number is greater than the historical maximum version number in the filtered incremental configuration data as the target incremental configuration data.
[0148] In actual implementation, the stock configuration data includes the routing table name and version number. For the changed network space, determine one or more routing table names involved in the change, and use "network identifier + target routing table name" as the target index respectively. Filter out the incremental configuration data that matches the target index from the incremental configuration data. At the same time, determine the historical maximum version number in the target stock configuration data corresponding to the target index. Finally, the incremental configuration data with a version number greater than the historical maximum version number from the filtered incremental configuration data is used as the target incremental configuration data corresponding to the target index. For each target index, the corresponding target stock configuration data and target incremental configuration data can be obtained, and then the latest full configuration data of the changed network space can be obtained synchronously.
[0149] Exemplarily, for the changed network space vpc1, the name of the changed routing table is determined to be service, and the corresponding target stock configuration data service_vpc1_4:TCP_×××.×××.×.200_80_×.××.×××.100_8080_0 is found in the stock configuration data with "service_vpc1" as the index. The first routing table name is service, and the version number indicated by the first version information is 4. The target incremental configuration data with a version number greater than 4 under "vpc1 / service / " is found in the incremental configuration data.
[0150] In the above embodiment, for the network space that has changed, its target stock configuration data is first queried, and then the target incremental configuration data with a version number greater than the target stock configuration data is determined based on the target stock configuration data. This can improve the accuracy of obtaining incremental configuration data and improve the efficiency of synchronizing the full configuration data.
[0151] In some embodiments, the network space is associated with at least one proxy node, and the associated target stock configuration data is obtained from the stock configuration data, and the associated target incremental configuration data is obtained from the incremental configuration data, including: feeding back prompt information to at least one proxy node associated with the changed network space; obtaining the associated target stock configuration data from the stock configuration data, and obtaining the associated target incremental configuration data from the incremental configuration data through at least one proxy node.
[0152] In actual implementation, each network space is associated with at least one proxy node, which can be a virtual gateway device that realizes all the functions of the physical network device. The network device can be called a proxy node. The network devices produced by different network device manufacturers have different names, such as virtual cloud gateway vpcgw, Guowei series gateway Hbgw, NAT gateway Natgw, etc.
[0153] If the network space indicated in the network change event has a network configuration information change, a feedback prompt message is sent to the proxy node that is concerned about the network space. The feedback prompt message is to notify the proxy node that the network configuration information of the currently concerned network space has changed. At this time, the proxy node obtains the associated target stock configuration data from the stock configuration data and the associated target incremental configuration data from the incremental configuration data to synchronize the full configuration data of the changed network space.
[0154] For example, assuming that the proxy node pays attention to the changes in network configurations in the three network spaces of VPC1, VPC2, and VPC3, when the proxy node establishes a "registration-callback" relationship with the upstream first storage cluster, it will register detectors for the following three paths " / TVPC / VPC1 / VM / *, / TVPC / VPC2 / VM / *, / TVPC / VPC5 / VM / *" in the first storage cluster (the data structure is a tree structure). Watch, in this way, when there is a change in the node of any of the above three storage paths in the first storage component, a feedback prompt message will be sent to the proxy node, and the proxy node can pull down the information of the child nodes on the corresponding storage path to obtain the changed nodes, that is, the routing information under the changed network space. At the same time, the proxy component pulls the corresponding stock configuration data from the second storage component.
[0155] In some embodiments, Figure 7 As shown, for each proxy node, you can also generate its corresponding device configuration snapshot. The specific steps are as follows:
[0156] Step 702: for any proxy node, determine a target network space associated with the targeted proxy node.
[0157] In actual implementation, each proxy node of the control plane may be associated with at least one routing table in one or more target network spaces. The device configuration snapshot associated with the proxy node is determined by first determining the target network space associated with the proxy node.
[0158] Step 704: Based on the aggregation period, periodically perform an aggregation operation on the full configuration data of the target network space to obtain a device configuration snapshot.
[0159] In actual implementation, the control plane (specifically, it can be a process in the control plane used to associate storage components) can periodically perform aggregation operations on the full configuration data of one or more target network spaces that the proxy node is concerned about according to a preset aggregation period (such as 10 minutes), and the corresponding device configuration snapshot can be obtained. The device configuration snapshot includes the network configuration status information of one or more target network spaces managed by the proxy node at the generation time of the device configuration snapshot (that is, the operation time of the corresponding aggregation operation). At the same time, in order to reduce the consumption of storage space, only the most recent preset number (such as 5) of device configuration snapshots can be retained for each proxy node.
[0160] Exemplarily, taking an aggregation period of 10 minutes as an example, for any proxy node, a device configuration snapshot is generated every 10 minutes and stored in a corresponding external storage database.
[0161] Step 706 , in response to the restart operation of the proxy node, the network configuration of the target network space is initialized based on the device configuration snapshot obtained by the most recent aggregation.
[0162] In actual implementation, the device configuration snapshot obtained by the most recent aggregation associated with the proxy node that performs the restart operation is obtained. The device configuration snapshot includes the network configuration status information of one or more target network spaces managed by the proxy node at the generation time of the device configuration snapshot (that is, the operation time point of the corresponding aggregation operation).
[0163] For example, assuming that the agent node agent1 is concerned with the full routing delivery of the two vpcs vpc1 and vpc2, the device configuration snapshot content includes: snapshot data of all VMs in vpc1, all VMs in vpc2, all services in vpc1, all services in vpc2, and incremental data under the four storage paths " / TVPC / VPC1 / VM / *, / TVPC / VPC2 / VM / *, / TVPC / VPC1 / SERVICE / *, / TVPC / VPC2 / SERVICE / *".
[0164] The device configuration snapshot corresponding to each of the above proxy nodes can aggregate different routing tables of one or more network spaces together, and can improve the network configuration efficiency when performing network configuration initialization operations.
[0165] In some embodiments, Figure 8 As shown, in response to the restart operation of the proxy node, the network configuration of the target network space is initialized based on the device configuration snapshot obtained by the most recent aggregation, including:
[0166] Step 802: Determine a restart time point in response to a restart operation on the proxy node.
[0167] In actual implementation, after the proxy node is restarted, the source of the configuration data associated with the proxy node consists of two parts: one is the most recent device configuration snapshot before the restart time point, and the other is the full configuration data between the operation time point when the last aggregation operation was performed before the restart operation and the restart time point corresponding to the restart operation.
[0168] Step 804, determine the operation time point of the most recent aggregation operation, and obtain the time interval between the restart time point and the operation time point.
[0169] In actual implementation, since there are multiple proxy nodes, for the proxy node that performs the restart operation, the proxy component first determines the operation time point of the most recent aggregation operation performed on the proxy node. By determining the time interval between the restart time point and the operation time point, the full amount of configuration data generated within the time interval is determined.
[0170] Step 806, determining the full amount of configuration data generated by the target network space within the time interval.
[0171] In actual implementation, the proxy node that performs the restart operation manages one or more target network spaces, and the proxy component needs to determine the full configuration data generated by each target network space within the above time interval. The full configuration data generated for the target network space within the above time interval includes at least the stock configuration data associated with the target network space generated after the operation time point in the second storage cluster, and the incremental configuration data associated with the target network space generated after the operation time point in the first storage cluster.
[0172] Step 808 , based on the device configuration snapshot obtained by the most recent aggregation and the full amount of configuration data generated by the target network space within the time interval, the network configuration of the target network space is initialized.
[0173] In actual implementation, if the full amount of configuration data generated by the target network space within the time interval is zero, the device configuration snapshot obtained by the most recent aggregation can be directly used to initialize the network configuration of the target network space. If the full amount of configuration data generated by the target network space within the time interval is not zero, the network configuration of the target network space needs to be initialized in the order of the device configuration snapshot, the stock configuration data generated by the target network space within the time interval, and the incremental configuration data generated by the target network space within the time interval.
[0174] For example, if the proxy node restarts at 17:40, and the latest device configuration snapshot is 1730, the proxy component will merge all the network configuration changes of the vpc that the proxy node needs to pay attention to between 17:30 and 17:40 into 1730, generate a new device configuration snapshot, and the snapshot name can be recorded as 1740, which will be continuously updated. After the proxy node restarts, it will first load the latest version 1740.
[0175] In the above embodiment, based on the snapshot of device granularity, the routing configuration of the corresponding network space can be quickly completed when the proxy node is restarted, thereby improving the configuration efficiency.
[0176] To explain the method for distributing network configuration data in this solution in detail, an embodiment is used as an example below. In this embodiment, the network system architecture of the network configuration data distribution system is as follows: Fig. 9 The system structure is as described above. Figure 2 The example structure diagram of the network configuration data distribution system in the above embodiment is shown. In this embodiment, the network configuration data can be routing configuration data. The controller in the control plane in the system is Vpcoss provided by a third-party manufacturer. All network control instructions in the system are issued by it; the secure channel component in the middleware is implemented using the lightweight message bus Kafka, the first storage cluster is implemented through Zookeeper, and the second storage cluster is implemented through CRS. The configuration log generated by the controller (that is, the specific form of the aforementioned configuration log) is transmitted to the Zookeeper cluster through the secure channel. Based on Zookeeper, the new routing configuration of binlog (that is, the incremental configuration data in the previous text) is issued, and the existing routing snapshot (that is, the existing configuration data in the previous text) is implemented based on CRS. It can be understood that based on Fig. 9 The network configuration data distribution method implemented by the system structure shown is actually a distributed routing distribution method based on the SDN controller. This method can improve the concurrent processing capability of the controller and reduce the communication delay between the switch and the controller.
[0177] See also Fig.10 ,based on Fig.10The specific structure of the control plane shown illustrates the specific process of distributing network configuration data in this example: During the operation of the main process, a network change request is detected. The controller vpcoss, as a producer, generates a binlog (i.e., the configuration log in the previous text) that matches the network change request, and transmits the binlog in the form of a message through Kafka. The proxy process associated with the storage component writes the binlog to the ZK in the corresponding availability zone. After the binlog currently written to ZK triggers a compression event, a compression operation is performed to obtain a snapshot (i.e., the existing configuration data in the previous text) and store it in the CRS. The proxy node vpc-agent (vpc_agent_a, vpc_agent_b, etc. are shown in the figure) has a "registration-callback" relationship with ZK. When receiving a network configuration information change for the vpc it is concerned about from ZK, it first pulls the snapshot data from CRS, and then pulls the corresponding binlog information written after the compression event through the Watch mechanism of ZK, thereby synchronizing the full routing information required by the proxy node.
[0178] The following is an explanation of binlog generation in different business data processing scenarios, as an example: Fig.11 As shown in the figure, users log in to a third-party cloud console to purchase cloud hosts and other resources, or download cloud application program interfaces (APIs) to access the VPC system by calling the corresponding cloud API interfaces. Access components such as identity credentials (Security Token Service, STS), access management (Cloud Access Management, CAM) and cloud API frameworks assist users in logging into the cloud control platform. The controller focuses on business logic, that is, the controller is responsible for converting the network change requests issued by users into several binlog information (i.e., the configuration logs mentioned above), and writing the binlog information to Zookeeper through the middleware Kafka. Finally, vpc-agent pulls the changed binlog information through ZK's Watch mechanism to synchronize it to the full routing information, thereby controlling the associated network elements (including computing nodes and forwarding nodes) to make routing changes.
[0179] Based on the above application scenario, the user purchases a virtual cloud host (sub-machine IP: ×××.×××.×.100, and the physical host machine is: ×.××.×××.100) in VPC1 of the cloud console (the corresponding public network IP is ×××.×××.×.0 / 24). At this time, the controller Vpcoss sends a routing detail to the host machine of all VPC1 sub-machines in the local domain for route retrieval in the cloud host mutual access scenario in VPC1. This scenario mainly includes the following three parts: 1) Add a new route scenario; 2) Update the next hop of the route scenario; 3) Delete the route scenario.
[0180] Taking the above newly added route details as an example, the corresponding route table (route item) is as shown in Table 1:
[0181] VPC DST REMOTE VPC1 ×××.×××.×.100 ×.××.××.100
[0182] Table 1
[0183] The cloud network controller Vpcoss defines the following binlog template for the information in Table 1 (i.e. the configuration log format mentioned above):
[0184] / BINLOG / VPC / ROUTETABLE / BINLOGVERSION_ACTION_VMIP_REMOTETYPE_HOSTIP
[0185] The information of each parameter is as follows VPC: virtual network space, such as VPC1
[0186] ROUTETABLE: Routing table name Routetable, for example: VM
[0187] BINLOGVERSION: version number Binlogversion, digital self-increment ID
[0188] ACTION: Action type
[0189] VMIP: sub-machine IP is Vmip
[0190] REMOTETYPE: next hop type Remotetype
[0191] HOSTIP: Host IP, namely HostIp
[0192] Based on the above template, the binlog information for the newly added routing scenario is as follows:
[0193] / BINLOG / VPC1 / VM / 1_INSERT_×××.×××.×.100_0_×.××.×××.100
[0194] For the scenario of updating the next hop of the route, for example, the binlog information of the slave machine migrating from the source master machine ×.××.×××.100 to ×.××.×××.101 is as follows:
[0195] / BINLOG / VPC1 / VM / 2_UPDATE_×××.×××.×.100_0_×.××.×××.100>×.××.×××.101
[0196] The binlog information for deleting routes is as follows:
[0197] / BINLOG / VPC1 / VM / 3_DELETE_×××.×××.100_0_×.××.×××.101
[0198] As another example, taking the creation of a new CLB instance in VPC1 as an example, the user added a new CLB instance under VPC1 (public IP is ×××.×××.×.0 / 24), service address vip: ×××.×××.×.200, and created a detector, protocol: TCP, VPORT: 80, and the backend Real Server was bound to port 8080 of ×××.×××.×.100.
[0199] The corresponding routing information is shown in Table 2 below:
[0200]
[0201] Table 2
[0202] In actual applications, the following binlog template is pre-defined for the above routing table:
[0203] / BINLOG / VPC / ROUTETABLE / BINLOGVERSION_ACTION_PROTO_VIP_VPORT_RSI P_RSPORT_WEIGHT
[0204] Vpc: Vpc
[0205] Routetable: routing table name, for example: SERVICE
[0206] Binlogversion: version number, digital self-incrementing ID
[0207] Action: Action type
[0208] VIP: CLB service IP
[0209] Proto: protocol type
[0210] Rsip: The real IP address of the backend providing services
[0211] Rsport: the port of the real backend service
[0212] Weight: Weight
[0213] The controller generates binlog information for the following scenarios based on the above template:
[0214] 1) The CLB detector binds the first service instance:
[0215] / BINLOG / VPC1 / SERVICE / 1_INSERT_TCP_×××.×××.×.200_80_×.××.×××.100_8080_100
[0216] 2) Bind the second service instance
[0217] / BINLOG / VPC1 / SERVICE / 2_INSERT_TCP_×××.×××.×.200_80_×.××.×××..200_8888_50
[0218] 3) Reset the weight of the first RSIP to zero:
[0219] / BINLOG / VPC1 / SERVICE / 3_UPDATE_TCP_×××.×××.×.200_80_×.××.×××.100_8080_100>0
[0220] After generating binlogs corresponding to each business scenario based on the template, the controller writes the binlogs into Zookeeper to store and maintain the binlogs based on Zookeeper.
[0221] For the storage based on Zookeeper, the controller Vpcoss acts as a producer to output binlogs in the corresponding format according to different business scenarios and writes them to the message middleware Kafka. The process groups corresponding to the Proxy components in different downstream availability zones act as consumers to consume the above binlogs from Kafka and write them to the Zookeeper cluster in this availability zone. Since Zookeeper itself can provide data storage based on a directory node tree similar to the file system, it will eventually be constructed into a tree. The data format stored in Zookeeper is as follows:
[0222] / BINLOG / VPC1 / VM / 1_INSERT_×××.×××.×.100_0_×.××.×××.100
[0223] / BINLOG / VPC1 / VM / 2_UPDATE_×××.×××.×.100_0_×.××.×××.100>×.××.×××.101
[0224] / BINLOG / VPC1 / VM / 3_DELETE_×××.×××.×.100_0_×.××.×××.101
[0225] / BINLOG / VPC1 / SERVICE / 1_INSERT_TCP_×××.×××.×.200_80_×.××.×××.100_8080_100
[0226] / BINLOG / VPC1 / SERVICE / 2_INSERT_TCP_×××.×××.×.200_80_×.××.×××.200_8888_50
[0227] / BINLOG / VPC1 / SERVICE / 3_UPDATE_TCP_×××.×××.×.200_80_×.××.×××.100_8080_100>0
[0228] / BINLOG / VPC1 / SERVICE / 4_DELETE_TCP_×××.×××.×.200_80_×.××.×××.200_8888_50
[0229] / BINLOG / VPC2 / VM / 1_INSERT_×××.××.×.100_0_×.××.×××.100
[0230] / BINLOG / VPC2 / VM / 2_INSERT_×××.××.×.110_0_××.××.×××.101
[0231] / BINLOG / VPC2 / VM / 3_DELETE_×××.××.×.100_0_××.××.×××.100
[0232] What is certain is that binlog information is stored in Zookeeper in a tree structure, and the hierarchical relationship in the binlog information corresponds to the storage path in Zookeeper.
[0233] In actual implementation, in order to prevent the nodes on Zookeeper from growing infinitely, save Zookeeper's storage overhead, and reduce its investment cost, the control plane introduces compression logic for binlog to generate an independent snapshot for each route in each VPC. The compression of the snapshot is mainly divided into the following two trigger conditions: 1) The number of binlog changes, that is, one thousand times to generate a snapshot version; 2) binlog change events, that is, the last change exceeds twenty-four hours. If any of the above conditions is met, the controller will generate a snapshot data in the form of Key-Value: routing table name + Vpcid + version number and save it to the external storage CRS. The above Zookeeper tree will generate the following three key snapshot contents:
[0234] Key: vm_vpc1_3 Value: empty
[0235] The key is: vm_vpc2_3: The value is: ×××.××.×.110_0_××.××.×××.101
[0236] The key is: service_vpc1_4: The value is:
[0237] TCP_×××.×××.×.200_80_×.××.×××.100_8080_0
[0238] like Fig.12 As shown, Fig.12 This is the binlog compression operation flow chart provided by this embodiment. In addition to the main process, the control plane also includes a compression process, so that the execution of the corresponding control main process of the controller is not affected. The two processes are independent of each other and can be executed in parallel. If the binlog currently written to Zookeeper meets the above trigger conditions and triggers a compression event, the compression process pulls the secondary and tertiary node lists of Zookeeper. The secondary level is the VPC instance, and the tertiary level is the corresponding routing table name. At the same time, the watch is registered. The compression process detects whether the currently written binlog meets the compression conditions. If it does, the compression process is triggered, and the obtained routing snapshot is written to CRS. If it does not meet the conditions, the callback function callback is triggered when the node changes next time in Zookeeper, and the above-mentioned compression condition detection process is continued.
[0239] In actual implementation, during the compression process, the relevant nodes of Zookeeper will also be gradually deleted, such as Fig.13 As shown, Fig.13 This is a schematic diagram of the node changes of Zookeeper corresponding to the compression three times provided in this embodiment. After the removal operation, the final Zookeeper tree will be compressed and cleaned up, and only the following nodes will be retained:
[0240] / BINLOG / VPC1 / VM / 3_DELETE_×××.×××.×.100_0_×.××.×××.101
[0241] / BINLOG / VPC1 / SERVICE / 4_DELETE_TCP_×××.×××.×.200_80_×.××.×××.200_8888_50
[0242] / BINLOG / VPC2 / VM / 3_DELETE_×××.×××.×.100_0_××.××.×××.100
[0243] It should be noted that when performing a deletion operation, Zookeeper needs to retain the compression operation time point and the last binlog in each group of "VPC-routing table name" so as to merge it with the new routing information in the "VPC-routing table name" received after the operation time point.
[0244] In actual implementation, the forwarding plane needs to obtain the specified routing table of a VPC. The corresponding vpc-agent only needs to pull the snapshot from CRS first, then locate the specified offset from Zookeeper according to the version number, and sequentially merge all binlogs with a version number greater than the snapshot to synchronize the latest full route.
[0245] The above completes the minimum granularity snapshot generation of "VPC+routing table". In actual implementation, the controller can also perform another layer of aggregation based on the routing table items of the specific VPC required by the forwarding plane, and finally synthesize a snapshot of all routing table items of all VPCs that meet the needs of the forwarding plane, that is, the device routing snapshot (that is, the device configuration snapshot mentioned above). Fig.14 , Fig.14 This is a schematic diagram of a device routing snapshot provided in this embodiment, in which the full routing information of all VPCs (such as VPC1, VPC2, and VPC3) that the vpc-agent is concerned about is recorded.
[0246] Based on this, when the vpc-agent of the control plane is started, it will first pull the device routing snapshot and call the data delivery interface of the forwarding plane to initialize the routing table.
[0247] The application of the embodiments of the present application has the following beneficial effects:
[0248] 1) It is possible to improve the initialization speed of the full route. Table 2 is the verification result of the optimization of the initialization speed of the full route in the above embodiment:
[0249]
[0250]
[0251] Table 3
[0252] From the verification results shown in Table 3, it can be determined that the full routing initialization speed is optimized from the original 30 minutes to less than 3 minutes, which greatly improves the initialization efficiency.
[0253] 2) The original storage of routing table items is stored in Zookeeper. This example realizes the separation of cold (snapshot) and hot (binlog) data, reduces the number of znode nodes in Zookeeper, improves the efficiency of a single Zookeeper cluster, and reduces the support cost. The specific experimental verification results are shown in Table 4.
[0254] Related Programs This embodiment Optimized Total number of znodes 113,000,000 27,500,000 75.6%
[0255] Table 4
[0256] 3) It provides a new capability for fast route repair. If a route is missing on the forwarding plane, the controller only needs to find the corresponding binlog and replay it once to recover.
[0257] 4) The system architecture in this example reduces the fault domain from the original region level to the zone level. The data between the zones is redundant and can be backed up for each other.
[0258] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0259] Based on the same inventive concept, the embodiment of the present application also provides a network configuration data distribution device for implementing the above-mentioned network configuration data distribution method. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above-mentioned method, so the specific limitations in the embodiments of one or more network configuration data distribution devices provided below can refer to the limitations of the network configuration data distribution method above, and will not be repeated here.
[0260] In an exemplary embodiment, Fig.15 As shown, a network configuration data distribution device is provided, including: a generation module 1510, a compression module 1520, a migration module 1530, an acquisition module 1540 and a delivery module 1550, wherein:
[0261] The generation module is used to generate a configuration log corresponding to the network change request and write the configuration log to the first storage cluster when receiving the network change request, wherein the network change request is used to indicate that the network configuration of at least one network space has changed.
[0262] The compression module is used to determine the historical configuration log based on the configuration log that triggered the compression event, and compress the historical configuration log to obtain the stock configuration data if the configuration log written to the first storage cluster triggers the compression event.
[0263] The migration module is used to migrate the existing configuration data to the second storage cluster; after the compression event, the newly added configuration log in the first storage cluster is the incremental configuration data.
[0264] The acquisition module is used to acquire the associated target stock configuration data from the stock configuration data and acquire the associated target incremental configuration data from the incremental configuration data for the changed network space.
[0265] The sending module is used to send the target incremental configuration data and the target stock configuration data as the target full configuration data to the network space; the sent target full configuration data is used to update the network configuration of the network space.
[0266] In some embodiments, the generation module is also used to parse the network change request to obtain at least one configuration parameter pair when a network change request is received, and the configuration parameter pair includes a parameter name and a corresponding parameter value; obtain the configuration log format, and format each configuration parameter pair according to the configuration log format to obtain a configuration log corresponding to the network change request.
[0267] In some embodiments, the first storage cluster includes at least one storage node, and the storage node uses a tree structure to store data. The generation module is also used to determine the target storage node from the first storage cluster; determine multiple sub-data in the configuration log, and parse the hierarchical relationship between the sub-data; based on the hierarchical relationship, determine the storage path of the configuration log in the tree structure of the target storage node; and write the configuration log to the target storage node according to the storage path.
[0268] In some embodiments, the compression module is also used to obtain log attributes of the configuration log, and the log attributes include at least one of the following: change time point, change number; if the time interval between the change time point of the configuration log currently written and the change time point of the configuration log previously written reaches a time length threshold, it is determined that the current configuration log currently written to the first storage cluster has triggered a compression event; or, if the number of changes corresponding to the configuration log currently written reaches a preset number, it is determined that the current configuration log currently written to the first storage cluster has triggered a compression event.
[0269] In some embodiments, the configuration log includes the routing table name of the changed network space, and the compression module is also used to group the historical configuration logs according to the routing table name to obtain at least one configuration log group; according to the target format, at least one configuration log group is compressed separately to obtain at least one routing snapshot; at least one routing snapshot is used to constitute the existing configuration data.
[0270] In some embodiments, the historical configuration logs in the configuration log group have a time sequence relationship, and the compression module is further used to use the configuration logs except the last configuration log in each configuration log group as configuration logs to be deleted; and delete each log to be deleted from the first storage cluster.
[0271] In some embodiments, the acquisition module is also used to obtain the network identifier of the changed network space and the target routing table name that has changed this time; obtain the target existing configuration data that matches the network identifier and the target routing table name from the existing configuration data; and obtain the target incremental configuration data that matches the network identifier and the target routing table name from the incremental configuration data.
[0272] In some embodiments, the existing configuration data includes a routing table name and a version number, and the acquisition module is further used to filter out incremental configuration data that matches the network identifier and the target routing table name from the incremental configuration data; determine the historical maximum version number in the target existing configuration data; and use the incremental configuration data whose version number is greater than the historical maximum version number in the filtered incremental configuration data as the target incremental configuration data.
[0273] In some embodiments, the network space is associated with at least one proxy node, and the acquisition module is also used to feedback prompt information to at least one proxy node associated with the changed network space; through at least one proxy node, the associated target stock configuration data is obtained from the stock configuration data, and the associated target incremental configuration data is obtained from the incremental configuration data.
[0274] In some embodiments, the acquisition module is also used to determine, for any proxy node, a target network space that has an associated relationship with the targeted proxy node; based on an aggregation period, periodically perform aggregation operations on the full configuration data of the target network space to obtain a device configuration snapshot; in response to a restart operation of the targeted proxy node, initialize the network configuration of the target network space based on the device configuration snapshot obtained by the most recent aggregation.
[0275] In some embodiments, the acquisition module is also used to determine the restart time point in response to the restart operation of the proxy node; determine the operation time point of the most recent aggregation operation, and obtain the time interval between the restart time point and the operation time point; determine the full configuration data generated by the target network space within the time interval; initialize the network configuration of the target network space based on the device configuration snapshot obtained from the most recent aggregation and the full configuration data generated by the target network space within the time interval.
[0276] Each module in the above-mentioned network configuration data distribution device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0277] In an exemplary embodiment, a computer device corresponding to the controller is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Fig.16As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store network configuration data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for distributing network configuration data is implemented.
[0278] Those skilled in the art will understand that Fig.16 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0279] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0280] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0281] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0282] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0283] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0284] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0285] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for distributing network configuration data, It is characterized in that The method comprises: In the case of receiving a network change request, generating a configuration log corresponding to the network change request, and writing the configuration log to the first storage cluster; the network change request is used to indicate that the network configuration of at least one network space has changed; If the configuration log written to the first storage cluster triggers a compression event, determining a historical configuration log based on the configuration log that triggers the compression event, and compressing the historical configuration log to obtain stock configuration data; Migrating the existing configuration data to the second storage cluster; after the compression event, the newly added configuration log in the first storage cluster is the incremental configuration data; For the changed network space, acquiring the associated target stock configuration data from the stock configuration data, and acquiring the associated target incremental configuration data from the incremental configuration data; The target existing configuration data and the target incremental configuration data are used as target full configuration data and sent to the network space; the sent target full configuration data is used to update the network configuration of the network space.
2. The method according to claim 1, It is characterized in that The step of generating a configuration log corresponding to the network change request upon receiving the network change request includes: When receiving a network change request, parsing the network change request to obtain at least one configuration parameter pair, wherein the configuration parameter pair includes a parameter name and a corresponding parameter value; A configuration log format is obtained, and each of the configuration parameter pairs is formatted according to the configuration log format to obtain a configuration log corresponding to the network change request.
3. The method according to claim 1, It is characterized in that The first storage cluster includes at least one storage node, the storage node stores data in a tree structure, and the step of writing the configuration log to the first storage cluster includes: Determining a target storage node from the first storage cluster; Determine multiple sub-data in the configuration log, and analyze the hierarchical relationship between each sub-data; Based on the hierarchical relationship, determining a storage path of the configuration log in the tree structure of the target storage node; According to the storage path, the configuration log is written to the target storage node.
4. The method according to claim 1, It is characterized in that The method further comprises: Obtaining log attributes of the configuration log, wherein the log attributes include at least one of the following: change time point and change number; If the time interval between the change time point of the configuration log currently being written and the change time point of the configuration log previously written reaches the time length threshold, it is determined that the configuration log currently being written to the first storage cluster has triggered a compression event; or, If the number of changes corresponding to the configuration log currently being written reaches a preset number, it is determined that the configuration log currently being written to the first storage cluster triggers a compression event.
5. The method according to claim 1, It is characterized in that The configuration log includes the routing table name of the changed network space, and the compressing the historical configuration log to obtain the stock configuration data includes: Grouping the historical configuration logs according to the routing table name to obtain at least one configuration log group; The at least one configuration log group is compressed respectively according to the target format to obtain at least one routing snapshot; the at least one routing snapshot is used to form the stock configuration data.
6. The method according to claim 5, It is characterized in that The historical configuration logs in the configuration log group have a time sequence relationship. After migrating the stock configuration data to the second storage cluster, the method further includes: Taking the configuration logs except the last configuration log in each of the configuration log groups as configuration logs to be deleted; The logs to be deleted are deleted from the first storage cluster.
7. The method according to claim 1, It is characterized in that The step of acquiring, for the changed network space, associated target stock configuration data from the stock configuration data and associated target incremental configuration data from the incremental configuration data comprises: Obtain the network identifier of the changed network space and the name of the target routing table that has changed this time; Acquire target stock configuration data matching the network identifier and the target routing table name from the stock configuration data; From the incremental configuration data, target incremental configuration data matching the network identifier and the target routing table name is acquired.
8. The method according to claim 7, It is characterized in that The existing configuration data includes a routing table name and a version number, and the step of obtaining target incremental configuration data that matches the network identifier and the target routing table name from the incremental configuration data includes: Filtering out the incremental configuration data that matches the network identifier and the target routing table name from the incremental configuration data; Determine the historical maximum version number in the target stock configuration data; The incremental configuration data whose version number is greater than the historical maximum version number among the filtered incremental configuration data is used as the target incremental configuration data.
9. The method according to claim 1, It is characterized in that The network space is associated with at least one proxy node, and the obtaining of the associated target stock configuration data from the stock configuration data and the obtaining of the associated target incremental configuration data from the incremental configuration data include: Feedback prompt information to at least one proxy node associated with the changed network space; The at least one proxy node obtains the associated target stock configuration data from the stock configuration data, and obtains the associated target incremental configuration data from the incremental configuration data.
10. The method according to any one of claims 1 to 9, It is characterized in that The method further comprises: For any proxy node, determine a target network space associated with the targeted proxy node; Based on the aggregation period, periodically performing an aggregation operation on the full configuration data of the target network space to obtain a device configuration snapshot; In response to the restart operation of the proxy node, the network configuration of the target network space is initialized based on the device configuration snapshot obtained by the most recent aggregation.
11. The method according to claim 10, It is characterized in that In response to the restart operation of the proxy node, initializing the network configuration of the target network space based on the device configuration snapshot obtained by the most recent aggregation includes: In response to the restart operation on the proxy node, determining a restart time point; Determine the operation time point of the most recent aggregation operation, and obtain the time interval between the restart time point and the operation time point; Determine the full amount of configuration data generated by the target network space within the time interval; The network configuration of the target network space is initialized based on the device configuration snapshot obtained by the most recent aggregation and the full amount of configuration data generated by the target network space within the time interval.
12. A device for distributing network configuration data, It is characterized in that The device comprises: A generating module, configured to generate a configuration log corresponding to a network change request upon receiving the network change request, and write the configuration log to a first storage cluster; the network change request is used to indicate that a network configuration of at least one network space has changed; a compression module, configured to, if the configuration log written to the first storage cluster triggers a compression event, determine a historical configuration log based on the configuration log that triggered the compression event, and compress the historical configuration log to obtain stock configuration data; A migration module, configured to migrate the existing configuration data to a second storage cluster; after the compression event, the newly added configuration log in the first storage cluster is incremental configuration data; An acquisition module, for acquiring, for a changed network space, associated target stock configuration data from the stock configuration data, and associated target incremental configuration data from the incremental configuration data; The sending module is used to aggregate the target incremental configuration data and the target existing configuration data to obtain the target full configuration data; the sent target full configuration data is used to update the network configuration of the network space.
13. A computer device comprising a memory and a processor, wherein the memory stores a computer program. It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 11 are implemented.
14. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.
15. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.
Citation Information
Cited By
System log management method and electronic equipment
CN121029708A