WO2021051881A1 - Vpp 集群管理方法及装置、计算机设备及存储介质 - Google Patents

Vpp 集群管理方法及装置、计算机设备及存储介质 Download PDF

Info

Publication number
WO2021051881A1
WO2021051881A1 PCT/CN2020/093612 CN2020093612W WO2021051881A1 WO 2021051881 A1 WO2021051881 A1 WO 2021051881A1 CN 2020093612 W CN2020093612 W CN 2020093612W WO 2021051881 A1 WO2021051881 A1 WO 2021051881A1
Authority
WO
WIPO (PCT)
Prior art keywords
vpp
cluster
sub
operation log
node
Prior art date
Application number
PCT/CN2020/093612
Other languages
English (en)
French (fr)
Inventor
杨远强
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2021051881A1 publication Critical patent/WO2021051881A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • This application relates to the field of block storage, and in particular to a VPP cluster management method and device, computer equipment and storage medium.
  • VPP Vector Packet Processing, Vector Packet Processing Library
  • FD.io provides product-level quality user space switch/router functions for general-purpose CPUs, which can be deployed on physical or virtual machines.
  • the so-called VPP vector message processing is relative to the traditional scalar message processing.
  • the traditional message processing method is also a common logical way of thinking by humans, that is: messages are processed in the order of arrival, the first message is processed, the second is processed, and so on; A calls B calls C...return, the function will frequently nested calls, and eventually return.
  • Cloud computing is based on the increase, use, and interaction modes of Internet-related services, which usually involve the provision of dynamic, easily expandable and often virtualized resources through the Internet.
  • cloud computing scenarios a high-availability cluster mode is necessary.
  • VPP itself does not provide a cluster mode.
  • the inventor realizes that the current configuration management is mainly through manual or script batch configuration and management, which brings difficulties to the persistence and management of subsequent cluster configuration. Lack of flexibility and scalability.
  • This application provides a VPP cluster management method and device, computer equipment, and storage medium.
  • the main purpose is to select VPP nodes with the same label as the VPP sub-cluster, and call the processing function according to the received VPP sub-cluster node information to perform the VPP sub-cluster.
  • the cluster is managed and operated, thereby realizing arbitrary horizontal expansion of the managed VPP cluster, improving the flexibility of VPP cluster management, and adapting to the unified orchestration management of the cloud platform.
  • the VPP cluster management method provided by this application is applied to computer equipment, and the method includes:
  • VPP nodes Label the VPP nodes according to the attributes of the VPP nodes in the pre-built VPP cluster, and select the VPP nodes with the same label as a VPP sub-cluster for management;
  • the management and configuration operations of the VPP nodes in the VPP sub-cluster are encapsulated into RESTAPI, and the REST The API is provided to the cloud console to cooperate with the front end to realize visual management, and the REST API is used to provide a rest interface intersecting with the VPP sub-cluster;
  • this application also provides a VPP cluster management device, including:
  • the label generation module is used to label the VPP nodes according to the attributes of the VPP nodes in the pre-built VPP cluster;
  • the encapsulation module is used to encapsulate the management and configuration operations of the VPP nodes in the VPP sub-cluster into a RESTAPI, and integrate the REST
  • the API is provided to the cloud console to cooperate with the front end to realize visual management, and the REST API is used to provide a rest interface intersecting with the VPP sub-cluster;
  • a data model acquisition module configured to acquire a data model according to the received http request through the rest interface
  • a log formation and storage module configured to form an operation log according to the data model and information of each VPP node in the VPP sub-cluster related to the REST API, and store the operation log in a database;
  • a log issuing module configured to obtain the operation log from the database, and deliver the operation log to the VPP sub-cluster;
  • the call processing module is used to call a processing function to manage and operate the VPP sub-cluster according to the VPP node information carried in the operation log.
  • the present application also provides a computer-readable storage medium, wherein the computer-readable storage medium includes a VPP cluster management analysis program, and the VPP cluster management analysis program is executed by a processor. The following steps:
  • VPP nodes Label the VPP nodes according to the attributes of the VPP nodes in the pre-built VPP cluster, and select the VPP nodes with the same label as a VPP sub-cluster for management;
  • the management and configuration operations of the VPP nodes in the VPP sub-cluster are encapsulated into a REST API, and the REST API is provided to the cloud console to cooperate with the front-end to achieve visual management.
  • the REST API is used to provide the same with the VPP sub-cluster. Intersecting rest interface;
  • this application also provides a VPP cluster management computer device, which includes a memory, a processor, and a VPP cluster management analysis program stored in the memory and running on the processor.
  • VPP cluster management analysis program When the VPP cluster management analysis program is executed by the processor, the following steps are implemented:
  • VPP nodes Label the VPP nodes according to the attributes of the VPP nodes in the pre-built VPP cluster, and select the VPP nodes with the same label as a VPP sub-cluster for management;
  • the management and configuration operations of the VPP nodes in the VPP sub-cluster are encapsulated into RESTAPI, and the REST The API is provided to the cloud console to cooperate with the front end to realize visual management, and the REST API is used to provide a rest interface intersecting with the VPP sub-cluster;
  • the VPP cluster management method and device, computer equipment, and storage medium proposed in this application receive http requests through the rest interface, obtain VPP cluster node information, form an operation log including VPP cluster node information, and send it to the VPP sub-cluster,
  • the ETCD in the VPP sub-cluster calls the processing function according to the received operation log to manage and operate the VPP cluster.
  • the VPP sub-clusters can be divided arbitrarily, which realizes the flexible expansion of the VPP sub-clusters and effectively improves the VPP
  • the flexibility of cluster management adapts to the unified orchestration management of the cloud platform and realizes the efficiency, reliability, consistency and persistence of VPP cluster configuration management.
  • FIG. 1 is a schematic diagram of an application environment of an embodiment of a VPP cluster management method according to an embodiment of the application;
  • FIG. 2 is a flowchart of a VPP cluster management method according to an embodiment of the application
  • FIG. 3 is a system framework diagram in a VPP cluster management computer device according to an embodiment of the application.
  • Fig. 4 is a schematic structural diagram of a computer device according to an embodiment of the present application.
  • ETCD distributed key-value storage
  • ETCD distributed key-value storage
  • It implements the raft algorithm, which can efficiently solve the log content consistency of each node in a distributed system
  • it also makes the cluster have a certain fault tolerance. Even if some node failures and network failures occur in the cluster, the correct stepping of most of the remaining nodes can still be guaranteed. Even when more nodes fail and the cluster is unavailable, it can still be guaranteed that the data in the nodes will not have erroneous results. Therefore, in this application, a VPP cluster management solution based on ETCD is adopted to ensure the reliability of VPP cluster management.
  • this application provides a VPP cluster management method, which is applied to a computer device 40.
  • a VPP cluster management method which is applied to a computer device 40.
  • FIG. 1 this is a schematic diagram of an application environment of a preferred embodiment of the VPP cluster management method of this application.
  • FIG. 1 is a schematic diagram of an application environment of a preferred embodiment of the VPP cluster management method of this application.
  • the implementation environment includes a computer device 110 and a computer device 120.
  • the computer equipment 110 is a single-node computer equipment in the cluster, such as a computer in a VPP cluster node.
  • the computer equipment 110 and the computer equipment 120 are part of the nodes in the VPP cluster.
  • the computer equipment 110 and the computer equipment 120 are composed of FIG. 2.
  • the computer device 110 and the computer device 120 can be a tablet computer, a notebook computer, a desktop computer, etc., which are a cenOS (linux) system. It is best to use a virtual machine. Git and go have been installed, but not limited to this.
  • the computer device 110 and the terminal 110 may be connected via Bluetooth, USB (Universal Serial Bus, Universal Serial Bus) or other communication connection methods, and this application is not limited here.
  • Fig. 2 is a flowchart of a VPP cluster management method according to an embodiment of the present application.
  • the VPP cluster management method includes the following steps:
  • the management and configuration operations of the VPP nodes in the VPP sub-cluster are encapsulated into REST (Representational State Transfer) API (Application Programming Interface), and provide the REST API to the cloud console to cooperate with the front-end to achieve visual management.
  • REST Real-Representational State Transfer
  • the REST API is used to provide the rest interface that intersects with the VPP sub-cluster;
  • the data model is obtained through the rest interface according to the received http request, and the operation log is formed according to the data model and the information of each VPP node in the VPP sub-cluster related to the REST API, and the operation log is stored (ie, persistent ) Into the database;
  • the operation log is obtained from the database, and the operation log is delivered to the VPP sub-cluster, the processing function is called according to the VPP node information carried in the operation log, and the VPP sub-cluster is managed and operated according to the processing function.
  • the VPP sub-cluster can be selected by the scheduler, and the scheduler is configured through the preset scheduling algorithm, and the scheduler arbitrarily implements the VPP sub-cluster according to the pre-configured scheduling algorithm
  • the horizontal expansion of VPP that is, through the group label configuration of the VPP sub-cluster, flexibly add VPP nodes with the same type of label to the VPP sub-cluster;
  • the aforementioned preset scheduling algorithm can specify one or more schedulers through the configuration file, and the scheduling algorithm can include the following scheduling rules:
  • Rule 1 Determine the load weight of the VPP node by the load of the VPP node, and the VPP node with a low load has a heavier load;
  • Rule 2 Determine the bearer weight of the VPP node by the number of configurations carried by the VPP node. The smaller the number of configurations, the greater the bearer weight of the VPP node;
  • Rule three select or filter according to the label attributes of the VPP node, and the label attributes are determined by the management personnel;
  • Rule four specify the number of VPP nodes, and randomly select VPP nodes.
  • VPP sub-cluster you can use any one of the scheduling rules in the above scheduling algorithm to select VPP nodes. If the first or second scheduling rules are used, the nodes with significant weight are selected as the VPP nodes to form the VPP node. VPP sub-cluster; the first and second scheduling rules can also be used to calculate the weight sum, and the node with the larger weight sum is selected as the node of the sub-cluster.
  • the management and configuration operations of the VPP nodes in the determined VPP sub-cluster can be encapsulated into a REST API, because the REST API can provide a rest interface that intersects with the VPP sub-cluster. Therefore, in order to cooperate with the front-end to achieve visual management, it is also necessary to encapsulate the REST The API is provided to the cloud console.
  • NSP Network Services Protocal
  • REST API is a protocol in the DECnet protocol suite, which controls the flow of network layer routing protocols to provide
  • the virtual connection service integrates the management operation of the VPP cluster into the NSP (Network Service Platform) in the form of a REST interface by adding a plug-in, and connects to the cloud console to realize visual operation.
  • the API is encapsulated by the NSP (Network Services Protocal Network Service Protocol) extension plug-in, which is provided by Paste + PasteDeploy + Routes + WebOb framework implementation; Paste, PasteDeploy, Routes and WebOb are respectively responsible for the application's WSGIization, URL routing, and request processing functions.
  • NSP Network Services Protocal Network Service Protocol
  • Paste, PasteDeploy, Routes and WebOb are respectively responsible for the application's WSGIization, URL routing, and request processing functions.
  • Paste PasteDeploy, Routes, and WebOb are all common architectures in this field. Therefore, these structures are not described in detail here.
  • the fields that constitute the data model include at least: journal_id, etcd_path, action, data;
  • journal_id is the id of the operation task
  • etcd_path is the directory monitored by the vpp node
  • action is the corresponding operation action
  • data is the configuration data that needs to be issued for vpp.
  • the process of obtaining and issuing specific logs may include the following steps:
  • ETCD server When obtaining the operation log, taking into account the high availability mode of the server, first obtain the distributed lock of the main process from ETCD. After obtaining the distributed lock, the operation log is encapsulated into a data transmission format that conforms to ETCD through the do_work general function. EtcdClient (ETCD server), sends operation logs to the ETCD in the VPP sub-cluster.
  • ETCD server EtcdClient
  • ETCD calls the processing function according to the received operation log, and the process of managing and operating the VPP sub-cluster includes:
  • VPP-agent Run VPP-agent on each VPP node in the VPP sub-cluster.
  • the VPP-agent monitors the key corresponding to the ETCD in the VPP sub-cluster that receives the operation log through the watch service discovery function of ETCD;
  • the key corresponds to the ETCD that receives the operation log.
  • Services for managing and operating VPP sub-clusters include:
  • the VPP-agent service needs to use the ETCD service discovery function to regularly report to the NSP network service platform ( Network Service Platform) report Agent and VPP service status information.
  • ETCD efficient read and write capabilities ensure the timeliness of configuration overloads.
  • the VPP cluster mode with ETCD ensures high data reliability and will persist to distribution.
  • the operation log of the ETCD key-value database is re-issued to the VPP service, so that the configuration is not lost after the VPP service restarts.
  • the corresponding VPP node agent module When re-issued to the VPP service, the corresponding VPP node agent module will monitor the ETCD directory created based on the node name. When it detects that the VPP process id has changed, it will write a value to this directory, and the server finds that this directory has a value. The operation task of this node will be skipped and returned to the task queue to ensure the availability of the network service platform (NSP) and data consistency when the VPP service restarts; the agent module monitors the VPP service restart through the API provided by the VPP node Try to reconnect to the VPP service. After the reconnection is successful, all the configurations of the current node will be obtained from ETCD and re-issued to the VPP service through the VPP API interface encapsulated by the agent.
  • NSP network service platform
  • Fig. 3 is a device framework diagram in a VPP cluster management device according to an embodiment of the present application.
  • the apparatus 300 in the VPP cluster management apparatus provided in this embodiment includes:
  • the label generating module 310 is configured to label the VPP node according to the attributes of the VPP node in the pre-built VPP cluster;
  • the selection management module 320 is used to select VPP nodes with the same label as a VPP sub-cluster for management;
  • the encapsulation module 330 is used to encapsulate the management and configuration operations of the VPP nodes in the VPP sub-cluster into a REST API, and provide the REST API to the cloud console to cooperate with the front end to achieve visual management.
  • the API is used to provide a rest interface that intersects with the VPP sub-cluster. Through the rest interface, users can realize visual management in the cloud console and cooperate with the front end;
  • the data model obtaining module 340 is configured to obtain the data model according to the received http request through the rest interface;
  • the log formation and storage module 350 is configured to form an operation log according to the data model and the information of each VPP node in the VPP sub-cluster related to the REST API, and store the operation log in a database;
  • the log distribution module 360 is used to obtain the operation log from the database and distribute the operation log to the VPP sub-cluster;
  • the calling processing module 370 is configured to call a processing function according to the VPP node information carried in the operation log, and the processing function manages and operates the VPP sub-cluster.
  • the processing function to manage and operate the VPP sub-cluster may include the following: parsing operation logs, adding VRFs and VLAN sub-interfaces through the rest interface provided by the API, and sending the NAT mapping configuration to the VPP cluster VPP node.
  • the VPP-agent service uses the ETCD service discovery function to regularly report the Agent and VPP service status information to the NSP.
  • the VPP cluster mode with ETCD ensures high data reliability, and re-issues the operation log persisted to the distributed key-value database ETCD To the VPP service, in order to realize that the configuration is not lost after the VPP service restarts.
  • FIG. 4 is a schematic diagram of the computer equipment of the application.
  • the computer equipment 40 may be a terminal device with computing functions such as a server, a tablet computer, a portable computer, a desktop computer, and the like.
  • the computer device 40 includes a processor 41, a memory 42, a VPP cluster management analysis program 43, a network interface, and a communication bus.
  • the computer device 40 may be a tablet computer, a desktop computer, or a smart phone, but is not limited thereto.
  • the memory 42 includes at least one type of readable storage medium.
  • the at least one type of readable storage medium may be a non-volatile storage medium such as flash memory, hard disk, multimedia card, card-type memory, and the like.
  • the readable storage medium may be an internal storage unit of the computer device 40, such as a hard disk of the computer device 40.
  • the readable storage medium may also be an external memory of the electronic device 40, such as a plug-in hard disk equipped on the computer device 40, or a smart memory card (Smart Memory Card).
  • the readable storage medium of the memory 42 is generally used to store the VPP cluster management analysis program 43, the node control unit, the ETCD unit, the VPP node unit, etc. installed in the computer device 40.
  • the processor 41 may be a central processing unit (Central Processing Unit) in some embodiments.
  • Central Processing Unit CPU
  • CPU central processing unit
  • microprocessor microprocessor or other data processing chip, used to run the program code or processing data stored in the memory 42, such as the VPP cluster management analysis program 43 and so on.
  • the network interface may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface), and is generally used to establish a communication connection between the computer device 40 and other computer devices.
  • a standard wired interface such as a WI-FI interface
  • WI-FI interface wireless interface
  • the communication bus is used to realize the connection and communication between these components.
  • FIG. 4 only shows the computer device 40 with components 41-43, but it should be understood that it is not required to implement all of the illustrated components, and more or fewer components may be implemented instead.
  • the memory 42 as a computer storage medium may include an operating system and a VPP cluster management analysis program 43; when the processor 41 executes the VPP cluster management analysis program 43 stored in the memory 42 To achieve the following steps:
  • VPP nodes Label the VPP nodes according to the attributes of the VPP nodes in the pre-built VPP cluster, and select the VPP nodes with the same label as a VPP sub-cluster for management;
  • the API is provided to the cloud console to cooperate with the front-end to realize visual management.
  • the REST API can provide a rest interface that intersects with the VPP sub-cluster;
  • the operation log is obtained from the database, and the operation log is delivered to the VPP sub-cluster, and the processing function is called according to the VPP node information carried in the operation log, and the processing function manages and operates the VPP sub-cluster.
  • the embodiment of the present application also proposes a computer-readable storage medium.
  • the computer-readable storage medium may be non-volatile or volatile.
  • the computer-readable storage medium includes a VPP cluster management analysis program. When the VPP cluster management analysis program is executed by the processor, the following operations are implemented:
  • VPP nodes Label the VPP nodes according to the attributes of the VPP nodes in the pre-built VPP cluster, and select the VPP nodes with the same label as a VPP sub-cluster for management;
  • the API is provided to the cloud console to cooperate with the front-end to achieve visual management.
  • the REST API is used to provide a rest interface that intersects with the VPP sub-cluster;

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Debugging And Monitoring (AREA)

Abstract

一种VPP集群管理方法,包括:根据预先搭建的VPP集群中的VPP节点的属性为VPP节点打上标签,选取标签相同的VPP节点作为一个VPP子集群进行管理;将VPP子集群中的VPP节点的管理和配置操作封装成REST API,REST API提供与VPP子集群交汇的rest接口;通过rest接口根据所接收的http请求获取数据模型,并根据数据模型和与REST API相关的VPP子集群中的各VPP节点的信息形成操作日志存储到数据库中;从数据库获取操作日志,并将操作日志下发到VPP子集群,根据操作日志携带的VPP节点信息调用处理函数以对VPP子集群进行管理和操作。

Description

VPP集群管理方法及装置、计算机设备及存储介质
本申请基于巴黎公约申明享有2019年9月17日递交的申请号为CN201910875374.0、名称为“VPP集群管理方法及装置、计算机设备及存储介质”的中国专利申请的优先权,该中国专利申请的整体内容以参考的方式结合在本申请中。
技术领域
本申请涉及区块存储领域,尤其涉及一种VPP集群管理方法及装置、计算机设备及存储介质。
背景技术
VPP(Vector Packet Processing,矢量数据包处理库)是FD.io中的核心项目之一,为通用CPU提供产品级质量的用户空间交换机/路由器功能,可部署于物理机或者虚拟机。所谓VPP向量报文处理是与传统的标量报文处理相对而言的。传统报文处理方式,同时也是人类常用的逻辑思维方式,即:报文是按照到达先后顺序来处理,第一个报文处理完,处理第二个,依次类推;A calls B calls C…. return,函数会频繁嵌套调用,并最终返回。
目前随着互联网的广泛深入应用,云计算的应用也不断深入。云计算(cloud computing)是基于互联网相关服务的增加、使用和交互模式,通常涉及通过互联网来提供动态易扩展且经常是虚拟化的资源。对于云计算场景,高可用集群模式是必须的,但是,VPP本身不提供集群模式,发明人意识到目前主要通过手工或者脚本批量配置管理,对后续的集群配置的持久化和管理带来难度,缺乏灵活性和扩展性。
因此,亟须一种能够实现高效配置、可靠、持久化的VPP集群管理方案。
技术问题
本申请提供一种VPP集群管理方法及装置、计算机设备及存储介质,其主要目的在于通过选取标签相同的VPP节点作为VPP子集群,根据所接收的VPP子集群节点信息调用处理函数,对VPP子集群进行管理和操作,进而实现对所管理的VPP集群实现任意横向扩展,提高VPP集群管理的灵活性,适应于云平台统一编排管理。
技术解决方案
为实现上述目的,本申请提供的VPP集群管理方法,应用于计算机设备,所述方法包括:
根据预先搭建的VPP集群中的VPP节点的属性为所述VPP节点打上标签,选取标签相同的VPP节点作为一个VPP子集群进行管理;
将所述VPP子集群中的VPP节点的管理和配置操作封装成RESTAPI,并将所述REST API提供至云控制台以配合前端实现可视化管理,所述REST API用于提供与所述VPP子集群交汇的rest接口;
通过所述rest接口根据所接收的http请求获取数据模型,并根据所述数据模型和与所述REST API相关的所述VPP子集群中的各VPP节点的信息形成操作日志持久化到数据库中;
从所述数据库获取所述操作日志,并将所述操作日志下发到VPP子集群根据所述操作日志携带的VPP节点信息调用处理函数对所述VPP子集群进行管理和操作。
为实现上述目的,本申请还提供一种VPP集群管理装置,包括:
标签生成模块,用于根据预先搭建的VPP集群中的VPP节点的属性为所述VPP节点打上标签;
选取管理模块,用于选取标签相同的VPP节点作为一个VPP子集群进行管理;
封装模块,用于将所述VPP子集群中的VPP节点的管理和配置操作封装成RESTAPI,并将所述REST API提供至云控制台以配合前端实现可视化管理,所述REST API用于提供与所述VPP子集群交汇的rest接口;
数据模型获取模块,用于通过所述rest接口根据所接收的http请求获取数据模型;
日志形成存储模块,用于根据所述数据模型和与所述REST API相关的所述VPP子集群中的各VPP节点的信息形成操作日志,存储所述操作日志到数据库中;
日志下发模块,用于从所述数据库获取所述操作日志,并将所述操作日志下发到VPP子集群;
调用处理模块,用于根据所述操作日志携带的VPP节点信息调用处理函数对所述VPP子集群进行管理和操作。
此外,为实现上述目的,本申请还提供一种计算机可读存储介质,其中,所述计算机可读存储介质中包括VPP集群管理分析程序,所述VPP集群管理分析程序被处理器执行时,实现如下步骤:
根据预先搭建的VPP集群中的VPP节点的属性为所述VPP节点打上标签,选取标签相同的VPP节点作为一个VPP子集群进行管理;
将所述VPP子集群中的VPP节点的管理和配置操作封装成RESTAPI,并将所述REST API提供至云控制台以配合前端实现可视化管理,所述REST API用于提供与所述VPP子集群交汇的rest接口;
通过所述rest接口根据所接收的http请求获取数据模型,并根据所述数据模型和与所述REST API相关的所述VPP子集群中的各VPP节点的信息形成操作日志持久化到数据库中;
从所述数据库获取所述操作日志,并将所述操作日志下发到VPP子集群根据所述操作日志携带的VPP节点信息调用处理函数对所述VPP子集群进行管理和操作。
为实现上述目的,本申请还提供一种VPP集群管理计算机设备,该计算机设备包括:存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的VPP集群管理分析程序,所述VPP集群管理分析程序被处理器执行时,实现如下步骤:
根据预先搭建的VPP集群中的VPP节点的属性为所述VPP节点打上标签,选取标签相同的VPP节点作为一个VPP子集群进行管理;
将所述VPP子集群中的VPP节点的管理和配置操作封装成RESTAPI,并将所述REST API提供至云控制台以配合前端实现可视化管理,所述REST API用于提供与所述VPP子集群交汇的rest接口;
通过所述rest接口根据所接收的http请求获取数据模型,并根据所述数据模型和与所述REST API相关的所述VPP子集群中的各VPP节点的信息形成操作日志,存储所述操作日志到数据库中;
从所述数据库获取所述操作日志,并将所述操作日志下发到VPP子集群,根据所述操作日志携带的VPP节点信息调用处理函数对所述VPP子集群进行管理和操作。
有益效果
本申请提出的VPP集群管理方法及装置、计算机设备及存储介质,通过rest接口接收http请求,获取VPP集群节点信息,形成包括VPP集群节点信息的操作日志,并将其下发至VPP子集群,VPP子集群中的ETCD根据所接收的操作日志调用处理函数,对VPP集群进行管理和操作,进行管理和操作时可任意划分出VPP子集群,实现了VPP子集群的灵活扩展,有效提高了VPP集群管理的灵活性,适应了云平台的统一编排管理,实现了VPP集群配置管理的高效、可靠、一致及持久化。
附图说明
图1为本申请实施例的VPP集群管理方法实施例的应用环境示意图;
图2为本申请实施例的VPP集群管理方法的流程图;
图3为本申请实施例的VPP集群管理计算机设备中的系统框架图;
图4为根据本申请实施例的计算机设备的结构示意图。
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
本发明的实施方式
应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。
作为一个高可用的键值存储系统,ETCD(分布式的key-value存储)主要用于共享配置和服务发现,其实现了 raft 算法,可以在高效的解决分布式系统中各个节点日志内容一致性问题的同时,也使得集群具备一定的容错能力。即使集群中出现部分节点故障、网络故障等问题,仍可保证其余大多数节点正确的步进。甚至当更多的节点出现故障而导致集群不可用时,依然可以保证节点中的数据不会出现错误的结果。因此,在本申请中,采用基于ETCD的VPP集群管理方案,以保障VPP集群管理的可靠性。
具体的,本申请提供一种VPP集群管理方法,应用于一种计算机设备40。参照图1所示,为本申请VPP集群管理方法较佳实施例的应用环境示意图。
在本实施例中,图1为本申请VPP集群管理方法较佳实施例的应用环境示意图,如图1所示,在该实施环境中,包括计算机设备110以及计算机设备120。
计算机设备110为集群中单节点的计算机设备,例如VPP集群节点中的电脑等计算机设备,计算机设备110与计算机设备120为VPP集群中的部分节点,计算机设备110与计算机设备120由图2构成。
需要说明的是,计算机设备110以及计算机设备120可为平板电脑、笔记本电脑、台式计算机等,其为cenOS(linux)系统,最好使用虚拟机,已安装了git,go,但并不局限于此。计算机设备110以及终端110可以通过蓝牙、USB(Universal Serial Bus,通用串行总线)或者其他通讯连接方式进行连接,本申请在此不做限制。
图2为根据本申请实施例的VPP集群管理方法的流程图,在本实施例中,VPP集群管理方法包括如下步骤:
首先,根据预先搭建的VPP集群中的VPP节点的属性为该VPP节点打上标签,选取标签相同的VPP节点作为一个VPP子集群进行管理;
在确定好VPP子集群之后,将该VPP子集群中的VPP节点的管理和配置操作封装成REST(Representational State Transfer表现层状态转移)API(Application Programming Interface应用程序接口),并将该REST API提供至云控制台以配合前端实现可视化管理,该REST API用于提供与该VPP子集群交汇的rest接口;
然后,根据所接收的http请求通过该rest接口获取数据模型,并根据该数据模型和与该REST API相关的VPP子集群中的各VPP节点的信息形成操作日志并将该操作日志存储(即持久化)到数据库中;
从该数据库获取该操作日志,并将该操作日志下发到VPP子集群,根据该操作日志携带的VPP节点信息调用处理函数,根据该处理函数对该VPP子集群进行管理和操作。
选取标签相同的VPP节点作为一个VPP子集群进行管理的过程包括:
依据预设的调度算法选取VPP节点作为VPP子集群;
添加与所选取的VPP节点标签相同的VPP节点至该VPP子集群,以实现所述VPP子集群的横向扩展;
其中,依据预设的调度算法选取VPP节点作为VPP子集群时,VPP子集群可以由调度器选取,通过预设的调度算法配置好调度器,调度器根据预先配置的调度算法任意实现VPP子集群的横向扩展,即通过VPP子集群的分组标签配置,灵活的向VPP子集群添加具有同类型的标签的VPP节点;
上述预设的调度算法可通过配置文件指定一种或多种调度器,调度算法中可以包含以下调度规则:
规则一,通过VPP节点的负载确定VPP节点的负载权重,负载低的VPP节点负载权重大;
规则二,通过VPP节点承载的配置数量确定VPP节点的承载权重,配置数量越小的VPP节点承载权重越大;
规则三,根据VPP节点标签属性,选择或过滤,标签属性由管理人员自行确定;
规则四,指定VPP节点数量,随机选取VPP节点。
需要注意的是,选取VPP子集群时,可利用上述调度算法中的任意一种调度规则选取VPP节点,若使用第一种或第二种调度规则,则选取权重大的节点为VPP节点组成该VPP子集群;也可利用第一种和第二种调度规则计算出权重和,选取权重和大的作为子集群的节点。
在根据上述调度算法确定好VPP子集群之后,即可将确定好的VPP子集群中的VPP节点的管理和配置操作封装成RESTAPI,由于该REST API能够提供与该VPP子集群交汇的rest接口,因此,为了配合前端实现可视化管理,还需要将所封装的REST API提供给云控制台。
在本申请的一个具体实施方式中,在封装REST API过程中应用了NSP(Network Services Protocal网络服务协议),该协议是DECnet协议组中的一个协议,对网络层路由协议进行流量管制,从而提供虚拟连接服务,通过添加插件的形式,将VPP集群的管理操作以REST接口的方式集成到NSP(Network Service Platform 网络服务平台),对接云控制台,实现可视化操作。
其中,API由NSP(Network Services Protocal网络服务协议)扩展插件封装完成,由Paste + PasteDeploy + Routes + WebOb框架实现;Paste、PasteDeploy、 Routes 、WebOb分别负责应用的WSGI化、URL路由和请求处理功能,利用这种架构的灵活性,通过模块化插件扩展接口,为云控制台提供RESTful API,接收http请求。
上述的Paste、PasteDeploy、 Routes 、WebOb均是本领域常见的架构,因此,在此不再对这些结构做详细说明。
封装好REST API之后,即可通过该REST API提供的rest接口,根据所接收的http请求获取数据模型,并根据数据模型和与REST API相关的VPP子集群中的各VPP节点的信息形成操作日志,并将该操作日志存储到数据库中。在本申请的一个具体实施方式中,上述获取数据模型以及形成操作日志并存储的具体过程如下:
接收到http请求后,获取json格式请求消息体,并将json格式转换成字典格式,然后将字典格式转换规定格式的成数据模型;
本实施例的数据模型如下:
{   
journal_id: ""
etcd_path: "",
action: "",
data: "",
retry_count: "",
last_retried: "",
journal_state: "",
state_details: ""
}
其中构成数据模型的字段至少包括:journal_id、etcd_path、action、data;
journal_id为操作任务的id,etcd_path为vpp节点监听的目录,action为对应的操作动作,data为需要下发vpp的配置数据。
将所形成的操作日志存储到数据库中后,就可以根据需要从数据库获取该操作日志,并将操作日志下发到VPP子集群,以便根据该操作日志中的信息进行VPP子集群的管理和操作。其中,具体的日志的获取、下发过程可以包括如下步骤:
定时或者通过监听ETCD的journal目录从该数据库获取操作日志;
在获取操作日志时,考虑到服务端的高可用模式,首先从ETCD里面获取主进程的分布式锁,获取到分布式锁后,通过do_work通用函数将操作日志封装成符合ETCD的数据传输格式,获取EtcdClient(ETCD服务端),将操作日志下发到该VPP子集群中的ETCD。
ETCD根据所接收的操作日志调用处理函数,对VPP子集群进行管理和操作的过程包括:
在VPP子集群增加Agent服务,并将VPP子集群中的VPP节点与Agent服务绑定得到VPP-agent;
在VPP子集群中各VPP节点上运行VPP-agent,VPP-agent通过ETCD的watch服务发现功能监听VPP子集群中接收操作日志的ETCD对应的key;
当操作日志下发到ETCD时,key启动,负责监听的watch收到对应的操作日志,然后调用对应的处理函数,实现管理和操作VPP子集群的服务;
其中,VPP子集群中有多个key,当操作日志下发到ETCD时,key与接收操作日志的ETCD对应。
管理和操作VPP子集群的服务具体包括:
解析操作日志,通过API提供的rest接口将添加VRF,添加VLAN子接口,NAT映射的配置下发到该VPP子集群中的VPP节点。
由于VPP集群节点上的配置并没有做持久化存储,当VPP服务重启以后,之前VPP集群节点上的配置会丢失,因此,VPP-agent服务需要通过ETCD服务发现功能,定时向NSP网络服务平台(Network Service Platform)上报Agent和VPP服务状态信息, 当VPP服务重启后,ETCD高效的读写能力保证配置重载的时效性,含有ETCD的VPP集群模式保证数据的高可靠性,将持久化到分布式键值数据库ETCD的操作日志重新下发到VPP服务中,以实现VPP服务重启后配置不丢失。
重新下发到VPP服务时,对应VPP节点agent模块会监听ETCD的根据节点名称创建的目录,当检测到VPP进程id变化了,就会往此目录写入一个值,服务端发现此目录有值就会跳过这个节点的操作任务,重新放回任务队列,以保证VPP服务重启时网络服务平台(NSP)的可用性和数据的一致性;agent模块监听VPP服务重启后,通过VPP节点提供的API尝试重连VPP服务,重连成功以后,就会从ETCD获取当前节点的所有配置,通过agent封装的VPP API接口重新下发到VPP服务中。
图3为根据本申请实施例的VPP集群管理装置中的装置框架图。如图3所示,本实施例提供的VPP集群管理装置中的装置300包括:
标签生成模块310,用于根据预先搭建的VPP集群中的VPP节点的属性为该VPP节点打上标签;
选取管理模块320,用于选取标签相同的VPP节点作为一个VPP子集群进行管理;
封装模块330,用于将该VPP子集群中的VPP节点的管理和配置操作封装成RESTAPI,并将该REST API提供至云控制台以配合前端实现可视化管理,该REST API用于提供与该VPP子集群交汇的rest接口。通过该rest接口,用户可以在云控制台并配合前端实现可视化管理;
数据模型获取模块340,用于通过该rest接口根据所接收的http请求获取数据模型;
日志形成存储模块350,用于根据该数据模型和与该REST API相关的该VPP子集群中的各VPP节点的信息形成操作日志,存储该操作日志到数据库中;
日志下发模块360,用于从该数据库获取该操作日志,并将该操作日志下发到VPP子集群;
调用处理模块370,用于根据该操作日志携带的VPP节点信息调用处理函数,该处理函数对该VPP子集群进行管理和操作。
其中,该处理函数对该VPP子集群进行管理和操作可以包括如下内容:解析操作日志,通过API提供的rest接口将添加VRF,添加VLAN子接口,NAT映射的配置下发到该VPP集群中的VPP节点。
另外,由于VPP上的配置并没有做持久化,当VPP服务重启以后,之前VPP上的配置都会丢失,因此,VPP-agent服务通过ETCD服务发现功能,定时向NSP上报Agent和VPP服务状态信息, 当VPP服务重启后,依靠ETCD高效的读写能力保证配置重载的时效性,含有ETCD的VPP集群模式保证数据的高可靠性,将持久化到分布式键值数据库ETCD的操作日志重新下发到VPP服务中,以实现VPP服务重启后配置不丢失。
图4为本申请计算机设备示意图,在本实施例中,计算机设备40可以是服务器、平板计算机、便携计算机、桌上型计算机等具有运算功能的终端设备。
该计算机设备40包括:处理器41、存储器42、VPP集群管理分析程序43、网络接口及通信总线。
计算机设备40可以是平板电脑、台式电脑、智能手机,但不限于此。
存储器42包括至少一种类型的可读存储介质。该至少一种类型的可读存储介质可为如闪存、硬盘、多媒体卡、卡型存储器等的非易失性存储介质。在一些实施例中,该可读存储介质可以是该计算机设备40的内部存储单元,例如该计算机设备40的硬盘。在另一些实施例中,该可读存储介质也可以是该电子装置40的外部存储器,例如该计算机设备40上配备的插接式硬盘,智能存储卡(Smart Media Card, SMC),安全数字(Secure Digital, SD)卡,闪存卡(Flash Card)等。
在本实施例中,该存储器42的可读存储介质通常用于存储安装于该计算机设备40的VPP集群管理分析程序43,节点控制单元、ETCD单元、VPP节点单元等。
处理器41在一些实施例中可以是一中央处理器(Central Processing Unit, CPU),微处理器或其他数据处理芯片,用于运行存储器42中存储的程序代码或处理数据,例如VPP集群管理分析程序43等。
网络接口可选地可以包括标准的有线接口、无线接口(如WI-FI接口),通常用于在该计算机设备40与其他计算机设备之间建立通信连接。
通信总线用于实现这些组件之间的连接通信。
图4仅示出了具有组件41-43的计算机设备40,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。
在图4所示的设备实施例中,作为一种计算机存储介质的存储器42中可以包括操作系统、以及VPP集群管理分析程序43;处理器41执行存储器42中存储的VPP集群管理分析程序43时实现如下步骤:
根据预先搭建的VPP集群中的VPP节点的属性为VPP节点打上标签,选取标签相同的VPP节点作为一个VPP子集群进行管理;
将VPP子集群中的VPP节点的管理和配置操作封装成RESTAPI,并将该REST API提供至云控制台以配合前端实现可视化管理,该REST API能够提供与该VPP子集群交汇的rest接口;
通过rest接口根据所接收的http请求获取数据模型,并根据数据模型和与REST API相关的VPP子集群中的各VPP节点的信息形成操作日志,存储该操作日志到数据库中;
从数据库获取该操作日志,并将操作日志下发到VPP子集群,根据该操作日志携带的VPP节点信息调用处理函数,该处理函数对该VPP子集群进行管理和操作。
此外,本申请实施例还提出一种计算机可读存储介质,该计算机可读存储介质可以是非易失性,也可以是易失性,该计算机可读存储介质中包括VPP集群管理分析程序,该VPP集群管理分析程序被处理器执行时实现如下操作:
根据预先搭建的VPP集群中的VPP节点的属性为VPP节点打上标签,选取标签相同的VPP节点作为一个VPP子集群进行管理;
将VPP子集群中的VPP节点的管理和配置操作封装成RESTAPI,并将所封装的REST API提供至云控制台以配合前端实现可视化管理,该REST API用于提供与VPP子集群交汇的rest接口;
根据所接收的http请求通过rest接口获取数据模型,并根据数据模型和与REST API相关的VPP子集群中的各VPP节点的信息形成操作日志持久化到数据库中;
从数据库获取该操作日志,并将操作日志下发到VPP子集群,根据该操作日志携带的VPP节点信息调用处理函数对该VPP子集群进行管理和操作。
本申请之计算机可读存储介质的具体实施方式与上述VPP集群管理方法、计算机设备的具体实施方式大致相同,在此不再赘述。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、装置、物品或者方法不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、装置、物品或者方法所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、装置、物品或者方法中还存在另外的相同要素。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上所述的一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。

Claims (20)

  1. 一种VPP集群管理方法,应用于计算机设备,其中,所述方法包括:
    根据预先搭建的VPP集群中的VPP节点的属性为所述VPP节点打上标签,选取标签相同的VPP节点作为一个VPP子集群进行管理;
    将所述VPP子集群中的VPP节点的管理和配置操作封装成RESTAPI,并将所述REST API提供至云控制台以配合前端实现可视化管理,所述REST API用于提供与所述VPP子集群交汇的rest接口;
    通过所述rest接口根据所接收的http请求获取数据模型,并根据所述数据模型和与所述REST API相关的所述VPP子集群中的各VPP节点的信息形成操作日志,存储所述操作日志到数据库中;
    从所述数据库获取所述操作日志,并将所述操作日志下发到VPP子集群,根据所述操作日志携带的VPP节点信息调用处理函数对所述VPP子集群进行管理和操作。
  2. 根据权利要求1所述的VPP集群管理方法,其中,选取标签相同的VPP节点作为一个VPP子集群进行管理的过程包括:
    依据预设的调度算法选取VPP节点作为VPP子集群;
    添加与所选取的VPP节点标签相同的VPP节点至所述VPP子集群,以实现所述VPP子集群的横向扩展。
  3. 根据权利要求2所述的VPP集群管理方法,其中,所述调度算法为:
    通过VPP节点的负载确定VPP节点的负载权重,负载越低的VPP节点负载权重越大,添加负载权重大于预设负载权重阈值的VPP节点至所述VPP子集群;或
    通过VPP节点承载的配置数量确定VPP节点的承载权重,配置数量越小的VPP节点承载权重越大,添加承载权重大于预设承载权重阈值的VPP节点至所述VPP子集群;或
    根据VPP节点标签属性添加VPP节点至所述VPP子集群;或
    随机添加指定数量的VPP节点至所述VPP子集群。
  4. 根据权利要求1所述的VPP集群管理方法,其中,通过所述rest接口根据所接收的http请求获取数据模型的步骤包括:
    获取所述http请求的json格式请求消息体,并将所述json格式请求消息体转换成字典格式请求消息体,然后将字典格式请求消息体转换成数据模型。
  5. 根据权利要求1所述的VPP集群管理方法,其中,从所述数据库获取所述操作日志,并将所述操作日志下发到VPP子集群的过程包括:
    定时从所述数据库获取操作日志或者通过监听ETCD的journal目录从所述数据库获取操作日志;
    从ETCD中获取主进程的分布式锁;
    通过do_work通用函数将操作日志封装成符合ETCD数据传输格式的操作日志;
    将所述封装后的操作日志下发到所述VPP子集群中的ETCD。
  6. 根据权利要求5所述的VPP集群管理方法,其中,在所述根据所述操作日志携带的VPP节点信息调用处理函数之前还包括:
    在所述VPP子集群增加Agent服务,并将所述VPP子集群中的VPP节点与所述Agent服务绑定得到VPP-agent;
    在所述VPP子集群中各VPP节点上运行所述VPP-agent,所述VPP-agent用于通过ETCD的watch服务发现功能,监听所述VPP子集群中接收所述操作日志的ETCD对应的key;
    其中,所述VPP子集群中有多个key,当操作日志下发到ETCD时,所述key与接收操作日志的ETCD对应。
  7. 根据权利要求6所述的VPP集群管理方法,其中,所述根据所述操作日志携带的VPP节点信息调用处理函数对所述VPP子集群进行管理和操作包括:
    当所述操作日志下发到ETCD时,与所述操作日志对应的key启动,负责监听的watch收到所述操作日志,并根据所述操作日志调用处理函数对VPP子集群进行管理和操作;
    其中,对VPP子集群进行的管理和操作包括:解析操作日志,通过API提供的rest接口将添加VRF、VLAN子接口和NAT映射的配置下发到所述VPP子集群中的VPP节点。
  8. 一种VPP集群管理装置,其中,该VPP集群管理装置包括:
    标签生成模块,用于根据预先搭建的VPP集群中的VPP节点的属性为所述VPP节点打上标签;
    选取管理模块,用于选取标签相同的VPP节点作为一个VPP子集群进行管理;
    封装模块,用于将所述VPP子集群中的VPP节点的管理和配置操作封装成RESTAPI,并将所述REST API提供至云控制台以配合前端实现可视化管理,所述REST API用于提供与所述VPP子集群交汇的rest接口;
    数据模型获取模块,用于通过所述rest接口根据所接收的http请求获取数据模型;
    日志形成存储模块,用于根据所述数据模型和与所述REST API相关的所述VPP子集群中的各VPP节点的信息形成操作日志,存储所述操作日志到数据库中;
    日志下发模块,用于从所述数据库获取所述操作日志,并将所述操作日志下发到VPP子集群;
    调用处理模块,用于根据所述操作日志携带的VPP节点信息调用处理函数对所述VPP子集群进行管理和操作。
  9. 一种计算机设备,其中,该计算机设备包括:存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的VPP集群管理分析程序,所述VPP集群管理分析程序被处理器执行时,实现如下步骤:
    根据预先搭建的VPP集群中的VPP节点的属性为所述VPP节点打上标签,选取标签相同的VPP节点作为一个VPP子集群进行管理;
    将所述VPP子集群中的VPP节点的管理和配置操作封装成RESTAPI,并将所述REST API提供至云控制台以配合前端实现可视化管理,所述REST API用于提供与所述VPP子集群交汇的rest接口;
    通过所述rest接口根据所接收的http请求获取数据模型,并根据所述数据模型和与所述REST API相关的所述VPP子集群中的各VPP节点的信息形成操作日志,存储所述操作日志到数据库中;
    从所述数据库获取所述操作日志,并将所述操作日志下发到VPP子集群,根据所述操作日志携带的VPP节点信息调用处理函数对所述VPP子集群进行管理和操作。
  10. 如权利要求9所述的计算机设备,其中,选取标签相同的VPP节点作为一个VPP子集群进行管理的过程包括:
    依据预设的调度算法选取VPP节点作为VPP子集群;
    添加与所选取的VPP节点标签相同的VPP节点至所述VPP子集群,以实现所述VPP子集群的横向扩展。
  11. 如权利要求10所述的计算机设备,其中,所述调度算法为:
    通过VPP节点的负载确定VPP节点的负载权重,负载越低的VPP节点负载权重越大,添加负载权重大于预设负载权重阈值的VPP节点至所述VPP子集群;或
    通过VPP节点承载的配置数量确定VPP节点的承载权重,配置数量越小的VPP节点承载权重越大,添加承载权重大于预设承载权重阈值的VPP节点至所述VPP子集群;或
    根据VPP节点标签属性添加VPP节点至所述VPP子集群;或
    随机添加指定数量的VPP节点至所述VPP子集群。
  12. 如权利要求9所述的计算机设备,其中,通过所述rest接口根据所接收的http请求获取数据模型包括:
    获取所述http请求的json格式请求消息体,并将所述json格式请求消息体转换成字典格式请求消息体,然后将字典格式请求消息体转换成数据模型。
  13. 如权利要求9所述的计算机设备,其中,从所述数据库获取所述操作日志,并将所述操作日志下发到VPP子集群的过程包括:
    定时从所述数据库获取操作日志或者通过监听ETCD的journal目录从所述数据库获取操作日志;
    从ETCD中获取主进程的分布式锁;
    通过do_work通用函数将操作日志封装成符合ETCD数据传输格式的操作日志;
    将所述封装后的操作日志下发到所述VPP子集群中的ETCD。
  14. 如权利要求13所述的计算机设备,其中,在所述根据所述操作日志携带的VPP节点信息调用处理函数之前还包括:
    在所述VPP子集群增加Agent服务,并将所述VPP子集群中的VPP节点与所述Agent服务绑定得到VPP-agent;
    在所述VPP子集群中各VPP节点上运行所述VPP-agent,所述VPP-agent用于通过ETCD的watch服务发现功能,监听所述VPP子集群中接收所述操作日志的ETCD对应的key;
    其中,所述VPP子集群中有多个key,当操作日志下发到ETCD时,所述key与接收操作日志的ETCD对应。
  15. 如权利要求14所述的计算机设备,其中,所述根据所述操作日志携带的VPP节点信息调用处理函数对所述VPP子集群进行管理和操作包括:
    当所述操作日志下发到ETCD时,与所述操作日志对应的key启动,负责监听的watch收到所述操作日志,并根据所述操作日志调用处理函数对VPP子集群进行管理和操作;
    其中,对VPP子集群进行的管理和操作包括:解析操作日志,通过API提供的rest接口将添加VRF、VLAN子接口和NAT映射的配置下发到所述VPP子集群中的VPP节点。
  16. 一种计算机可读存储介质,其中,所述计算机可读存储介质中包括VPP集群管理分析程序,所述VPP集群管理分析程序被处理器执行时,实现如下步骤:
    根据预先搭建的VPP集群中的VPP节点的属性为所述VPP节点打上标签,选取标签相同的VPP节点作为一个VPP子集群进行管理;
    将所述VPP子集群中的VPP节点的管理和配置操作封装成RESTAPI,并将所述REST API提供至云控制台以配合前端实现可视化管理,所述REST API用于提供与所述VPP子集群交汇的rest接口;
    通过所述rest接口根据所接收的http请求获取数据模型,并根据所述数据模型和与所述REST API相关的所述VPP子集群中的各VPP节点的信息形成操作日志,存储所述操作日志到数据库中;
    从所述数据库获取所述操作日志,并将所述操作日志下发到VPP子集群,根据所述操作日志携带的VPP节点信息调用处理函数对所述VPP子集群进行管理和操作。
  17. 如权利要求16所述的计算机可读存储介质,其中,选取标签相同的VPP节点作为一个VPP子集群进行管理的过程包括:
    依据预设的调度算法选取VPP节点作为VPP子集群;
    添加与所选取的VPP节点标签相同的VPP节点至所述VPP子集群,以实现所述VPP子集群的横向扩展。
  18. 如权利要求17所述的计算机可读存储介质,其中,所述调度算法为:
    通过VPP节点的负载确定VPP节点的负载权重,负载越低的VPP节点负载权重越大,添加负载权重大于预设负载权重阈值的VPP节点至所述VPP子集群;或
    通过VPP节点承载的配置数量确定VPP节点的承载权重,配置数量越小的VPP节点承载权重越大,添加承载权重大于预设承载权重阈值的VPP节点至所述VPP子集群;或
    根据VPP节点标签属性添加VPP节点至所述VPP子集群;或
    随机添加指定数量的VPP节点至所述VPP子集群。
  19. 如权利要求16所述的计算机可读存储介质,其中,通过所述rest接口根据所接收的http请求获取数据模型的步骤包括:
    获取所述http请求的json格式请求消息体,并将所述json格式请求消息体转换成字典格式请求消息体,然后将字典格式请求消息体转换成数据模型。
  20. 如权利要求16所述的计算机可读存储介质,其中,从所述数据库获取所述操作日志,并将所述操作日志下发到VPP子集群的过程包括:
    定时从所述数据库获取操作日志或者通过监听ETCD的journal目录从所述数据库获取操作日志;
    从ETCD中获取主进程的分布式锁;
    通过do_work通用函数将操作日志封装成符合ETCD数据传输格式的操作日志;
    将所述封装后的操作日志下发到所述VPP子集群中的ETCD。
PCT/CN2020/093612 2019-09-17 2020-05-30 Vpp 集群管理方法及装置、计算机设备及存储介质 WO2021051881A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910875374.0 2019-09-17
CN201910875374.0A CN110636124B (zh) 2019-09-17 2019-09-17 Vpp集群管理方法及装置、电子设备及存储介质

Publications (1)

Publication Number Publication Date
WO2021051881A1 true WO2021051881A1 (zh) 2021-03-25

Family

ID=68970974

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/093612 WO2021051881A1 (zh) 2019-09-17 2020-05-30 Vpp 集群管理方法及装置、计算机设备及存储介质

Country Status (2)

Country Link
CN (1) CN110636124B (zh)
WO (1) WO2021051881A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115037758A (zh) * 2022-04-27 2022-09-09 浪潮通信技术有限公司 消息同步方法及服务器
CN116320055A (zh) * 2023-01-03 2023-06-23 广州市玄武无线科技股份有限公司 一种网络协议转换方法及系统

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110636124B (zh) * 2019-09-17 2022-07-08 平安科技(深圳)有限公司 Vpp集群管理方法及装置、电子设备及存储介质
CN111753327B (zh) * 2020-05-25 2024-05-14 湖南麒麟信安科技股份有限公司 一种块存储加密设备及其分布式集群系统与应用方法
CN111857675B (zh) * 2020-08-03 2023-07-11 北京思特奇信息技术股份有限公司 基于c++实现restful服务的方法及系统

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180041515A1 (en) * 2016-08-05 2018-02-08 Oracle International Corporation Service discovery for a multi-tenant identity and data security management cloud service
CN107800565A (zh) * 2017-08-31 2018-03-13 平安科技(深圳)有限公司 巡检方法、装置、系统、计算机设备和存储介质
US20180309632A1 (en) * 2017-04-20 2018-10-25 Cisco Technology, Inc. Policy assurance for service chaining
CN109120678A (zh) * 2018-07-26 2019-01-01 北京百度网讯科技有限公司 用于分布式存储系统的服务托管的方法和装置
CN109165024A (zh) * 2018-07-26 2019-01-08 天讯瑞达通信技术有限公司 一种运维平台自动部署和监控服务器系统的方法
CN110113185A (zh) * 2019-04-18 2019-08-09 卓尔购电子商务(武汉)有限公司 一种快速部署联盟链的方法、系统、存储介质和装置
CN110636124A (zh) * 2019-09-17 2019-12-31 平安科技(深圳)有限公司 Vpp集群管理方法及装置、电子设备及存储介质

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102223259A (zh) * 2010-04-16 2011-10-19 北京广电天地信息咨询有限公司 一种数据采集和存储的方法及装置
CN108173694B (zh) * 2017-12-29 2021-05-04 深信服科技股份有限公司 一种数据中心的安全资源池接入方法及系统
CN108833232B (zh) * 2018-06-27 2020-09-15 烽火通信科技股份有限公司 一种基于VPP的PPPoE客户端实现方法及PPPoE客户端
CN109729073B (zh) * 2018-11-30 2023-03-10 全球能源互联网研究院有限公司 一种电网信息物理系统中的网络异常识别方法及系统

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180041515A1 (en) * 2016-08-05 2018-02-08 Oracle International Corporation Service discovery for a multi-tenant identity and data security management cloud service
US20180309632A1 (en) * 2017-04-20 2018-10-25 Cisco Technology, Inc. Policy assurance for service chaining
CN107800565A (zh) * 2017-08-31 2018-03-13 平安科技(深圳)有限公司 巡检方法、装置、系统、计算机设备和存储介质
CN109120678A (zh) * 2018-07-26 2019-01-01 北京百度网讯科技有限公司 用于分布式存储系统的服务托管的方法和装置
CN109165024A (zh) * 2018-07-26 2019-01-08 天讯瑞达通信技术有限公司 一种运维平台自动部署和监控服务器系统的方法
CN110113185A (zh) * 2019-04-18 2019-08-09 卓尔购电子商务(武汉)有限公司 一种快速部署联盟链的方法、系统、存储介质和装置
CN110636124A (zh) * 2019-09-17 2019-12-31 平安科技(深圳)有限公司 Vpp集群管理方法及装置、电子设备及存储介质

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115037758A (zh) * 2022-04-27 2022-09-09 浪潮通信技术有限公司 消息同步方法及服务器
CN116320055A (zh) * 2023-01-03 2023-06-23 广州市玄武无线科技股份有限公司 一种网络协议转换方法及系统
CN116320055B (zh) * 2023-01-03 2023-12-05 广州市玄武无线科技股份有限公司 一种网络协议转换方法及系统

Also Published As

Publication number Publication date
CN110636124A (zh) 2019-12-31
CN110636124B (zh) 2022-07-08

Similar Documents

Publication Publication Date Title
WO2021051881A1 (zh) Vpp 集群管理方法及装置、计算机设备及存储介质
WO2019149016A1 (zh) 网络切片创建方法、系统、网络设备及存储介质
US9705752B2 (en) Reliably updating a messaging system
US9350682B1 (en) Compute instance migrations across availability zones of a provider network
WO2018059222A1 (zh) 一种文件切片上传方法、装置及云存储系统
CN109150558B (zh) 管理消息队列节点的方法、装置和系统
WO2014101475A1 (zh) 云平台应用部署方法及装置
US10817327B2 (en) Network-accessible volume creation and leasing
CN111064626B (zh) 配置更新方法、装置、服务器及可读存储介质
WO2021159831A1 (zh) 编程平台的用户代码运行方法及平台、节点、设备、介质
CN114237937A (zh) 一种多线程的数据传输方法和装置
JP2003058376A (ja) 配信システム、配信サーバとその配信方法、配信プログラム
CN112804289A (zh) 一种资源同步方法、装置、设备及存储介质
CN113347257A (zh) 通信方法、装置、服务器及存储介质
CN112104679B (zh) 处理超文本传输协议请求的方法、装置、设备和介质
TW200803282A (en) Technique for controlling external communication of embedded device using proxy server
CN113965628A (zh) 消息调度方法、服务器和存储介质
CN111835809B (zh) 工单消息分配方法、装置、服务器及存储介质
AU2017382907B2 (en) Technologies for scaling user interface backend clusters for database-bound applications
US11246027B2 (en) At least one mechanism to permit, at least in part, allocation and/or configuration, at least in part, of at least one network-associated object
CN110768855B (zh) 链路化性能测试的方法和装置
CN115129708A (zh) 数据处理方法、装置和存储介质及电子设备
US9304841B2 (en) Dispatcher framework to provide inter-application communication
US20230153159A1 (en) Hardware Accelerator Service Aggregation
CN113973049B (zh) 一种fpga集群管理与部署比特流的方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20866354

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20866354

Country of ref document: EP

Kind code of ref document: A1