CN115766455A - Network configuration issuing system, method and device, electronic equipment and storage medium - Google Patents
Network configuration issuing system, method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN115766455A CN115766455A CN202211422135.8A CN202211422135A CN115766455A CN 115766455 A CN115766455 A CN 115766455A CN 202211422135 A CN202211422135 A CN 202211422135A CN 115766455 A CN115766455 A CN 115766455A
- Authority
- CN
- China
- Prior art keywords
- configuration data
- channel
- configuration
- version number
- incremental
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
Description
技术领域technical field
本公开涉及计算机技术领域,具体而言,涉及一种网络配置下发系统、方法、装置、电子设备及存储介质。The present disclosure relates to the field of computer technology, and in particular, to a system, method, device, electronic equipment, and storage medium for delivering network configuration.
背景技术Background technique
随着科技的发展,越来越多的个人用户、企业用户需要使用服务器设备,但是服务器设备的安装、使用、维护等需要专业人员执行,造成服务器设备的部署比较复杂,运维比较繁琐,需要消耗时间成、人员成本等。为了解决上述问题,公有云应用而生。With the development of science and technology, more and more individual users and enterprise users need to use server equipment, but the installation, use, and maintenance of server equipment need to be performed by professionals, resulting in complicated deployment of server equipment and cumbersome operation and maintenance. Time-consuming, personnel costs, etc. In order to solve the above problems, public cloud applications are born.
其中,公有云是指第三方提供商通过公共互联网Internet为用户提供的云服务,用户可以通过Internet访问云并享受各类服务,包括并不限于计算、存储、网络等。因此提出一种应用于公有云的配置数据下发系统尤为重要。Among them, public cloud refers to cloud services provided by third-party providers to users through the public Internet. Users can access the cloud through the Internet and enjoy various services, including but not limited to computing, storage, and networking. Therefore, it is particularly important to propose a configuration data distribution system applied to public clouds.
发明内容Contents of the invention
有鉴于此,本公开至少提供一种网络配置下发系统、方法、装置、电子设备及存储介质。In view of this, the present disclosure at least provides a system, method, device, electronic equipment, and storage medium for delivering network configuration.
第一方面,本公开提供了一种网络配置下发系统,包括:In a first aspect, the present disclosure provides a system for delivering network configuration, including:
控制集群,用于接收针对计算节点上虚拟交换机的增量配置数据,将所述增量配置数据和为所述增量配置数据生成的通道参数发送到配置数据存储集群进行关联存储,以及,将所述增量配置数据和为所述增量配置数据生成的通道参数发送给配置通道服务集群进行缓存;The control cluster is configured to receive incremental configuration data for the virtual switch on the computing node, send the incremental configuration data and channel parameters generated for the incremental configuration data to the configuration data storage cluster for associated storage, and The incremental configuration data and the channel parameters generated for the incremental configuration data are sent to the configuration channel service cluster for caching;
所述配置通道服务集群,用于接收计算节点集群发送的目标通道参数;响应于接收到所述目标通道参数,从缓存的配置数据中,获取与所述目标通道参数匹配的当前配置数据;在从缓存的配置数据中获取到所述当前配置数据时,将所述当前配置数据发送给所述计算节点集群;在从缓存的配置数据中未获取到所述当前配置数据时,从所述配置数据存储集群中获取所述当前配置数据,并将所述当前配置数据进行缓存;The configuration channel service cluster is configured to receive target channel parameters sent by the computing node cluster; in response to receiving the target channel parameters, obtain current configuration data that matches the target channel parameters from cached configuration data; When the current configuration data is obtained from the cached configuration data, send the current configuration data to the computing node cluster; when the current configuration data is not obtained from the cached configuration data, from the configuration Obtaining the current configuration data from the data storage cluster, and caching the current configuration data;
所述计算节点集群,用于周期性向所述配置通道服务集群发送目标通道参数,并接收所述当前配置数据;以及基于所述当前配置数据在虚拟交换机上配置虚拟网络资源。The computing node cluster is configured to periodically send target channel parameters to the configuration channel service cluster and receive the current configuration data; and configure virtual network resources on the virtual switch based on the current configuration data.
一种可能的实施方式中,所述目标通道参数包括目标配置通道的通道名称和通道版本号,所述配置通道服务集群,在响应于接收到所述目标通道参数,从缓存的配置数据中,获取与所述目标通道参数匹配的当前配置数据时,用于:In a possible implementation manner, the target channel parameter includes a channel name and a channel version number of the target configuration channel, and the configuration channel service cluster, in response to receiving the target channel parameter, from the cached configuration data, When obtaining the current configuration data matching the target channel parameters, it is used to:
根据所述通道名称,从缓存的配置数据中获取所述目标配置通道的缓存版本号;Obtain the cached version number of the target configuration channel from the cached configuration data according to the channel name;
在所述缓存版本号大于所述通道版本号时,基于所述通道版本号和预设数量,确定版本号范围;When the cache version number is greater than the channel version number, determine a version number range based on the channel version number and a preset number;
从所述缓存模块中获取与所述版本号范围匹配的配置数据;Obtain configuration data matching the version number range from the cache module;
在成功获取到与所述版本号范围匹配的配置数据时,将获取到的配置数据作为当前配置数据。When the configuration data matching the version number range is successfully acquired, the acquired configuration data is used as the current configuration data.
一种可能的实施方式中,所述配置通道服务集群,还用于:在从缓存的配置数据中未成功获取到与所述版本号范围匹配的配置数据时,获取所述配置数据存储集群内增量配置存储模块中存储的所述目标配置通道的最小版本号;In a possible implementation manner, the configuration channel service cluster is further configured to: when the configuration data that matches the version number range is not successfully obtained from the cached configuration data, obtain the configuration data stored in the cluster. The minimum version number of the target configuration channel stored in the incremental configuration storage module;
确定所述通道版本号是否小于所述最小版本号;determining whether the channel version number is less than the minimum version number;
若是,则基于所述目标通道参数,从缓存的配置数据中获取所述目标配置通道对应的全量配置数据;If so, based on the target channel parameters, obtain the full configuration data corresponding to the target configuration channel from the cached configuration data;
若成功获取到全量配置数据,则将所述全量配置数据作为当前配置数据;If the full configuration data is successfully acquired, then use the full configuration data as the current configuration data;
若未能获取到全量配置数据,则从所述配置数据存储集群内全量配置存储模块中获取所述目标配置通道对应的全量配置数据,并将所述全量配置数据进行缓存。If the full configuration data cannot be obtained, the full configuration data corresponding to the target configuration channel is obtained from the full configuration storage module in the configuration data storage cluster, and the full configuration data is cached.
一种可能的实施方式中,所述配置通道服务集群,还用于:在所述通道版本号大于或等于所述最小版本号时,和/或,在所述缓存版本号小于所述通道版本号时,进行以下过程:In a possible implementation manner, the configuring channel service cluster is further configured to: when the channel version number is greater than or equal to the minimum version number, and/or, when the cache version number is less than the channel version number number, proceed as follows:
获取缓存的配置数据中所述目标配置通道对应的最大版本号、和所述增量配置存储模块中所述目标配置通道对应的最大版本号;Obtaining the maximum version number corresponding to the target configuration channel in the cached configuration data and the maximum version number corresponding to the target configuration channel in the incremental configuration storage module;
在所述缓存模块的所述最大版本号小于所述增量配置存储模块的所述最大版本号时,获取并缓存所述增量配置存储模块中所述目标配置通道对应的增量配置数据。When the maximum version number of the cache module is smaller than the maximum version number of the incremental configuration storage module, acquire and cache incremental configuration data corresponding to the target configuration channel in the incremental configuration storage module.
一种可能的实施方式中,所述配置数据存储集群包括增量配置存储模块和全量配置存储模块;所述控制集群,还用于接收针对计算节点上虚拟交换机的全量配置数据,将所述全量配置数据发送给所述配置数据存储集群;In a possible implementation manner, the configuration data storage cluster includes an incremental configuration storage module and a full configuration storage module; the control cluster is further configured to receive full configuration data for a virtual switch on a computing node, and sending the configuration data to the configuration data storage cluster;
所述配置数据存储集群,用于将所述全量配置数据存储至所述全量配置存储模块;将所述增量配置数据存储至所述增量配置存储模块,以及利用所述增量配置数据,对所述全量配置存储模块内存储的全量配置数据进行更新。The configuration data storage cluster is configured to store the full configuration data in the full configuration storage module; store the incremental configuration data in the incremental configuration storage module, and use the incremental configuration data, The full configuration data stored in the full configuration storage module is updated.
一种可能的实施方式中,所述控制集群包括至少一个私有网络控制器;每个私有网络控制器内设置有私有网络代理软件开发工具包;In a possible implementation manner, the control cluster includes at least one private network controller; each private network controller is provided with a private network agent software development kit;
所述控制集群,在将所述增量配置数据和为所述增量配置数据生成的通道参数发送到配置数据存储集群进行关联存储,以及,将所述增量配置数据和为所述增量配置数据生成的通道参数发送给配置通道服务集群进行缓存时,用于:The control cluster sends the incremental configuration data and the channel parameters generated for the incremental configuration data to the configuration data storage cluster for associated storage, and the incremental configuration data and the channel parameters generated for the incremental configuration data When the channel parameters generated by the configuration data are sent to the configuration channel service cluster for caching, they are used to:
利用所述私有网络代理软件开发工具包,将所述增量配置数据放至与所述增量配置数据匹配的配置通道内,并利用所述私有网络代理软件开发工具包更新所述配置通道的通道版本号,其中,所述配置通道关联有通道版本号,所述配置通道内每增加一个增量配置数据,所述通道版本号增加预设值;以及Using the private network proxy software development kit, put the incremental configuration data into a configuration channel that matches the incremental configuration data, and use the private network proxy software development kit to update the configuration channel A channel version number, wherein the configuration channel is associated with a channel version number, and each time an incremental configuration data is added in the configuration channel, the channel version number increases by a preset value; and
通过所述配置通道将所述增量配置数据和所述更新后的通道版本号发送给所述配置数据存储集群进行关联存储,和通过所述配置通道将所述增量配置数据和所述更新后的通道版本号发送给所述配置通道服务集群进行过缓存。Send the incremental configuration data and the updated channel version number to the configuration data storage cluster through the configuration channel for associated storage, and send the incremental configuration data and the updated channel version number through the configuration channel The final channel version number is sent to the configured channel service cluster for caching.
一种可能的实施方式中,所述配置通道包括以下类型:存放计算节点服务器关注的私有网络标识号的第一配置通道;In a possible implementation manner, the configuration channel includes the following types: a first configuration channel storing the private network identification number concerned by the computing node server;
存放计算节点服务器关注的每个私有网络下的单节点事件的第二配置通道;Store the second configuration channel for single-node events under each private network that the computing node server pays attention to;
存放每个私有网络下的全局事件的第三配置通道;The third configuration channel for storing global events under each private network;
存放每个私有网络下至少一个计算节点关注的目标事件的第四配置通道。A fourth configuration channel storing target events concerned by at least one computing node under each private network.
一种可能的实施方式中,所述配置通道服务集群包括至少一个配置通道服务器,每个配置通道服务器行设置有私有网络代理服务模块和缓存模块;In a possible implementation manner, the configuration channel service cluster includes at least one configuration channel server, and each configuration channel server row is provided with a private network proxy service module and a cache module;
所述控制集群,用于将所述增量配置数据发送给所述配置通道服务集群中的各个配置通道服务器内;The control cluster is configured to send the incremental configuration data to each configuration channel server in the configuration channel service cluster;
每个所述配置通道服务器中的私有网络代理服务模块,用于接收所述增量配置数据,并将所述增量配置数据缓存至所述配置通道服务器的所述缓存模块。The private network proxy service module in each configuration channel server is configured to receive the incremental configuration data, and cache the incremental configuration data to the cache module of the configuration channel server.
一种可能的实施方式中,所述计算节点集群包括至少一个计算节点服务器,每个所述计算节点服务器包括节点控制器,所述节点控制器内包括私有网络代理客户模块;In a possible implementation manner, the computing node cluster includes at least one computing node server, each of the computing node servers includes a node controller, and the node controller includes a private network proxy client module;
所述私有网络代理客户模块,用于:根据存储的配置通道的通道名称和通道版本号,确定目标通道参数;将所述目标通道参数发送给所述配置通道服务集群;以及在接收到所述当前配置数据后,校验所述当前配置数据关联的通道版本号是否与所述目标通道参数相匹配,若匹配,则将所述通道版本号进行存储,以及基于所述当前配置数据在虚拟交换机上进行虚拟网络资源的配置。The private network proxy client module is configured to: determine target channel parameters according to the channel name and channel version number of the stored configuration channel; send the target channel parameters to the configuration channel service cluster; and receive the After the current configuration data, check whether the channel version number associated with the current configuration data matches the target channel parameter, if it matches, store the channel version number, and based on the current configuration data in the virtual switch Configure virtual network resources.
以下方法、装置、电子设备等的效果描述参见上述方法的说明,这里不再赘述。For the effect description of the following methods, devices, electronic equipment, etc., refer to the description of the above method, and will not be repeated here.
第二方面,本公开提供了一种网络配置下发方法,应用于配置通道服务集群,包括:In a second aspect, the present disclosure provides a method for delivering network configuration, which is applied to configuring channel service clusters, including:
接收并缓存控制集群发送的增量配置数据和为所述增量配置数据生成的通道参数;Receive and cache the incremental configuration data sent by the control cluster and the channel parameters generated for the incremental configuration data;
接收计算节点集群周期性发送的目标通道参数;Receive the target channel parameters periodically sent by the computing node cluster;
响应于接收到所述目标通道参数,从缓存的配置数据中,获取与所述目标通道参数匹配的当前配置数据;In response to receiving the target channel parameters, obtain current configuration data matching the target channel parameters from the cached configuration data;
在从缓存的配置数据中获取到所述当前配置数据时,将所述当前配置数据发送给所述计算节点集群;在从缓存的配置数据中未获取到所述当前配置数据时,从所述配置数据存储集群中获取所述当前配置数据,并将所述当前配置数据进行缓存。When the current configuration data is obtained from the cached configuration data, send the current configuration data to the computing node cluster; when the current configuration data is not obtained from the cached configuration data, send the current configuration data from the The current configuration data is obtained from the configuration data storage cluster, and the current configuration data is cached.
第三方面,本公开提供了一种网络配置下发装置,包括:In a third aspect, the present disclosure provides a device for delivering network configuration, including:
第一接收模块,用于接收并缓存控制集群发送的增量配置数据和为所述增量配置数据生成的通道参数;The first receiving module is used to receive and cache the incremental configuration data sent by the control cluster and the channel parameters generated for the incremental configuration data;
第二接收模块,用于接收计算节点集群周期性发送的目标通道参数;The second receiving module is configured to receive target channel parameters periodically sent by the computing node cluster;
获取模块,用于响应于接收到所述目标通道参数,从缓存的配置数据中,获取与所述目标通道参数匹配的当前配置数据;在从缓存的配置数据中获取到所述当前配置数据时,将所述当前配置数据发送给所述计算节点集群;在从缓存的配置数据中未获取到所述当前配置数据时,从所述配置数据存储集群中获取所述当前配置数据,并将所述当前配置数据进行缓存。An acquisition module, configured to, in response to receiving the target channel parameters, acquire current configuration data matching the target channel parameters from the cached configuration data; when the current configuration data is acquired from the cached configuration data , sending the current configuration data to the computing node cluster; when the current configuration data is not obtained from the cached configuration data, obtain the current configuration data from the configuration data storage cluster, and store the The current configuration data described above is cached.
第四方面,本公开提供一种电子设备,包括:处理器、存储器和总线,所述存储器存储有所述处理器可执行的机器可读指令,当电子设备运行时,所述处理器与所述存储器之间通过总线通信,所述机器可读指令被所述处理器执行时执行如上述第二方面或任一实施方式所述的网络配置下发方法的步骤。In a fourth aspect, the present disclosure provides an electronic device, including: a processor, a memory, and a bus, the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the The memory communicates with each other through a bus, and when the machine-readable instructions are executed by the processor, the steps of the method for delivering network configuration as described in the above second aspect or any implementation manner are executed.
第五方面,本公开提供一种计算机可读存储介质,该计算机可读存储介质上存储有计算机程序,该计算机程序被处理器运行时执行如上述第二方面或任一实施方式所述的网络配置下发方法的步骤。In a fifth aspect, the present disclosure provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the network as described in the second aspect or any one of the above-mentioned implementation modes is executed. Steps to configure delivery methods.
本公开实施例提供了一种网络配置下发系统、方法、装置、电子设备及存储介质,该系统应用于公有云中,该系统包括控制集群、配置数据存储集群、配置通道服务集群以及计算节点集群,通过设置配置数据存储集群对增量配置数据进行存储,缓解了配置数据丢失的情况,提高了系统的安全性和可靠性,且针对公有云场景中大规模的计算节点集群时,配置数据存储集群能够满足数据存储需求。设置配置通道服务集群,通过对增量配置数据进行缓存,使得计算节点集群能够从缓存的配置数据中较快速的拉取数据,提高了配置下发的效率;且针对公有云场景中大规模的计算节点集群时,由于配置通道服务集群中各个缓存模块之间无需进行数据同步,使得配置通道服务集群可以通过横向扩充服务的方式,以满足大规模计算节点的拉取需求,提高了在公有云场景下的适配程度。Embodiments of the present disclosure provide a network configuration delivery system, method, device, electronic equipment, and storage medium. The system is applied in a public cloud, and the system includes a control cluster, a configuration data storage cluster, a configuration channel service cluster, and computing nodes. Clusters, by setting configuration data storage clusters to store incremental configuration data, alleviating the loss of configuration data, improving system security and reliability, and for large-scale computing node clusters in public cloud scenarios, configuration data Storage clusters can meet data storage needs. Set up the configuration channel service cluster. By caching the incremental configuration data, the computing node cluster can quickly pull data from the cached configuration data, improving the efficiency of configuration distribution; and for large-scale configuration in public cloud scenarios When computing node clusters, since there is no need for data synchronization among the cache modules in the configuration channel service cluster, the configuration channel service cluster can expand the service horizontally to meet the pull requirements of large-scale computing nodes and improve the performance of the public cloud. The degree of adaptation in the scene.
同时,在缓存模块中存在计算节点集群所需的增量配置数据时,计算节点集群能够快速的获取所需的增量配置数据;在缓存模块中不存在计算节点集群所需的增量配置数据时,可以从配置数据存储集群中获取所需的增量配置数据,在保障了系统安全性的基础上,提高了系统的数据发送效率。At the same time, when there is incremental configuration data required by the computing node cluster in the cache module, the computing node cluster can quickly obtain the required incremental configuration data; there is no incremental configuration data required by the computing node cluster in the cache module When , the required incremental configuration data can be obtained from the configuration data storage cluster, which improves the data transmission efficiency of the system on the basis of ensuring the security of the system.
为使本公开的上述目的、特征和优点能更明显易懂,下文特举较佳实施例,并配合所附附图,作详细说明如下。In order to make the above-mentioned objects, features and advantages of the present disclosure more comprehensible, preferred embodiments will be described in detail below together with the accompanying drawings.
附图说明Description of drawings
为了更清楚地说明本公开实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,此处的附图被并入说明书中并构成本说明书中的一部分,这些附图示出了符合本公开的实施例,并与说明书一起用于说明本公开的技术方案。应当理解,以下附图仅示出了本公开的某些实施例,因此不应被看作是对范围的限定,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他相关的附图。In order to illustrate the technical solutions of the embodiments of the present disclosure more clearly, the following will briefly introduce the accompanying drawings used in the embodiments. The accompanying drawings here are incorporated into the specification and constitute a part of the specification. The drawings show the embodiments consistent with the present disclosure, and are used together with the description to explain the technical solutions of the present disclosure. It should be understood that the following drawings only show some embodiments of the present disclosure, and therefore should not be regarded as limiting the scope. For those skilled in the art, they can also make From these drawings other related drawings are obtained.
图1示出了本公开实施例所提供的一种的网络配置下发系统的架构示意图;FIG. 1 shows a schematic diagram of the architecture of a network configuration delivery system provided by an embodiment of the present disclosure;
图2示出了本公开实施例所提供的另一种的网络配置下发系统的架构示意图;FIG. 2 shows a schematic diagram of the architecture of another network configuration delivery system provided by an embodiment of the present disclosure;
图3示出了本公开实施例所提供的一种网络配置下发系统中,各个配置通道的通道关系图;FIG. 3 shows a channel relationship diagram of each configuration channel in a network configuration delivery system provided by an embodiment of the present disclosure;
图4示出了本公开实施例所提供的一种网络配置下发系统中,私有网络控制器的接入流程图;FIG. 4 shows a flow chart of accessing a private network controller in a network configuration delivery system provided by an embodiment of the present disclosure;
图5示出了本公开实施例所提供的一种网络配置下发系统中,私有网络代理客户模块的结构示意图;FIG. 5 shows a schematic structural diagram of a private network proxy client module in a network configuration delivery system provided by an embodiment of the present disclosure;
图6示出了本公开实施例所提供的一种网络配置下发系统中,配置通道服务集群的工作流程图;FIG. 6 shows a working flow chart of configuring channel service clusters in a network configuration delivery system provided by an embodiment of the present disclosure;
图7示出了本公开实施例所提供的一种的网络配置下发方法的流程示意图;FIG. 7 shows a schematic flowchart of a method for delivering network configuration provided by an embodiment of the present disclosure;
图8示出了本公开实施例所提供的一种的网络配置下发装置的架构示意图;FIG. 8 shows a schematic structural diagram of a device for delivering network configuration provided by an embodiment of the present disclosure;
图9示出了本公开实施例所提供的一种电子设备的结构示意图。Fig. 9 shows a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure.
具体实施方式Detailed ways
为使本公开实施例的目的、技术方案和优点更加清楚,下面将结合本公开实施例中的附图,对本公开实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本公开一部分实施例,而不是全部的实施例。通常在此处附图中描述和示出的本公开实施例的组件可以以各种不同的配置来布置和设计。因此,以下对在附图中提供的本公开的实施例的详细描述并非旨在限制要求保护的本公开的范围,而是仅仅表示本公开的选定实施例。基于本公开的实施例,本领域技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本公开保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments It is only a part of the embodiments of the present disclosure, but not all the embodiments. The components of the disclosed embodiments generally described and illustrated in the figures herein may be arranged and designed in a variety of different configurations. Accordingly, the following detailed description of the embodiments of the present disclosure provided in the accompanying drawings is not intended to limit the scope of the claimed disclosure, but merely represents selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without creative effort shall fall within the protection scope of the present disclosure.
公有云是指第三方提供商通过公共互联网Internet为用户提供的云服务,用户可以通过Internet访问云并享受各类服务,包括并不限于计算、存储、网络等。一般的,应用于公有云的私有网络(Virtual Private Cloud,VPC)软件定义网络(Software DefinedNetwork,SDN)架构包括用户端、中间模块和计算节点服务端,中间模块分别与用户端和计算节点服务端相连。Public cloud refers to cloud services provided by third-party providers to users through the public Internet. Users can access the cloud through the Internet and enjoy various services, including but not limited to computing, storage, and networking. Generally, a private network (Virtual Private Cloud, VPC) software-defined network (Software Defined Network, SDN) architecture applied to a public cloud includes a client, an intermediate module, and a computing node server. connected.
一种方案中,中间模块可以使用远程字典服务(Remote Dictionary Server,Redis)作为存储方案,并搭配分布式发布订阅消息系统Kafka作为消息队列。用户端在接收到配置数据时,将配置数据下发给中间模块,中间模块将接收到的各个配置数据进行缓存,以便计算节点服务端进行读取。由于Kafka缓存数据存在时效,使得中间模块可能存在配置数据丢失的情况,进一步造成公有云的可信度降低。In one solution, the intermediate module can use a remote dictionary service (Remote Dictionary Server, Redis) as a storage solution, and use Kafka, a distributed publish-subscribe message system, as a message queue. When the client receives the configuration data, it sends the configuration data to the intermediate module, and the intermediate module caches each received configuration data so that the computing node server can read it. Due to the aging of Kafka cache data, configuration data may be lost in intermediate modules, further reducing the credibility of the public cloud.
同时,使用Kafka作为消息队列,在计算节点加入或离开的时候,会产生平衡rebalance现象,影响代理broker的工作过程,造成整个Kafka吞吐数据的效率较低,且随着计算节点的增加,效率会降低。At the same time, using Kafka as a message queue, when computing nodes join or leave, there will be a balance rebalance phenomenon, affecting the working process of the agent broker, resulting in low efficiency of the entire Kafka throughput data, and with the increase of computing nodes, the efficiency will decrease reduce.
另一种方案中,中间模块可以使用分布式存储系统Etcd进行数据存储,以便计算节点能监听watch Etcd,并从Etcd中获取配置数据。一方面,由于Etcd中各个存储模块之间需要进行数据同步,在计算节点的数量较多时,配置数据的数量也较多,使得中间模块中各个存储模块之间所需同步的数据较多,造成计算节点拉取数据的效率较低。另一方面,Etcd能接收到的watch连接数量是有限的,在公有云的应用场景下计算节点数量较大时,Etcd无法满足大规模计算节点的需要。In another solution, the intermediate module can use the distributed storage system Etcd for data storage, so that the computing nodes can monitor watch Etcd and obtain configuration data from Etcd. On the one hand, due to the need for data synchronization between the various storage modules in Etcd, when the number of computing nodes is large, the amount of configuration data is also large, so that the data that needs to be synchronized between the various storage modules in the intermediate module is large, resulting in The efficiency of computing nodes to pull data is low. On the other hand, the number of watch connections that Etcd can receive is limited. When the number of computing nodes is large in a public cloud application scenario, Etcd cannot meet the needs of large-scale computing nodes.
同时,Etcd是一种键-值(Key-Value,kv)存储的结构,该结构能够表示计算节点的当前配置状态,无法表示计算节点的资源配置过程,在资源变化较频繁的场景中,例如虚拟网卡的创建、挂载、卸载等高频操作场景下,无法较准确的将每个计算节点的配置数据准确的下发给该计算节点,降低了公有云的可信程度。并且,在公有云的应用场景下,计算节点数量较大时,Etcd的数据存储量上限可能无法满足场景需求。At the same time, Etcd is a key-value (Key-Value, kv) storage structure, which can represent the current configuration status of computing nodes, but cannot represent the resource configuration process of computing nodes. In scenarios where resources change frequently, such as In high-frequency operation scenarios such as creating, mounting, and uninstalling virtual network cards, it is impossible to accurately deliver the configuration data of each computing node to the computing node, which reduces the credibility of the public cloud. Moreover, in the public cloud application scenario, when the number of computing nodes is large, the upper limit of Etcd's data storage may not meet the scenario requirements.
以及上述两种方案中,中间模块在接收到配置数据后,将配置数据存储至了本地存储模块,在配置数据被清理后,若计算节点需要拉取该数据时,被清理的配置数据无法进行恢复,使得计算节点无法获取到该配置数据,造成计算节点无法进行虚拟机资源的配置,降低了公有云的可信度。And in the above two schemes, after the intermediate module receives the configuration data, it stores the configuration data in the local storage module. After the configuration data is cleaned, if the computing node needs to pull the data, the cleaned configuration data cannot be processed. Recovery, so that the computing node cannot obtain the configuration data, causing the computing node to be unable to configure virtual machine resources, reducing the credibility of the public cloud.
为了缓解上述方案存在的问题,本公开实施例提供了一种网络配置下发系统,该系统应用于公有云中,该系统包括控制集群、配置数据存储集群、配置通道服务集群以及计算节点集群,通过设置配置数据存储集群对增量配置数据进行存储,缓解了配置数据丢失的情况,提高了系统的安全性和可靠性,且针对公有云场景中大规模的计算节点集群时,配置数据存储集群能够满足数据存储需求。设置配置通道服务集群,通过对增量配置数据进行缓存,使得计算节点集群能够从缓存的配置数据中较快速的拉取数据,提高了数据下发的效率;且针对公有云场景中大规模的计算节点集群时,由于配置通道服务集群中各个缓存模块之间无需进行数据同步,使得配置通道服务集群可以通过横向扩充服务的方式,以满足大规模计算节点的拉取需求,提高了在公有云场景下的适配程度。In order to alleviate the problems existing in the above solution, an embodiment of the present disclosure provides a network configuration delivery system, which is applied in a public cloud, and the system includes a control cluster, a configuration data storage cluster, a configuration channel service cluster, and a computing node cluster. By setting configuration data storage clusters to store incremental configuration data, the situation of configuration data loss is alleviated, and the security and reliability of the system are improved. For large-scale computing node clusters in public cloud scenarios, configuration data storage clusters Able to meet data storage needs. Set up the configuration channel service cluster. By caching the incremental configuration data, the computing node cluster can quickly pull data from the cached configuration data, improving the efficiency of data delivery; and for large-scale When computing node clusters, since there is no need for data synchronization among the cache modules in the configuration channel service cluster, the configuration channel service cluster can expand the service horizontally to meet the pull requirements of large-scale computing nodes and improve the performance of the public cloud. The degree of adaptation in the scene.
同时,在缓存模块中存在计算节点集群所需的增量配置数据时,计算节点集群能够快速的获取所需的增量配置数据;在缓存模块中不存在计算节点集群所需的增量配置数据时,可以从配置数据存储集群中获取所需的增量配置数据,在保障了系统安全性的基础上,提高了系统的数据发送效率。At the same time, when there is incremental configuration data required by the computing node cluster in the cache module, the computing node cluster can quickly obtain the required incremental configuration data; there is no incremental configuration data required by the computing node cluster in the cache module When , the required incremental configuration data can be obtained from the configuration data storage cluster, which improves the data transmission efficiency of the system on the basis of ensuring the security of the system.
应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步定义和解释。It should be noted that like numerals and letters denote similar items in the following figures, therefore, once an item is defined in one figure, it does not require further definition and explanation in subsequent figures.
为便于对本公开实施例进行理解,首先对本公开实施例所公开的一种网络配置下发系统进行详细介绍。该系统应用于公有云的场景中,此处先对公有云的应用场景和该应用场景中的基本概念进行简单说明。In order to facilitate understanding of the embodiments of the present disclosure, a system for delivering network configuration disclosed in the embodiments of the present disclosure is first introduced in detail. The system is applied in the public cloud scenario. Here, a brief description of the public cloud application scenario and the basic concepts in this application scenario is given.
VPC为云上资源构建隔离的、自主配置和管理的虚拟网络环境,其中,不同私有网络之间网络相互隔离,用户可在自己的私有网络中创建和管理云服务器、负载均衡等云资源。VPC builds an isolated, self-configured and managed virtual network environment for resources on the cloud, in which different private networks are isolated from each other, and users can create and manage cloud resources such as cloud servers and load balancing in their own private networks.
地域Region是指物理数据中心所在的不同地理地域,不同地域之间内网完全隔离,保持不同地域间最大程度的稳定性和容错性。创建云资源时,要选择待创建云资源所在的地域,资源创建完成后地域不可修改。Regions refer to different geographic regions where physical data centers are located. Intranets in different regions are completely isolated to maintain maximum stability and fault tolerance among different regions. When creating a cloud resource, you must select the region where the cloud resource is to be created. The region cannot be modified after the resource is created.
可用区(Availability Zone,AZ)是指同一地域中电路、网络隔离的物理地域。在同一私有网络内,可用区之间内网默认互通。创建部分云资源(子网、云服务器实例)时需要选择可用区,资源创建完成后可用区不支持修改。Availability Zone (AZ) refers to the physical area where circuits and networks are isolated in the same area. In the same private network, the internal network between availability zones communicates with each other by default. When creating some cloud resources (subnets, cloud server instances), you need to select an availability zone. After the resources are created, the availability zone does not support modification.
在公有云场景中,公有云的物理服务器资源一般会设置在多个地域内,每个地域内设置2-3个可用区,每个可用区内部署有1万-2万台物理服务器。一般的,在公有云场景中,单VPC下计算节点集群规模可能会达到5万-10万的数量,可见公有云场景中计算节点的数量规模较大。In the public cloud scenario, the physical server resources of the public cloud are generally set in multiple regions, with 2-3 availability zones in each region, and 10,000 to 20,000 physical servers deployed in each availability zone. Generally, in public cloud scenarios, the scale of computing node clusters under a single VPC may reach 50,000 to 100,000, which shows that the number of computing nodes in public cloud scenarios is relatively large.
参见图1所示,为本公开实施例所提供的网络配置下发系统的架构示意图,包括:控制集群11、配置数据存储集群12、配置通道服务集群13以及计算节点集群14;其中,控制集群11分别与配置数据存储集群12和配置通道服务集群13相连;配置通道服务集群13与计算节点集群14相连。Referring to FIG. 1 , it is a schematic diagram of the architecture of the network configuration distribution system provided by the embodiment of the present disclosure, including: a control cluster 11, a configuration data storage cluster 12, a configuration channel service cluster 13, and a computing node cluster 14; wherein, the control cluster 11 is respectively connected to the configuration data storage cluster 12 and the configuration channel service cluster 13; the configuration channel service cluster 13 is connected to the computing node cluster 14.
控制集群11,用于接收针对计算节点上虚拟交换机的增量配置数据,将增量配置数据和为增量配置数据生成的通道参数发送给配置数据存储集群12中进行关联存储,以及将增量配置数据和为增量配置数据生成的通道参数发送给配置通道服务集群13进行缓存。The control cluster 11 is used to receive the incremental configuration data for the virtual switch on the computing node, send the incremental configuration data and the channel parameters generated for the incremental configuration data to the configuration data storage cluster 12 for associated storage, and store the incremental The configuration data and the channel parameters generated for the incremental configuration data are sent to the configuration channel service cluster 13 for caching.
配置通道服务集群13,用于接收计算节点集群发送的目标通道参数;响应于接收到目标通道参数,从缓存的配置数据中,获取与目标通道参数匹配的当前配置数据;在从缓存的配置数据中获取到当前配置数据时,将当前配置数据发送给计算节点集群;在从缓存的配置数据中未获取到当前配置数据时,从配置数据存储集群中获取当前配置数据,并将当前配置数据进行缓存。Configuration channel service cluster 13 is used to receive the target channel parameters sent by the computing node cluster; in response to receiving the target channel parameters, from the cached configuration data, obtain the current configuration data matching the target channel parameters; from the cached configuration data When the current configuration data is obtained, the current configuration data is sent to the computing node cluster; when the current configuration data is not obtained from the cached configuration data, the current configuration data is obtained from the configuration data storage cluster, and the current configuration data is processed cache.
计算节点集群14,用于周期性向配置通道服务集群发送目标通道参数,并接收当前配置数据;以及基于当前配置数据在虚拟交换机上配置虚拟网络资源。The computing node cluster 14 is configured to periodically send target channel parameters to the configuration channel service cluster and receive current configuration data; and configure virtual network resources on the virtual switch based on the current configuration data.
控制集群可以为由至少一个服务器构成的集群,该控制集群用于接收用户下发的针对计算节点上虚拟交换机的增量配置数据,并为该增量配置数据生成对应的通道参数,将接收到的增量配置数据和增量配置数据对应的通道参数下发给配置数据存储集群和配置通道服务集群。配置数据存储集群将接收到的增量配置数据和通道参数进行关联存储。以及配置通道服务集群将接收到的增量配置数据和通道参数进行缓存。其中,增量配置数据为用户下发的用于在计算节点集群中配置虚拟机资源的数据,比如该增量配置数据可以为创建网卡的配置数据等。The control cluster can be a cluster composed of at least one server. The control cluster is used to receive the incremental configuration data for the virtual switch on the computing node delivered by the user, and generate corresponding channel parameters for the incremental configuration data. The received The incremental configuration data and the channel parameters corresponding to the incremental configuration data are sent to the configuration data storage cluster and the configuration channel service cluster. The configuration data storage cluster associates and stores the received incremental configuration data and channel parameters. And the configuration channel service cluster caches the received incremental configuration data and channel parameters. Wherein, the incremental configuration data is data issued by the user for configuring virtual machine resources in the computing node cluster, for example, the incremental configuration data may be configuration data for creating a network card, and the like.
计算节点集群用于周期性的从配置通道服务集群中拉取所需的配置数据,其中,计算节点集群的获取周期可以根据实际情况进行设置。实施时,计算节点集群用于生成目标通道参数,并将该目标通道参数发送给配置通道服务集群。比如,目标通道参数可以包括计算节点的名称、数据的通道版本号、数据下发时所使用的配置通道的通道名称、获取的配置数据的数量等。The computing node cluster is used to periodically pull the required configuration data from the configuration channel service cluster, wherein the acquisition cycle of the computing node cluster can be set according to the actual situation. During implementation, the computing node cluster is used to generate target channel parameters and send the target channel parameters to the configuration channel service cluster. For example, the target channel parameter may include the name of the computing node, the channel version number of the data, the channel name of the configuration channel used when the data is delivered, the quantity of acquired configuration data, and the like.
配置通道服务集群接收计算节点集群发送的目标通道参数,响应于接收到目标通道参数,优先从缓存的配置数据中获取与目标通道参数匹配的当前配置数据。若从缓存的配置数据中获取到了当前配置数据时,则将该当前配置数据发送给计算节点集群。The configuration channel service cluster receives the target channel parameters sent by the computing node cluster, and in response to receiving the target channel parameters, preferentially obtains the current configuration data matching the target channel parameters from the cached configuration data. If the current configuration data is obtained from the cached configuration data, the current configuration data is sent to the computing node cluster.
由于配置通道服务集群中缓存的配置数据存在时效性,缓存的配置数据在长时间未被拉取时,配置数据可能被删除,故存在从缓存的配置数据中获取不到当前配置数据的情况。若从缓存的配置数据中未获取到当前配置数据时,可以从配置数据存储集群中获取当前配置数据,并将获取到的当前配置数据进行缓存,以便计算节点集群在下个周期时基于目标通道参数,能够从配置通道服务集群缓存的配置数据中获取到该当前配置参数。Due to the timeliness of the configuration data cached in the configuration channel service cluster, the configuration data may be deleted when the cached configuration data has not been pulled for a long time, so the current configuration data may not be obtained from the cached configuration data. If the current configuration data is not obtained from the cached configuration data, the current configuration data can be obtained from the configuration data storage cluster, and the obtained current configuration data can be cached so that the computing node cluster can be based on the target channel parameters in the next cycle , the current configuration parameters can be obtained from the configuration data cached in the configuration channel service cluster.
一种可选实施方式中,参见图2所示,配置数据存储集群12包括增量配置存储模块121和全量配置存储模块122;控制集群11,还用于接收针对计算节点上虚拟交换机的全量配置数据,将全量配置数据发送给配置数据存储集群12;其中,增量配置数据和全量配置数据用于在计算节点集群内计算节点的虚拟交换机上配置虚拟网络资源。In an optional implementation manner, as shown in FIG. 2, the configuration data storage cluster 12 includes an incremental configuration storage module 121 and a full configuration storage module 122; the control cluster 11 is also used to receive the full configuration for the virtual switch on the computing node data, sending the full configuration data to the configuration data storage cluster 12; wherein, the incremental configuration data and the full configuration data are used to configure virtual network resources on the virtual switches of the computing nodes in the computing node cluster.
配置数据存储集群12,用于将全量配置数据存储至全量配置存储模块122;将增量配置数据存储至增量配置存储模块121,以及利用增量配置数据,对所述全量配置存储模块内存储的全量配置数据进行更新。The configuration data storage cluster 12 is used to store the full configuration data to the full configuration storage module 122; store the incremental configuration data to the incremental configuration storage module 121, and use the incremental configuration data to store the full configuration data in the storage module. The full amount of configuration data is updated.
控制集群还用于接收用户下发的全量配置数据,并将该全量配置数据下发给配置数据存储集群。配置数据存储集群将全量配置数据存储至全量配置存储模块,将接收到的增量配置数据存储至增量配置存储模块。同时,在接收到增量配置数据时,还可以利用增量配置数据对全量配置存储模块进行更新,即将增量配置数据存储至全量配置存储模块,实现对全量配置存储模块的更新。比如,在接收到的增量配置数据为:配置数据3.1,全量配置存储模块中存储的全量配置数据包括:配置数据1.1、配置数据2.1时,则利用增量配置数据对全量配置存储模块进行更新后,更新后的全量配置存储模块中存储的全量配置数据(即更新后的全量配置数据)为:配置数据1.1、配置数据2.1、配置数据3.1。The control cluster is also used to receive the full configuration data delivered by the user, and deliver the full configuration data to the configuration data storage cluster. The configuration data storage cluster stores the full configuration data in the full configuration storage module, and stores the received incremental configuration data in the incremental configuration storage module. At the same time, when the incremental configuration data is received, the incremental configuration data can also be used to update the full configuration storage module, that is, the incremental configuration data is stored in the full configuration storage module, so as to realize the update of the full configuration storage module. For example, when the received incremental configuration data is: configuration data 3.1, and the full configuration data stored in the full configuration storage module includes: configuration data 1.1 and configuration data 2.1, the incremental configuration data is used to update the full configuration storage module Afterwards, the full configuration data stored in the updated full configuration storage module (that is, the updated full configuration data) is: configuration data 1.1, configuration data 2.1, and configuration data 3.1.
示例性的,增量配置存储模块可以为关系型数据库管理系统MySQL,全量配置存储模块可以为Etcd。通过利用MySQL对增量配置数据进行存储,实现了对配置过程中当前的配置数据的存储,利用Etcd对全量配置数据进行存储,实现了对配置流程中各个配置数据的存储,通过上述配置满足了多个应用场景的需要,且能够较准确的确定配置数据的下发情况和当前状态,提高了配置的效率和精度。Exemplarily, the incremental configuration storage module may be a relational database management system MySQL, and the full configuration storage module may be Etcd. By using MySQL to store incremental configuration data, the current configuration data in the configuration process is stored, and Etcd is used to store the full configuration data, which realizes the storage of each configuration data in the configuration process. The above configuration meets the requirements It meets the needs of multiple application scenarios, and can accurately determine the distribution and current status of configuration data, improving the efficiency and accuracy of configuration.
通过将增量配置数据存储至增量配置存储模块,将全量配置数据存储值全量配置存储模块,实现了对配置数据的分类存储,以便在配置通道服务集群中未能查找到当前配置数据时,从配置数据存储集群中获取该当前配置数据,缓解了相关技术中数据丢失的问题;以及通过增量配置存储模块存储增量配置数据,实现了对配置过程中当前配置数据的存储,通过全量配置存储模块存储全量配置数据,实现了对配置过程中各个配置数据的存储。By storing the incremental configuration data in the incremental configuration storage module and storing the full configuration data in the full configuration storage module, the classified storage of configuration data is realized, so that when the current configuration data cannot be found in the configuration channel service cluster, Obtaining the current configuration data from the configuration data storage cluster alleviates the problem of data loss in related technologies; and stores the incremental configuration data through the incremental configuration storage module, realizing the storage of the current configuration data in the configuration process, through the full configuration The storage module stores the full amount of configuration data, realizing the storage of each configuration data in the configuration process.
同时,将全量配置数据存储至全量配置存储模块中,在计算节点的配置状态较慢时,比如增量配置存储模块存储的增量配置数据的版本为5.1,而计算节点接收到的增量配置数据的版本为1.1,此时计算节点的配置状态较慢,通过将全量配置数据下发给计算节点集群,实现计算节点的快速配置,提高配置效率。At the same time, store the full configuration data in the full configuration storage module. When the configuration status of the computing node is slow, for example, the version of the incremental configuration data stored in the incremental configuration storage module is 5.1, and the incremental configuration data received by the computing node The version of the data is 1.1. At this time, the configuration status of the computing nodes is slow. By sending the full configuration data to the computing node cluster, the fast configuration of the computing nodes is realized and the configuration efficiency is improved.
实施时,在对全量配置存储模块进行更新时,存在以下情况:成功将增量配置数据写入增量配置存储模块,但是未能成功将增量配置数据写入全量配置存储模块,为了保证全量配置存储模块与增量配置存储模块之间数据的一致性,控制集群可以控制增量配置存储模块,将写入的增量配置数据删除,提高了该系统的安全性和可靠性。During implementation, when updating the full configuration storage module, the following situations exist: the incremental configuration data is successfully written to the incremental configuration storage module, but the incremental configuration data is not successfully written to the full configuration storage module. In order to ensure the full The data consistency between the configuration storage module and the incremental configuration storage module, the control cluster can control the incremental configuration storage module, delete the written incremental configuration data, and improve the security and reliability of the system.
一种可选实施方式中,参见图2所示,控制集群包括至少一个私有网络VPC控制器;每个私有网络控制器内设置有私有网络VPC代理broker软件开发工具包(SoftwareDevelopment Kit,SDK)。In an optional implementation manner, as shown in FIG. 2 , the control cluster includes at least one private network VPC controller; each private network controller is provided with a private network VPC proxy broker software development kit (Software Development Kit, SDK).
控制集群11,在将增量配置数据和为增量配置数据生成的通道参数发送到配置数据存储集群进行关联存储,以及,将增量配置数据和为增量配置数据生成的通道参数发送给配置通道服务集群进行缓存时,用于:The control cluster 11 sends the incremental configuration data and the channel parameters generated for the incremental configuration data to the configuration data storage cluster for associated storage, and sends the incremental configuration data and the channel parameters generated for the incremental configuration data to the configuration When the channel service cluster performs caching, it is used to:
利用VPC broker SDK,将增量配置数据放至与该增量配置数据匹配的配置通道内,并利用VPC broker SDK更新配置通道的通道版本号,其中,配置通道关联有通道版本号,配置通道内每增加一个增量配置数据,通道版本号增加预设值;以及通过配置通道将增量配置数据和更新后的通道版本号发送给配置数据存储集群进行关联存储,和通过配置通道将增量配置数据和更新后的通道版本号发送给配置通道服务集群进行过缓存。Use the VPC broker SDK to put the incremental configuration data into the configuration channel that matches the incremental configuration data, and use the VPC broker SDK to update the channel version number of the configuration channel, where the configuration channel is associated with a channel version number, and the configuration channel Every time an incremental configuration data is added, the channel version number is increased by the preset value; and the incremental configuration data and the updated channel version number are sent to the configuration data storage cluster through the configuration channel for associated storage, and the incremental configuration is sent through the configuration channel The data and the updated channel version number are sent to the configuration channel service cluster for caching.
实施时,可以在VPC broker中设置配置通道channel,该配置通道可以设置有以下至少一种规则:不同类型的配置数据放入至不同的配置通道内;配置通道维护一个通道版本号(通道版本号的初始值可以为预设值,比如预设值为1),配置通道内每增加一个增量配置数据,配置通道关联的通道版本号增加预设值(比如加1);配置通道维护了增量配置数据和全量配置数据,其中,增量配置数据和全量配置数据可以由VPC控制器的使用方放入配置通道内;配置通道将通道内的增量配置数据,按照放入的顺序发送给计算节点;配置通道在确定计算节点上的增量配置数据较旧(比如计算节点上报的当前增量配置数据的通道版本号远小于使用方下发的最新增量配置数据的通道版本号)时,给计算节点下发全量配置数据,以便使得计算节点的配置能够较快速的追平使用方下发的最新的增量配置数据。During implementation, the configuration channel channel can be set in the VPC broker, and the configuration channel can be set with at least one of the following rules: different types of configuration data are put into different configuration channels; the configuration channel maintains a channel version number (channel version number The initial value of can be a preset value, for example, the default value is 1), every time an incremental configuration data is added in the configuration channel, the channel version number associated with the configuration channel will increase the preset value (for example, add 1); the configuration channel maintains the incremental configuration data Incremental configuration data and full configuration data, among which, the incremental configuration data and full configuration data can be put into the configuration channel by the user of the VPC controller; the configuration channel sends the incremental configuration data in the channel to the Computing node; when the configuration channel determines that the incremental configuration data on the computing node is relatively old (for example, the channel version number of the current incremental configuration data reported by the computing node is much smaller than the channel version number of the latest incremental configuration data issued by the user) , to deliver the full amount of configuration data to the computing nodes, so that the configuration of the computing nodes can quickly catch up with the latest incremental configuration data delivered by the user.
一种可选实施方式中,配置通道包括以下类型:存放计算节点服务器关注的私有网络标识号(即vpc_id)的第一配置通道;存放计算节点服务器关注的每个私有网络下的单节点事件的第二配置通道;存放每个私有网络下的全局事件的第三配置通道;存放每个私有网络下至少一个计算节点关注的目标事件的第四配置通道。In an optional implementation, the configuration channel includes the following types: the first configuration channel that stores the private network identification number (i.e. vpc_id) that the computing node server pays attention to; The second configuration channel; the third configuration channel for storing global events under each private network; the fourth configuration channel for storing target events concerned by at least one computing node under each private network.
针对第一配置通道,第一配置通道的通道类型可以为node_vpc_control_channels,该第一配置通道的作用可以为:存放每个计算节点需要关注的vpc_id,存放的虚拟交换机资源可以包括:与VPC相关的资源数据、部分计算节点的控制信息,与VPC相关的资源数据比如为子网资源数据、安全组资源数据、路由表资源数据等等;其中,第一配置通道相当于计算节点的信令通道。第一配置通道的数量与计算节点的数量相关,一般的一个计算节点对应一个第一配置通道,即第一配置通道的数量可以为num(计算节点host)。第一配置通道的通道名称可以根据设置的规则进行确定,比如,第一配置通道的通道名称的命名规则可以为:“control”+“host ip”,其中,host ip可以为计算节点的网际互联协议(Internet Protocol,IP)地址,例如:第一配置通道的通道名称可以为“control+10.2.3.4”。For the first configuration channel, the channel type of the first configuration channel can be node_vpc_control_channels. The function of the first configuration channel can be: store the vpc_id that each computing node needs to pay attention to, and the stored virtual switch resources can include: resources related to VPC Data, control information of some computing nodes, resource data related to VPC, such as subnet resource data, security group resource data, routing table resource data, etc.; wherein, the first configuration channel is equivalent to the signaling channel of the computing node. The number of first configuration channels is related to the number of computing nodes. Generally, one computing node corresponds to one first configuration channel, that is, the number of first configuration channels can be num (computing node host). The channel name of the first configuration channel can be determined according to the set rules. For example, the naming rule of the channel name of the first configuration channel can be: "control"+"host ip", where the host ip can be the Internet connection of the computing node Protocol (Internet Protocol, IP) address, for example: the channel name of the first configuration channel may be "control+10.2.3.4".
针对第二配置通道,第二配置通道的通道类型可以为:vpc_host_data_channels,该第二配置通道的作用可以为:存放每个计算节点需要关注的某个VPC下的单节点事件,存放的虚拟交换机资源可以包括:虚拟端口vport、弹性公网IP(Elastic IP Address,EIP)、高可用虚拟IP(High-Availability Virtual IP Address,HaVip)等等。第二配置通道的数量与计算节点下VPC的数量相关,一般的各个计算节点下的每个VPC对应一个第二配置通道,即第二配置通道的数量可以为num(VPC)×num(host)。第二配置通道的通道名称可以根据设置的规则进行确定,比如,第二配置通道的通道名称的命名规则可以为:“host_channel”+{vpc_id}+{host ip},例如:host_channel+vpc-mjnipf8wjy+10.2.3.4”。For the second configuration channel, the channel type of the second configuration channel can be: vpc_host_data_channels, and the function of the second configuration channel can be: store single-node events under a certain VPC that each computing node needs to pay attention to, and store virtual switch resources It may include: virtual port vport, elastic public IP (Elastic IP Address, EIP), high-availability virtual IP (High-Availability Virtual IP Address, HaVip), etc. The number of second configuration channels is related to the number of VPCs under the computing nodes. Generally, each VPC under each computing node corresponds to a second configuration channel, that is, the number of second configuration channels can be num(VPC)×num(host) . The channel name of the second configuration channel can be determined according to the set rules. For example, the naming rule of the channel name of the second configuration channel can be: "host_channel"+{vpc_id}+{host ip}, for example: host_channel+vpc-mjnipf8wjy +10.2.3.4".
针对第三配置通道,第三配置通道的通道类型可以为:vpc_global_data_channels,该第三配置通道的作用可以为:存放每个VPC下的全局事件,存放的虚拟交换机资源可以包括:路由表route等等。第三配置通道的数量与VPC的数量相关,一般的每个VPC对应一个第三配置通道,即第三配置通道的数量可以为num(VPC)。第三配置通道的通道名称可以根据设置的规则进行确定,比如,第三配置通道的通道名称的命名规则可以为:“selfdefine”+{vpc_id}+{service type},例如:selfdefine+vpc-mjnipf8wjy+route”。For the third configuration channel, the channel type of the third configuration channel can be: vpc_global_data_channels, the role of the third configuration channel can be: to store global events under each VPC, and the stored virtual switch resources can include: routing table route, etc. . The number of third configuration channels is related to the number of VPCs. Generally, each VPC corresponds to one third configuration channel, that is, the number of third configuration channels may be num(VPCs). The channel name of the third configuration channel can be determined according to the set rules. For example, the naming rule of the channel name of the third configuration channel can be: "selfdefine"+{vpc_id}+{service type}, for example: selfdefine+vpc-mjnipf8wjy +route".
针对第四配置通道,第四配置通道的通道类型可以为:vpc_mutil_host_data_channels,该第四配置通道的作用可以为:存放VPC下多个计算节点均需要关注的目标事件,存放的虚拟交换机资源可以包括:安全组规则、IP地址集合IPset、网络访问控制列表(Access Control List,ACL)等等。第四配置通道的数量与关注目标事件的计算节点的数量相关,比如若目标事件为创建通道事件,关注该目标事件的计算节点的数量为n,则该第四配置通道的数量为n。第四通道的名称根据目标事件相关,比如第四配置通道的名称为从第二配置通道中获取到对应的创建删除事件(目标事件)构造的,即虚拟交换机控制层controller从第二配置通道中获取到对应的创建删除事件(目标事件),自动去watch对应的第四配置通道。For the fourth configuration channel, the channel type of the fourth configuration channel can be: vpc_mutil_host_data_channels. The function of the fourth configuration channel can be: to store target events that need to be paid attention to by multiple computing nodes under the VPC. The stored virtual switch resources can include: Security group rules, IP address set IPset, network access control list (Access Control List, ACL), etc. The number of the fourth configuration channel is related to the number of computing nodes concerned with the target event. For example, if the target event is a channel creation event and the number of computing nodes concerned with the target event is n, then the number of the fourth configuration channel is n. The name of the fourth channel is related to the target event. For example, the name of the fourth configuration channel is constructed by obtaining the corresponding creation and deletion event (target event) from the second configuration channel, that is, the virtual switch control layer controller is obtained from the second configuration channel. Obtain the corresponding creation and deletion event (target event), and automatically go to the fourth configuration channel corresponding to the watch.
参见图3所示的通道关系图,该图中示出了第一配置通道、第二配置通道、第三配置通道和第四配置通道之间的关系。具体实施时,可以将配置数据放入第一配置通道内,以使得计算节点能够获取到需关注的vpc id。在进行VPC创建操作或VPC删除操作时,若VPC存在单节点事件时,可以利用第二配置通道将单节点事件对应的配置数据进行下发。若VPC存在全局事件时,可以利用第三配置通道将全局事件对应的配置数据进行下发。若VPC存在需要部分计算节点关注的目标事件时,可以从第二配置通道中确定部分计算节点对应的与目标事件相关的第四配置通道,并将目标事件对应的配置数据通过第四配置通道下发。Referring to the channel relationship diagram shown in FIG. 3 , the figure shows the relationship among the first configuration channel, the second configuration channel, the third configuration channel and the fourth configuration channel. During specific implementation, the configuration data can be put into the first configuration channel, so that the computing node can obtain the vpc id that needs attention. When performing a VPC creation operation or a VPC deletion operation, if there is a single-node event in the VPC, the configuration data corresponding to the single-node event can be delivered by using the second configuration channel. If there is a global event in the VPC, the configuration data corresponding to the global event can be delivered through the third configuration channel. If there are target events in the VPC that require the attention of some computing nodes, the fourth configuration channel related to the target event corresponding to some computing nodes can be determined from the second configuration channel, and the configuration data corresponding to the target event can be downloaded through the fourth configuration channel. hair.
本方案中通过设置多种类型的配置通道,使得不同的增量配置数据能够通过不同的配置通道,较快速和较方便的下发给计算节点集群,比如,全局事件能够通过第三配置通道下发给VPC对应的各个计算节点,提高了数据下发的效率。In this solution, by setting multiple types of configuration channels, different incremental configuration data can be sent to the computing node cluster more quickly and conveniently through different configuration channels. For example, global events can be downloaded through the third configuration channel. It is sent to each computing node corresponding to the VPC, which improves the efficiency of data delivery.
由于VPC broker中设置有配置通道,可以利用VPC broker SDK,将增量数据放至与增量配置数据匹配的配置通道内,比如,增量配置数据为VPC1下的单节点事件时,可以将增量配置数据放入VPC1对应的第二配置通道内。并利用VPC broker SDK更新配置通道的通道版本号,即将配置通道的通道版本号加预设值,得到更新后的通道版本号。Since the configuration channel is set in the VPC broker, you can use the VPC broker SDK to put the incremental data into the configuration channel that matches the incremental configuration data. For example, when the incremental configuration data is a single-node event under VPC1, you can add the incremental The volume configuration data is put into the second configuration channel corresponding to VPC1. And use the VPC broker SDK to update the channel version number of the configuration channel, that is, add the preset value to the channel version number of the configuration channel to get the updated channel version number.
再将增量配置数据和配置通道对应的更新后的通道版本号关联,并通过配置通道将关联的增量配置数据和更新后的通道版本号发送给配置数据存储集群和配置通道服务集群,以便配置数据存储集群将接收到的关联的增量配置数据和更新后的通道版本号存储至增量配置存储模块,和配置通道服务集群将将接收到的关联的增量配置数据和更新后的通道版本号缓存至缓存模块内。后续过程中,配置通道服务集群能够根据接收到的目标通道参数(比如通道名称、通道版本号)从缓存模块中获取当前配置数据。Then associate the incremental configuration data with the updated channel version number corresponding to the configuration channel, and send the associated incremental configuration data and the updated channel version number to the configuration data storage cluster and the configuration channel service cluster through the configuration channel, so that The configuration data storage cluster stores the received associated incremental configuration data and the updated channel version number to the incremental configuration storage module, and the configuration channel service cluster will receive the associated incremental configuration data and the updated channel The version number is cached in the cache module. In the subsequent process, the configuration channel service cluster can obtain the current configuration data from the cache module according to the received target channel parameters (such as channel name and channel version number).
这里,通过配置通道下发增量配置数据,实现了增量配置数据的较快速下发,以及每个配置通道维护一个通道版本号,使得计算节点能够根据配置通道的通道名称和版本号,较准确的获取到所需的配置数据。Here, the incremental configuration data is delivered through the configuration channel to achieve faster delivery of the incremental configuration data, and each configuration channel maintains a channel version number, so that the computing nodes can compare Accurately obtain the required configuration data.
实施时,VPC控制器,还可以定期检测各个配置通道的状态;并将状态指示为无效状态的配置通道删除,将状态指示为有效状态的配置通道保留。比如,在配置通道对应的VPC不存在、配置通道对应的计算节点服务器下线时,可以确定该配置通道的状态为无效状态。通过定期删除无效的配置通道,能够减少无效配置通道对网络资源的占用,避免资源浪费。During implementation, the VPC controller can also periodically detect the status of each configuration channel; delete the configuration channel whose status is indicated as invalid, and reserve the configuration channel whose status is indicated as valid. For example, when the VPC corresponding to the configuration channel does not exist and the computing node server corresponding to the configuration channel goes offline, it may be determined that the status of the configuration channel is invalid. By periodically deleting invalid configuration channels, the occupation of network resources by invalid configuration channels can be reduced, and resource waste can be avoided.
参见图4所示的VPC控制器的接入流程,结合图4对VPC控制器的功能进行说明。该VPC控制器中的Hydra负责创建/删除配置通道channel,在接收到增量配置数据时,可以通过调用API,利用创建的配置通道将增量配置数据下发给增量配置存储模块MySQL,并通过配置通道将增量配置数据下发给全量配置存储模块Etcd,实现对Etcd的更新,以使得增量配置存储模块和全量配置存储模块之间具有数据一致性;在接收到全量配置数据时,通过配置通道将全量配置数据写入Etcd。同时还可以通知VPC broker,使得VPC broker利用VPCbroker SDK将增量配置数据写入至VPC broker server,以及还可以定期清理过期的channel,比如在确定channel的状态为无效状态时,将该channel删除。Referring to the access process of the VPC controller shown in FIG. 4 , the functions of the VPC controller will be described in conjunction with FIG. 4 . The Hydra in the VPC controller is responsible for creating/deleting the configuration channel channel. When receiving the incremental configuration data, it can use the created configuration channel to send the incremental configuration data to the incremental configuration storage module MySQL by calling the API, and Send the incremental configuration data to the full configuration storage module Etcd through the configuration channel to update Etcd, so that there is data consistency between the incremental configuration storage module and the full configuration storage module; when receiving the full configuration data, Write the full configuration data to Etcd through the configuration channel. At the same time, the VPC broker can be notified, so that the VPC broker can use the VPC broker SDK to write incremental configuration data to the VPC broker server, and can also regularly clean up expired channels, such as deleting the channel when the status of the channel is determined to be invalid.
一种可选实施方式中,参见图2所示,配置通道服务集群包括至少一个配置通道服务器,每个配置通道服务器行设置有私有网络代理服务VPC broker server模块和缓存模块Redis。In an optional implementation manner, as shown in FIG. 2 , the configuration channel service cluster includes at least one configuration channel server, and each configuration channel server row is provided with a private network proxy service VPC broker server module and a cache module Redis.
控制集群,用于将增量配置数据发送给配置通道服务集群中的各个配置通道服务器内。每个配置通道服务器中的VPC broker server模块,用于接收增量配置数据,并将增量配置数据缓存至该配置通道服务器的缓存模块。The control cluster is used to send incremental configuration data to each configuration channel server in the configuration channel service cluster. The VPC broker server module in each configuration channel server is used to receive incremental configuration data and cache the incremental configuration data to the cache module of the configuration channel server.
在配置通道服务集群内包括多个配置通道服务器时,考虑到计算节点可能从任意一个配置通道服务器中拉取增量配置数据,故控制集群需要将增量配置数据广播给各个配置通道服务器。实施时,控制集群用于将增量配置数据发送给配置通道服务集群中的各个配置通道服务器内。每个配置通道服务器中的VPC broker server模块在接收到增量配置数据时,将增量配置数据缓存至该配置通道服务器的缓存模块。When multiple configuration channel servers are included in the configuration channel service cluster, considering that computing nodes may pull incremental configuration data from any configuration channel server, the control cluster needs to broadcast incremental configuration data to each configuration channel server. During implementation, the control cluster is used to send incremental configuration data to each configuration channel server in the configuration channel service cluster. When the VPC broker server module in each configuration channel server receives the incremental configuration data, it caches the incremental configuration data to the cache module of the configuration channel server.
配置通道服务集群中配置通道服务器的数量可以扩充,实施时,可以通过横向扩充配置通道服务器的方式,使得配置通道服务集群能够满足计算节点集群的需求,提高数据发送的效率。The number of configuration channel servers in the configuration channel service cluster can be expanded. During implementation, the configuration channel server can be expanded horizontally so that the configuration channel service cluster can meet the needs of the computing node cluster and improve the efficiency of data transmission.
本公开实施方式中,配置通道服务集群中设置至少一个配置通道服务器,每个配置通道服务器行设置有VPC broker server模块和缓存模块,通过VPC broker server模块接收目标通道参数和在缓存模块中缓存增量配置数据,使得计算节点能够较快速的从配置通道服务器中获取增量配置数据,提高数据的发送效率。In the embodiment of the present disclosure, at least one configuration channel server is set in the configuration channel service cluster, and each configuration channel server row is provided with a VPC broker server module and a cache module, and the target channel parameters are received by the VPC broker server module and cached in the cache module. Incremental configuration data enables computing nodes to quickly obtain incremental configuration data from the configuration channel server, improving data transmission efficiency.
实施时,该系统还可以包括负载均衡器;负载均衡器分别与配置通道服务集群和计算节点集群相连。负载均衡器用于在接收到计算节点集群中任一计算节点发送的目标通道参数时,从配置通道服务集群包括的各个配置通道服务器中,确定计算节点对应的配置通道服务器;并将目标通道参数发送给确定的配置通道服务器的VPC broker server模块。During implementation, the system may also include a load balancer; the load balancer is respectively connected to the configuration channel service cluster and the computing node cluster. The load balancer is used to determine the configuration channel server corresponding to the computing node from each configuration channel server included in the configuration channel service cluster when receiving the target channel parameter sent by any computing node in the computing node cluster; and send the target channel parameter to For the VPC broker server module that determines the configured channel server.
计算节点集群中任一计算节点上的VPC broker client模块,可以通过负载均衡器与配置通道服务集群中的任一配置通道服务器建立传输控制协议(TransmissionControl Protocol,TCP)长连接,通过该长连接定时上报关注的配置通道的本地的通道版本号version,以便VPC broker server模块能够根据VPC broker client模块上报的配置通道channel的version,从缓存模块中获取并下发version+1至version+N(N为预设数量)的增量配置数据。The VPC broker client module on any computing node in the computing node cluster can establish a transmission control protocol (Transmission Control Protocol, TCP) long connection with any configuration channel server in the configuration channel service cluster through the load balancer. Report the local channel version number version of the concerned configuration channel, so that the VPC broker server module can obtain and deliver version+1 to version+N from the cache module according to the version of the configuration channel channel reported by the VPC broker client module (N is preset amount) of incremental configuration data.
一种可选实施方式中,参见图2所示,计算节点集群包括至少一个计算节点服务器,每个计算节点服务器包括节点控制器,节点控制器内包括一个私有网络代理客户VPCbroker client模块;In an optional implementation manner, as shown in FIG. 2, the computing node cluster includes at least one computing node server, each computing node server includes a node controller, and a private network agent client VPCbroker client module is included in the node controller;
VPC broker client模块用于:根据存储的配置通道的通道名称和通道版本号,确定目标通道参数;将目标通道参数发送给配置通道服务集群;以及在接收到当前配置数据后,校验当前配置数据关联的通道版本号是否与目标通道参数相匹配,若匹配,则将通道版本号进行存储,以及基于当前配置数据在虚拟交换机上进行虚拟网络资源的配置。若不匹配,则重新基于目标通道参数进行数据的拉取。The VPC broker client module is used to: determine the target channel parameters according to the channel name and channel version number of the stored configuration channel; send the target channel parameters to the configuration channel service cluster; and verify the current configuration data after receiving the current configuration data Whether the associated channel version number matches the target channel parameter, if so, store the channel version number, and configure the virtual network resource on the virtual switch based on the current configuration data. If it does not match, the data will be pulled again based on the target channel parameters.
实施时,VPC broker client模块中可以启动两个协程,比如Report Channel ToBroker和Receive Channel From Broker。VPC broker client模块和VPC broker server模块之间可以采用一个TCP长连接,Report Channel To Broker负责下发配置数据(增量配置数据和全量配置数据),Receive Channel From Broker负责接收配置数据。VPC brokerclient在收到带有通道版本号version的配置数据时,会验证version是否正确,如果正确,则将配置数据通过回调CallBack函数转交给处理服务响应模块,转交的配置数据不关联有version。During implementation, two coroutines can be started in the VPC broker client module, such as Report Channel ToBroker and Receive Channel From Broker. A TCP long connection can be used between the VPC broker client module and the VPC broker server module. Report Channel To Broker is responsible for delivering configuration data (incremental configuration data and full configuration data), and Receive Channel From Broker is responsible for receiving configuration data. When the VPC brokerclient receives the configuration data with the channel version number version, it will verify whether the version is correct. If it is correct, the configuration data will be transferred to the processing service response module through the callback CallBack function. The transferred configuration data is not associated with version.
参见图5所示,VPC broker client模块可以包括:版本存储模块、通道版本管理模块、版本周期上报模块、处理服务响应模块和接口模块。通道版本管理模块用于根据版本存储模块中存储的配置通道的通道名称和通道版本号,确定目标通道参数;并将目标通道参数发送给版本周期上报模块,以便版本周期上报模块能够将目标通道参数发送给配置通道服务集群。比如,将版本存储模块中存储的配置通道的通道名称和通道版本号,确定为目标通道参数。在版本存储模块中不存在配置通道的通道版本号时,可以将目标值比如-1作为目标通道参数,以使得VPC broker server能够根据目标值获取并下发全量配置数据。As shown in FIG. 5, the VPC broker client module may include: a version storage module, a channel version management module, a version cycle reporting module, a processing service response module and an interface module. The channel version management module is used to determine the target channel parameters according to the channel name and channel version number of the configuration channel stored in the version storage module; and send the target channel parameters to the version cycle reporting module, so that the version cycle reporting module can report the target channel parameters Sent to the configuration channel service cluster. For example, the channel name and channel version number of the configuration channel stored in the version storage module are determined as target channel parameters. When the channel version number of the configuration channel does not exist in the version storage module, a target value such as -1 can be used as the target channel parameter, so that the VPC broker server can obtain and deliver the full amount of configuration data according to the target value.
通道版本管理模块还用于在接收到当前配置数据后,校验当前配置参数关联的通道版本号是否与目标通道参数相匹配,若匹配,则表示当前配置数据无误,将当前配置数据发送给处理服务响应模块,以及将当前配置数据关联的通道版本号存储至版本存储模块。服务响应模块通过调用接口模块,基于当前配置数据进行虚拟网络资源的配置。版本存储模块可以为轻型数据库SQLite。The channel version management module is also used to check whether the channel version number associated with the current configuration parameters matches the target channel parameters after receiving the current configuration data. If it matches, it means that the current configuration data is correct, and the current configuration data is sent to the processing The service response module stores the channel version number associated with the current configuration data in the version storage module. The service response module configures the virtual network resources based on the current configuration data by calling the interface module. The version storage module can be a lightweight database SQLite.
其中,控制集群、计算节点集群还可以包括虚拟网络资源配置所需的其他功能模块,比如计算节点服务器中还可以包括虚拟交换机、虚拟机等等,实施时其他功能模块可以根据需要进行设置。Among them, the control cluster and computing node cluster may also include other functional modules required for virtual network resource configuration, such as computing node servers may also include virtual switches, virtual machines, etc., and other functional modules may be set as required during implementation.
一种可选实施方式中,目标通道参数包括目标配置通道的通道名称和通道版本号,配置通道服务集群,在响应于接收到目标通道参数,从缓存的配置数据中,获取与目标通道参数匹配的当前配置数据时,用于:In an optional implementation, the target channel parameters include the channel name and channel version number of the target configuration channel, and the configuration channel service cluster, in response to receiving the target channel parameters, obtains the configuration data that matches the target channel parameters from the cached configuration data. When using the current configuration data for:
根据通道名称,从缓存的配置数据中获取目标配置通道的缓存版本号;在缓存版本号大于通道版本号时,基于通道版本号和预设数量,确定版本号范围;从缓存模块中获取与版本号范围匹配的配置数据;在成功获取到与版本号范围匹配的配置数据时,将获取到的配置数据作为当前配置数据。According to the channel name, obtain the cached version number of the target configuration channel from the cached configuration data; when the cached version number is greater than the channel version number, determine the version number range based on the channel version number and the preset number; obtain the version number from the cache module The configuration data that matches the version number range; when the configuration data that matches the version number range is successfully obtained, the obtained configuration data is used as the current configuration data.
目标通道参数可以包括目标配置通道的通道名称和通道版本号。配置通道服务集群在接收到目标通道参数之后,可以根据目标通道参数中的通道名称从缓存模块内获取目标配置通道的缓存版本号,该缓存版本号为目标配置通道的最新版本号。The target channel parameter may include the channel name and channel version number of the target configuration channel. After the configuration channel service cluster receives the target channel parameter, it can obtain the cache version number of the target configuration channel from the cache module according to the channel name in the target channel parameter, and the cache version number is the latest version number of the target configuration channel.
将目标通道参数中的通道版本号与缓存版本号进行对比,在缓存版本号大于通道版本号时,与计算节点中已接收到的增量配置数据相比,缓存模块中目标配置通道的增量配置数据是新的增量配置数据,故可以基于通道版本号和预设数量,确定版本号范围,比如,在通道版本号为version2.0、预设数量为N时,版本号范围可以为:version2.0+1至version2.0+N。再从缓存模块中获取与该版本号范围匹配的配置数据,比如获取目标配置通道内version2.0+1对应的配置数据、version2.0+2对应的配置数据、…、version2.0+N对应的配置数据。在成功获取到与版本号范围匹配的配置数据时,将获取到的配置数据作为当前配置数据。Compare the channel version number in the target channel parameter with the cache version number. When the cache version number is greater than the channel version number, compared with the incremental configuration data received in the computing node, the increment of the target configuration channel in the cache module The configuration data is new incremental configuration data, so the version number range can be determined based on the channel version number and the preset number. For example, when the channel version number is version2.0 and the preset number is N, the version number range can be: version2.0+1 to version2.0+N. Then obtain the configuration data matching the version number range from the cache module, such as obtaining the configuration data corresponding to version2.0+1, the configuration data corresponding to version2.0+2, ..., the configuration data corresponding to version2.0+N in the target configuration channel configuration data. When the configuration data matching the version number range is successfully obtained, the obtained configuration data is used as the current configuration data.
其中,目标通道参数中还可以包括计算节点的名称、预设数量等,使得配置通道服务集群可以根据预设数量确定版本号范围,根据计算节点的名称监控系统运行过程中的各个信息。Among them, the target channel parameters can also include the name of the computing node, the preset number, etc., so that the configuration channel service cluster can determine the version number range according to the preset number, and monitor various information in the system operation process according to the name of the computing node.
这里,目标通道参数包括目标配置通道的通道名称和通道版本号,通过目标通道参数,能够较准确的获取到所需的当前配置数据。同时,通过将缓存版本号与通道版本号进行比对,能够较快速的初步判断缓存模块中是否存在所需的增量配置数据。Here, the target channel parameter includes the channel name and channel version number of the target configuration channel, and the required current configuration data can be obtained more accurately through the target channel parameter. At the same time, by comparing the cache version number with the channel version number, it can be quickly and preliminarily judged whether the required incremental configuration data exists in the cache module.
一种可选实施方式中,配置通道服务集群,还用于:在从缓存的配置数据中未成功获取到与版本号范围匹配的配置数据时,获取配置数据存储集群内增量配置存储模块中存储的目标配置通道的最小版本号;确定通道版本号是否小于最小版本号;若是,则基于目标通道参数,从缓存的配置数据中获取目标配置通道对应的全量配置数据;若成功获取到全量配置数据,则将全量配置数据作为当前配置数据;若未能获取到全量配置数据,则从配置数据存储集群内全量配置存储模块中获取目标配置通道对应的全量配置数据,并将全量配置数据进行缓存。In an optional implementation, the configuration channel service cluster is also used for: when the configuration data that matches the version number range is not successfully obtained from the cached configuration data, obtain the configuration data in the incremental configuration storage module in the storage cluster The minimum version number of the stored target configuration channel; determine whether the channel version number is less than the minimum version number; if so, obtain the full configuration data corresponding to the target configuration channel from the cached configuration data based on the target channel parameters; if the full configuration is successfully obtained data, the full configuration data will be used as the current configuration data; if the full configuration data cannot be obtained, the full configuration data corresponding to the target configuration channel will be obtained from the full configuration storage module in the configuration data storage cluster, and the full configuration data will be cached .
实施时,在缓存版本号大于通道版本号时,存在从缓存模块中未成功获取到与版本号范围匹配的配置数据的情况,比如,在缓存模块中未包括版本号范围对应的全部增量配置数据时,则可能造成配置数据获取失败。这种情况下,可以获取配置数据存储集群内增量配置存储模块中存储的目标配置通道的最小版本号;其中,版本号越小,该版本号对应的增量配置数据放入配置通道的时间越早。During implementation, when the cache version number is greater than the channel version number, there are cases where the configuration data matching the version number range is not successfully obtained from the cache module, for example, all incremental configurations corresponding to the version number range are not included in the cache module data, it may cause configuration data acquisition failure. In this case, the minimum version number of the target configuration channel stored in the incremental configuration storage module in the configuration data storage cluster can be obtained; the smaller the version number, the time when the incremental configuration data corresponding to the version number is put into the configuration channel sooner.
再确定通道版本号是否小于最小版本号,若是,则表示通道版本号太旧,即计算节点中已接收到的增量配置数据可能为使用者较早时刻下发的较陈旧的增量配置数据,此时可以基于目标通道参数,从缓存模块(即缓存的配置数据)中获取目标配置通道对应的全量配置数据。若成功获取到全量配置数据,则将全量配置数据作为当前配置数据,以便计算节点能够快速的追平使用者的控制面;若未能获取到全量配置数据,则从配置数据存储集群内全量配置存储模块中获取目标配置通道对应的全量配置数据,并将全量配置数据缓存到缓存模块,以便计算节点下次能够基于目标通道参数获取到该全量配置数据。Then determine whether the channel version number is less than the minimum version number, if so, it means that the channel version number is too old, that is, the incremental configuration data received by the computing node may be the older incremental configuration data issued by the user earlier , at this time, the full amount of configuration data corresponding to the target configuration channel can be obtained from the cache module (that is, the cached configuration data) based on the target channel parameters. If the full amount of configuration data is successfully obtained, the full amount of configuration data will be used as the current configuration data, so that the computing node can quickly catch up with the user's control plane; The storage module obtains the full configuration data corresponding to the target configuration channel, and caches the full configuration data in the cache module, so that the computing node can obtain the full configuration data based on the target channel parameters next time.
在通道版本号大于或等于最小版本号时,可以获取缓存模块中目标配置通道对应的最大版本号、和增量配置存储模块中目标配置通道对应的最大版本号;在缓存模块的最大版本号小于增量配置存储模块的最大版本号时,表示缓存模块中目标配置通道对应的增量配置数据不包括最新的增量配置数据,可以将增量配置存储模块中目标配置通道对应的增量配置数据,同步到缓存模块。When the channel version number is greater than or equal to the minimum version number, the maximum version number corresponding to the target configuration channel in the cache module and the maximum version number corresponding to the target configuration channel in the incremental configuration storage module can be obtained; when the maximum version number of the cache module is less than When the maximum version number of the incremental configuration storage module is used, it means that the incremental configuration data corresponding to the target configuration channel in the cache module does not include the latest incremental configuration data, and the incremental configuration data corresponding to the target configuration channel in the incremental configuration storage module can be , synchronized to the cache module.
在缓存模块的最大版本号等于增量配置存储模块的最大版本号时,则表示缓存模块中目标配置通道对应的增量配置数据已追平增量配置存储模块,可以不进行同步操作。When the maximum version number of the cache module is equal to the maximum version number of the incremental configuration storage module, it means that the incremental configuration data corresponding to the target configuration channel in the cache module has equalized the incremental configuration storage module, and the synchronization operation may not be performed.
实施时,在将缓存版本号与通道版本号比对时,可能存在缓存版本号等于通道版本号的情况,这种情况下说明计算节点中目标配置通道的增量配置数据已追平vpc控制器下发的配置数据,此时可以不进行任何操作。During implementation, when comparing the cache version number with the channel version number, there may be a situation where the cache version number is equal to the channel version number. In this case, it means that the incremental configuration data of the target configuration channel in the computing node has equaled the vpc controller Delivered configuration data, you don't need to perform any operation at this time.
还可能存在缓存版本号小于通道版本号的情况,这种情况下说明缓存模块缓存的增量配置数据不属于最新的增量配置数据,此时可以获取缓存模块中目标配置通道对应的最大版本号、和增量配置存储模块中目标配置通道对应的最大版本号;在缓存模块的最大版本号小于增量配置存储模块的最大版本号时,将增量配置存储模块中目标配置通道对应的增量配置数据,同步到缓存模块,以便计算节点下次能够获取到当前配置数据。There may also be a case where the cache version number is smaller than the channel version number. In this case, the incremental configuration data cached by the cache module does not belong to the latest incremental configuration data. At this time, the maximum version number corresponding to the target configuration channel in the cache module can be obtained , and the maximum version number corresponding to the target configuration channel in the incremental configuration storage module; when the maximum version number of the cache module is less than the maximum version number of the incremental configuration storage module, the increment corresponding to the target configuration channel in the incremental configuration storage module The configuration data is synchronized to the cache module so that the computing node can obtain the current configuration data next time.
结合图6所示,对从缓存模块内缓存的配置数据中,获取与目标通道参数匹配的当前配置数据的过程进行详细说明。配置通道服务集群接收目标通道参数,即入参:计算节点的名称、通道版本号、通道名称、预设数量。再从缓存模块中获取目标配置通道的缓存版本号。判断缓存版本号是否大于通道版本号,若是,则去缓存模块中获取通道版本号+1至通道版本号+N对应的增量配置数据,其中,N为预设数量。若获取成功,则返回增量配置数据(即通道版本号+1至通道版本号+N对应的增量配置数据)。若未获取成功,则判断通道版本号是否小于增量配置存储模块中最小版本号,若是,则从缓存模块中获取全量配置数据,并在全量配置数据获取成功时,返回全量配置数据;若全量配置数据获取失败时,则执行:1、miss流程;2、从全量配置存储模块中获取全量配置数据放到缓存模块。其中,miss流程是指不向计算节点服务集群返回任何数据。With reference to FIG. 6 , the process of obtaining the current configuration data matching the target channel parameters from the configuration data cached in the cache module will be described in detail. Configure the channel service cluster to receive the target channel parameters, that is, the input parameters: the name of the computing node, the channel version number, the channel name, and the preset quantity. Then obtain the cache version number of the target configuration channel from the cache module. Determine whether the cache version number is greater than the channel version number, and if so, go to the cache module to obtain the incremental configuration data corresponding to the channel version number + 1 to the channel version number + N, where N is the preset number. If the acquisition is successful, the incremental configuration data (that is, the incremental configuration data corresponding to channel version number + 1 to channel version number + N) will be returned. If the acquisition is not successful, then judge whether the channel version number is less than the minimum version number in the incremental configuration storage module, if so, obtain the full configuration data from the cache module, and return the full configuration data when the full configuration data is successfully obtained; if the full When the acquisition of configuration data fails, execute: 1. The miss process; 2. Obtain the full configuration data from the full configuration storage module and put it in the cache module. Among them, the miss process means that no data is returned to the computing node service cluster.
若通道版本号大于或等于增量配置存储模块中最小版本号,则执行:1、miss流程;2、比较缓存模块和增量配置存储模块中目标配置通道的最大版本号,若缓存模块中的最大版本号落后,则从增量配置存储模块中同步数据到缓存模块。即比较缓存模块中目标配置通道的最大版本号和增量配置存储模块中目标配置通道的最大版本号,如果缓存模块中最大版本号小于增量配置存储模块中最大版本号,则从增量配置存储模块中同步数据到缓存模块中。If the channel version number is greater than or equal to the minimum version number in the incremental configuration storage module, then execute: 1, miss process; 2, compare the maximum version number of the target configuration channel in the cache module and the incremental configuration storage module, if the cache module If the maximum version number falls behind, the data is synchronized from the incremental configuration storage module to the cache module. That is, compare the maximum version number of the target configuration channel in the cache module with the maximum version number of the target configuration channel in the incremental configuration storage module. If the maximum version number in the cache module is smaller than the maximum version number in the incremental configuration storage module, start from the incremental configuration The data in the storage module is synchronized to the cache module.
若缓存版本号等于通道版本号,则不进行任何处理,即表明计算节点上已接收的目标配置通道的增量配置数据为最新的数据,无需进行数据拉取。若缓存版本号小于通道版本号,则执行:1、miss流程;2、比较缓存模块和增量配置存储模块中目标配置通道的最大版本号,若缓存模块中的最大版本号落后,则从增量配置存储模块中同步数据到缓存模块。If the cache version number is equal to the channel version number, no processing is performed, which means that the incremental configuration data of the target configuration channel received on the computing node is the latest data, and no data pull is required. If the cache version number is smaller than the channel version number, execute: 1. miss process; 2. compare the maximum version number of the target configuration channel in the cache module and the incremental configuration storage module. Synchronize data in the volume configuration storage module to the cache module.
本领域技术人员可以理解,在具体实施方式的上述方法中,各步骤的撰写顺序并不意味着严格的执行顺序而对实施过程构成任何限定,各步骤的具体执行顺序应当以其功能和可能的内在逻辑确定。Those skilled in the art can understand that in the above method of specific implementation, the writing order of each step does not mean a strict execution order and constitutes any limitation on the implementation process. The specific execution order of each step should be based on its function and possible The inner logic is OK.
基于相同的构思,本公开实施例还提供了一种网络配置下发方法,参见图7所示,为本公开实施例提供的网络配置下发方法的流程示意图,包括以下步骤:Based on the same idea, the embodiment of the present disclosure also provides a method for delivering network configuration, as shown in FIG. 7 , which is a schematic flowchart of the method for delivering network configuration provided by the embodiment of the present disclosure, including the following steps:
S701,接收并缓存控制集群发送的增量配置数据和为所述增量配置数据生成的通道参数;S701. Receive and cache incremental configuration data sent by the control cluster and channel parameters generated for the incremental configuration data;
S702,接收计算节点集群周期性发送的目标通道参数;S702. Receive target channel parameters periodically sent by the computing node cluster;
S703,响应于接收到所述目标通道参数,从缓存的配置数据中,获取与所述目标通道参数匹配的当前配置数据;在从缓存的配置数据中获取到所述当前配置数据时,将所述当前配置数据发送给所述计算节点集群;在从缓存的配置数据中未获取到所述当前配置数据时,从所述配置数据存储集群中获取所述当前配置数据,并将所述当前配置数据进行缓存。S703. In response to receiving the target channel parameters, acquire current configuration data matching the target channel parameters from the cached configuration data; when the current configuration data is acquired from the cached configuration data, store the current configuration data The current configuration data is sent to the computing node cluster; when the current configuration data is not obtained from the cached configuration data, the current configuration data is obtained from the configuration data storage cluster, and the current configuration Data is cached.
一种可选实施方式中,所述目标通道参数包括目标配置通道的通道名称和通道版本号,所述响应于接收到所述目标通道参数,从缓存的配置数据中,获取与所述目标通道参数匹配的当前配置数据,包括:In an optional implementation manner, the target channel parameter includes a channel name and a channel version number of the target configuration channel, and in response to receiving the target channel parameter, obtain the configuration data related to the target channel from cached configuration data. Current configuration data for parameter matching, including:
根据所述通道名称,从缓存的配置数据中获取所述目标配置通道的缓存版本号;Obtain the cached version number of the target configuration channel from the cached configuration data according to the channel name;
在所述缓存版本号大于所述通道版本号时,基于所述通道版本号和预设数量,确定版本号范围;When the cache version number is greater than the channel version number, determine a version number range based on the channel version number and a preset number;
从缓存的配置数据中获取与所述版本号范围匹配的配置数据;Obtain configuration data matching the version number range from cached configuration data;
在成功获取到与所述版本号范围匹配的配置数据时,将获取到的配置数据作为当前配置数据。When the configuration data matching the version number range is successfully acquired, the acquired configuration data is used as the current configuration data.
一种可选实施方式中,所述方法还包括:In an optional embodiment, the method further includes:
在从缓存的配置数据中未成功获取到与所述版本号范围匹配的配置数据时,获取所述配置数据存储集群内增量配置存储模块中存储的所述目标配置通道的最小版本号;When the configuration data matching the version number range is not successfully obtained from the cached configuration data, obtain the minimum version number of the target configuration channel stored in the incremental configuration storage module in the configuration data storage cluster;
确定所述通道版本号是否小于所述最小版本号;determining whether the channel version number is less than the minimum version number;
若是,则基于所述目标通道参数,从缓存的配置数据中获取所述目标配置通道对应的全量配置数据;If so, based on the target channel parameters, obtain the full configuration data corresponding to the target configuration channel from the cached configuration data;
若成功获取到全量配置数据,则将所述全量配置数据作为当前配置数据;If the full configuration data is successfully acquired, then use the full configuration data as the current configuration data;
若未能获取到全量配置数据,则从所述配置数据存储集群内全量配置存储模块中获取所述目标配置通道对应的全量配置数据,并将所述全量配置数据进行缓存。If the full configuration data cannot be obtained, the full configuration data corresponding to the target configuration channel is obtained from the full configuration storage module in the configuration data storage cluster, and the full configuration data is cached.
一种可选实施方式中,所述方法还包括:In an optional embodiment, the method further includes:
在所述通道版本号大于或等于所述最小版本号时,和/或,在所述缓存版本号小于所述通道版本号时,进行以下过程:When the channel version number is greater than or equal to the minimum version number, and/or, when the cache version number is smaller than the channel version number, perform the following process:
获取缓存的配置数据中所述目标配置通道对应的最大版本号、和所述增量配置存储模块中所述目标配置通道对应的最大版本号;Obtaining the maximum version number corresponding to the target configuration channel in the cached configuration data and the maximum version number corresponding to the target configuration channel in the incremental configuration storage module;
在所述缓存模块的所述最大版本号小于所述增量配置存储模块的所述最大版本号时,获取并缓存所述增量配置存储模块中所述目标配置通道对应的增量配置数据。When the maximum version number of the cache module is smaller than the maximum version number of the incremental configuration storage module, acquire and cache incremental configuration data corresponding to the target configuration channel in the incremental configuration storage module.
基于相同的构思,本公开实施例还提供了一种网络配置下发装置,参见图8所示,为本公开实施例提供的网络配置下发装置的架构示意图,具体的:Based on the same idea, the embodiment of the present disclosure also provides a device for delivering network configuration. Referring to FIG. 8 , it is a schematic diagram of the architecture of the device for delivering network configuration provided by the embodiment of the present disclosure. Specifically:
第一接收模块801,用于接收并缓存控制集群发送的增量配置数据和为所述增量配置数据生成的通道参数;The first receiving module 801 is configured to receive and cache incremental configuration data sent by the control cluster and channel parameters generated for the incremental configuration data;
第二接收模块802,用于接收计算节点集群周期性发送的目标通道参数;The second receiving module 802 is configured to receive target channel parameters periodically sent by the computing node cluster;
获取模块803,用于响应于接收到目标通道参数,从缓存的配置数据中,获取与所述目标通道参数匹配的当前配置数据;在从缓存的配置数据中获取到所述当前配置数据时,将所述当前配置数据发送给所述计算节点集群;在从缓存的配置数据中未获取到所述当前配置数据时,从所述配置数据存储集群中获取所述当前配置数据,并将所述当前配置数据进行缓存。The obtaining module 803 is configured to obtain, from the cached configuration data, current configuration data matching the target channel parameters in response to receiving the target channel parameters; when the current configuration data is obtained from the cached configuration data, Send the current configuration data to the computing node cluster; when the current configuration data is not obtained from the cached configuration data, obtain the current configuration data from the configuration data storage cluster, and transfer the The current configuration data is cached.
一种可能的实施方式中,所述目标通道参数包括目标配置通道的通道名称和通道版本号,所述获取模块803,在响应于接收到目标通道参数,从缓存的配置数据中,获取与目标通道参数匹配的当前配置数据时,用于:In a possible implementation manner, the target channel parameters include the channel name and channel version number of the target configuration channel, and the obtaining module 803, in response to receiving the target channel parameters, obtains the When the channel parameter matches the current configuration data, it is used to:
根据所述通道名称,从缓存的配置数据中获取所述目标配置通道的缓存版本号;Obtain the cached version number of the target configuration channel from the cached configuration data according to the channel name;
在所述缓存版本号大于所述通道版本号时,基于所述通道版本号和预设数量,确定版本号范围;When the cache version number is greater than the channel version number, determine a version number range based on the channel version number and a preset number;
从缓存的配置数据中获取与所述版本号范围匹配的配置数据;Obtain configuration data matching the version number range from cached configuration data;
在成功获取到与所述版本号范围匹配的配置数据时,将获取到的配置数据作为当前配置数据。When the configuration data matching the version number range is successfully acquired, the acquired configuration data is used as the current configuration data.
一种可选实施方式中,所述获取模块803,还用于:In an optional implementation manner, the acquiring module 803 is also configured to:
在从缓存的配置数据中未成功获取到与所述版本号范围匹配的配置数据时,获取所述配置数据存储集群内增量配置存储模块中存储的所述目标配置通道的最小版本号;When the configuration data matching the version number range is not successfully obtained from the cached configuration data, obtain the minimum version number of the target configuration channel stored in the incremental configuration storage module in the configuration data storage cluster;
确定所述通道版本号是否小于所述最小版本号;determining whether the channel version number is less than the minimum version number;
若是,则基于所述目标通道参数,从缓存的配置数据中获取所述目标配置通道对应的全量配置数据;If so, based on the target channel parameters, obtain the full configuration data corresponding to the target configuration channel from the cached configuration data;
若成功获取到全量配置数据,则将所述全量配置数据作为当前配置数据;If the full configuration data is successfully acquired, then use the full configuration data as the current configuration data;
若未能获取到全量配置数据,则从所述配置数据存储集群内全量配置存储模块中获取所述目标配置通道对应的全量配置数据,并将所述全量配置数据进行缓存。If the full configuration data cannot be obtained, the full configuration data corresponding to the target configuration channel is obtained from the full configuration storage module in the configuration data storage cluster, and the full configuration data is cached.
一种可选实施方式中,所述获取模块803,还用于:In an optional implementation manner, the acquiring module 803 is also configured to:
在所述通道版本号大于或等于所述最小版本号时,和/或,在所述缓存版本号小于所述通道版本号时,进行以下过程:When the channel version number is greater than or equal to the minimum version number, and/or, when the cache version number is smaller than the channel version number, perform the following process:
获取缓存的配置数据中所述目标配置通道对应的最大版本号、和所述增量配置存储模块中所述目标配置通道对应的最大版本号;Obtaining the maximum version number corresponding to the target configuration channel in the cached configuration data and the maximum version number corresponding to the target configuration channel in the incremental configuration storage module;
在所述缓存模块的所述最大版本号小于所述增量配置存储模块的所述最大版本号时,获取并缓存所述增量配置存储模块中所述目标配置通道对应的增量配置数据。When the maximum version number of the cache module is smaller than the maximum version number of the incremental configuration storage module, acquire and cache incremental configuration data corresponding to the target configuration channel in the incremental configuration storage module.
在一些实施例中,本公开实施例提供的装置具有的功能或包含的模板可以用于执行上文方法实施例描述的方法,其具体实现可以参照上文方法实施例的描述,为了简洁,这里不再赘述。In some embodiments, the functions of the device provided by the embodiments of the present disclosure or the included templates can be used to execute the methods described in the above method embodiments, and its specific implementation can refer to the description of the above method embodiments. For brevity, here No longer.
基于同一技术构思,本公开实施例还提供了一种电子设备。参照图9所示,为本公开实施例提供的电子设备900的结构示意图,包括处理器901、存储器902、和总线903。其中,存储器902用于存储执行指令,包括内存9021和外部存储器9022;这里的内存9021也称内存储器,用于暂时存放处理器901中的运算数据,以及与硬盘等外部存储器9022交换的数据,处理器901通过内存9021与外部存储器9022进行数据交换,当电子设备900运行时,处理器901与存储器902之间通过总线903通信,使得处理器901在执行以下指令:Based on the same technical idea, an embodiment of the present disclosure also provides an electronic device. Referring to FIG. 9 , it is a schematic structural diagram of an electronic device 900 provided by an embodiment of the present disclosure, including a processor 901 , a memory 902 , and a bus 903 . Among them, the memory 902 is used to store execution instructions, including a memory 9021 and an external memory 9022; the memory 9021 here is also called an internal memory, and is used to temporarily store calculation data in the processor 901 and exchange data with an external memory 9022 such as a hard disk. The processor 901 exchanges data with the external memory 9022 through the memory 9021. When the electronic device 900 is running, the processor 901 communicates with the memory 902 through the bus 903, so that the processor 901 executes the following instructions:
接收并缓存控制集群发送的增量配置数据和为所述增量配置数据生成的通道参数;Receive and cache the incremental configuration data sent by the control cluster and the channel parameters generated for the incremental configuration data;
接收计算节点集群周期性发送的目标通道参数;Receive the target channel parameters periodically sent by the computing node cluster;
响应于接收到所述目标通道参数,从缓存的配置数据中,获取与所述目标通道参数匹配的当前配置数据;在从缓存的配置数据中获取到所述当前配置数据时,将所述当前配置数据发送给所述计算节点集群;在从缓存的配置数据中未获取到所述当前配置数据时,从所述配置数据存储集群中获取所述当前配置数据,并将所述当前配置数据进行缓存。Responding to receiving the target channel parameters, from the cached configuration data, obtain current configuration data that matches the target channel parameters; when the current configuration data is obtained from the cached configuration data, use the current The configuration data is sent to the computing node cluster; when the current configuration data is not obtained from the cached configuration data, the current configuration data is obtained from the configuration data storage cluster, and the current configuration data is processed cache.
一种可能的设计中,处理器901执行的指令中,所述目标通道参数包括目标配置通道的通道名称和通道版本号,所述响应于接收到所述目标通道参数,从缓存的配置数据中,获取与所述目标通道参数匹配的当前配置数据,包括:In a possible design, in the instructions executed by the processor 901, the target channel parameters include the channel name and channel version number of the target configuration channel, and in response to receiving the target channel parameters, from the cached configuration data , to obtain the current configuration data matching the target channel parameters, including:
根据所述通道名称,从缓存的配置数据中获取所述目标配置通道的缓存版本号;Obtain the cached version number of the target configuration channel from the cached configuration data according to the channel name;
在所述缓存版本号大于所述通道版本号时,基于所述通道版本号和预设数量,确定版本号范围;When the cache version number is greater than the channel version number, determine a version number range based on the channel version number and a preset number;
从缓存的配置数据中获取与所述版本号范围匹配的配置数据;Obtain configuration data matching the version number range from cached configuration data;
在成功获取到与所述版本号范围匹配的配置数据时,将获取到的配置数据作为当前配置数据。When the configuration data matching the version number range is successfully acquired, the acquired configuration data is used as the current configuration data.
一种可能的设计中,处理器901执行的指令中,所述方法还包括:In a possible design, in the instructions executed by the processor 901, the method further includes:
在从缓存的配置数据中未成功获取到与所述版本号范围匹配的配置数据时,获取所述配置数据存储集群内增量配置存储模块中存储的所述目标配置通道的最小版本号;When the configuration data matching the version number range is not successfully obtained from the cached configuration data, obtain the minimum version number of the target configuration channel stored in the incremental configuration storage module in the configuration data storage cluster;
确定所述通道版本号是否小于所述最小版本号;determining whether the channel version number is less than the minimum version number;
若是,则基于所述目标通道参数,从缓存的配置数据中获取所述目标配置通道对应的全量配置数据;If so, based on the target channel parameters, obtain the full configuration data corresponding to the target configuration channel from the cached configuration data;
若成功获取到全量配置数据,则将所述全量配置数据作为当前配置数据;If the full configuration data is successfully acquired, then use the full configuration data as the current configuration data;
若未能获取到全量配置数据,则从所述配置数据存储集群内全量配置存储模块中获取所述目标配置通道对应的全量配置数据,并将所述全量配置数据进行缓存。If the full configuration data cannot be obtained, the full configuration data corresponding to the target configuration channel is obtained from the full configuration storage module in the configuration data storage cluster, and the full configuration data is cached.
一种可能的设计中,处理器901执行的指令中,所述方法还包括:In a possible design, in the instructions executed by the processor 901, the method further includes:
在所述通道版本号大于或等于所述最小版本号时,和/或,在所述缓存版本号小于所述通道版本号时,进行以下过程:When the channel version number is greater than or equal to the minimum version number, and/or, when the cache version number is smaller than the channel version number, perform the following process:
获取缓存的配置数据中所述目标配置通道对应的最大版本号、和所述增量配置存储模块中所述目标配置通道对应的最大版本号;Obtaining the maximum version number corresponding to the target configuration channel in the cached configuration data and the maximum version number corresponding to the target configuration channel in the incremental configuration storage module;
在所述缓存模块的所述最大版本号小于所述增量配置存储模块的所述最大版本号时,获取并缓存所述增量配置存储模块中所述目标配置通道对应的增量配置数据。When the maximum version number of the cache module is smaller than the maximum version number of the incremental configuration storage module, acquire and cache incremental configuration data corresponding to the target configuration channel in the incremental configuration storage module.
其中,处理器901的具体处理流程可以参照上述方法实施例的记载,这里不再赘述。Wherein, for the specific processing flow of the processor 901, reference may be made to the descriptions in the foregoing method embodiments, and details are not repeated here.
此外,本公开实施例还提供一种计算机可读存储介质,该计算机可读存储介质上存储有计算机程序,该计算机程序被处理器运行时执行上述方法实施例中所述的网络配置下发方法的步骤。其中,该存储介质可以是易失性或非易失的计算机可读取存储介质。In addition, an embodiment of the present disclosure also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is run by a processor, the method for delivering the network configuration described in the foregoing method embodiments is executed. A step of. Wherein, the storage medium may be a volatile or non-volatile computer-readable storage medium.
本公开实施例还提供一种计算机程序产品,该计算机程序产品承载有程序代码,所述程序代码包括的指令可用于执行上述方法实施例中所述的网络配置下发方法的步骤,具体可参见上述方法实施例,在此不再赘述。Embodiments of the present disclosure also provide a computer program product, the computer program product carries a program code, and the instructions included in the program code can be used to execute the steps of the method for delivering the network configuration described in the above method embodiments. For details, please refer to The foregoing method embodiments are not described in detail here.
其中,上述计算机程序产品可以具体通过硬件、软件或其结合的方式实现。在一个可选实施例中,所述计算机程序产品具体体现为计算机存储介质,在另一个可选实施例中,计算机程序产品具体体现为软件产品,例如软件开发包(Software Development Kit,SDK)等等。Wherein, the above-mentioned computer program product may be specifically implemented by means of hardware, software or a combination thereof. In an optional embodiment, the computer program product is embodied as a computer storage medium. In another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (Software Development Kit, SDK), etc. wait.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统和装置的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。在本公开所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,又例如,多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些通信接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working process of the above-described system and device can refer to the corresponding process in the foregoing method embodiments, which will not be repeated here. In the several embodiments provided in the present disclosure, it should be understood that the disclosed systems, devices and methods may be implemented in other ways. The device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some communication interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本公开各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个处理器可执行的非易失的计算机可读取存储介质中。基于这样的理解,本公开的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本公开各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-OnlyMemory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the functions are realized in the form of software function units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium executable by a processor. Based on this understanding, the technical solution of the present disclosure is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in various embodiments of the present disclosure. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk, and other media that can store program codes.
以上仅为本公开的具体实施方式,但本公开的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本公开揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本公开的保护范围之内。因此,本公开的保护范围应以权利要求的保护范围为准。The above is only the specific implementation of the present disclosure, but the scope of protection of the present disclosure is not limited thereto. Anyone skilled in the art can easily think of changes or substitutions within the technical scope of the present disclosure, which should be covered within the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be determined by the protection scope of the claims.
Claims (16)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211422135.8A CN115766455B (en) | 2022-11-14 | 2022-11-14 | Network configuration distribution system, method, device, electronic device and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211422135.8A CN115766455B (en) | 2022-11-14 | 2022-11-14 | Network configuration distribution system, method, device, electronic device and storage medium |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN115766455A true CN115766455A (en) | 2023-03-07 |
| CN115766455B CN115766455B (en) | 2024-11-19 |
Family
ID=85370497
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202211422135.8A Active CN115766455B (en) | 2022-11-14 | 2022-11-14 | Network configuration distribution system, method, device, electronic device and storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN115766455B (en) |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103532731A (en) * | 2012-07-06 | 2014-01-22 | 杭州华三通信技术有限公司 | method and device for preventing network configuration of virtual machine from losing |
| US20210028987A1 (en) * | 2019-07-23 | 2021-01-28 | EMC IP Holding Company, LLC | System and method for network validation architecture for clustered and federated storage systems |
| CN114500257A (en) * | 2021-12-09 | 2022-05-13 | 深信服科技股份有限公司 | Network configuration distribution method, device, control node and storage medium |
| CN115048188A (en) * | 2022-06-28 | 2022-09-13 | 绿盟科技集团股份有限公司 | Network isolation control system and method for container, electronic device and storage medium |
| CN115242597A (en) * | 2022-06-30 | 2022-10-25 | 北京百度网讯科技有限公司 | Information processing method, device and storage medium |
-
2022
- 2022-11-14 CN CN202211422135.8A patent/CN115766455B/en active Active
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103532731A (en) * | 2012-07-06 | 2014-01-22 | 杭州华三通信技术有限公司 | method and device for preventing network configuration of virtual machine from losing |
| US20210028987A1 (en) * | 2019-07-23 | 2021-01-28 | EMC IP Holding Company, LLC | System and method for network validation architecture for clustered and federated storage systems |
| CN114500257A (en) * | 2021-12-09 | 2022-05-13 | 深信服科技股份有限公司 | Network configuration distribution method, device, control node and storage medium |
| CN115048188A (en) * | 2022-06-28 | 2022-09-13 | 绿盟科技集团股份有限公司 | Network isolation control system and method for container, electronic device and storage medium |
| CN115242597A (en) * | 2022-06-30 | 2022-10-25 | 北京百度网讯科技有限公司 | Information processing method, device and storage medium |
Also Published As
| Publication number | Publication date |
|---|---|
| CN115766455B (en) | 2024-11-19 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN113508372B (en) | Systems, methods, and media for metadata routing in a distributed system | |
| CN108989430B (en) | Load balancing method, device and storage medium | |
| US9262323B1 (en) | Replication in distributed caching cluster | |
| US20130311424A1 (en) | Distributed database | |
| CN112543222B (en) | Data processing method and device, computer equipment and storage medium | |
| CN107483250A (en) | Distributed configuration management method, device and system for realizing distributed configuration management | |
| CN108683668B (en) | Resource checking method, device, storage medium and equipment in content distribution network | |
| CN104980519A (en) | Multi-computer room storage system | |
| CN111338806B (en) | Service control method and device | |
| CN104823170A (en) | Distributed cache cluster management | |
| US9529772B1 (en) | Distributed caching cluster configuration | |
| CN109639773B (en) | Dynamically constructed distributed data cluster control system and method thereof | |
| CN104468150A (en) | Method for realizing fault migration through virtual host and virtual host service device | |
| US9760370B2 (en) | Load balancing using predictable state partitioning | |
| JP2024514467A (en) | Geographically distributed hybrid cloud cluster | |
| CN113079098A (en) | Method, device, equipment and computer readable medium for updating route | |
| EP3829139A1 (en) | Distributed storage system for storing context data | |
| CN111064643B (en) | Node server and data interaction method and related device thereof | |
| CN116134435B (en) | Cache update through distributed message queues | |
| CN111770176A (en) | Traffic scheduling method and device | |
| CN114124890B (en) | A determination method, virtual router, control device and domain name resolution system | |
| CN113726546A (en) | Configuration method, device, system, computing equipment and storage medium | |
| CN107231423B (en) | File distribution method and system | |
| CN113360689A (en) | Image retrieval system, method, related device and computer program product | |
| CN115766455A (en) | Network configuration issuing system, method and device, electronic equipment and storage medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |