WO2016188135A1 - Cpu resource configuration method for cluster router and cluster router - Google Patents
Cpu resource configuration method for cluster router and cluster router Download PDFInfo
- Publication number
- WO2016188135A1 WO2016188135A1 PCT/CN2016/071623 CN2016071623W WO2016188135A1 WO 2016188135 A1 WO2016188135 A1 WO 2016188135A1 CN 2016071623 W CN2016071623 W CN 2016071623W WO 2016188135 A1 WO2016188135 A1 WO 2016188135A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- module
- service
- standby
- cpu
- service module
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 31
- 238000007726 management method Methods 0.000 claims description 112
- 238000013468 resource allocation Methods 0.000 claims description 27
- 230000006870 function Effects 0.000 abstract description 4
- 230000002159 abnormal effect Effects 0.000 description 5
- 230000008569 process Effects 0.000 description 5
- 238000010586 diagram Methods 0.000 description 3
- 230000003993 interaction Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 238000011084 recovery Methods 0.000 description 2
- 238000012384 transportation and delivery Methods 0.000 description 2
- 238000013459 approach Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/58—Association of routers
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/22—Arrangements for detecting or preventing errors in the information received using redundant apparatus to increase reliability
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/70—Admission control; Resource allocation
- H04L47/72—Admission control; Resource allocation using reservation actions during connection setup
- H04L47/726—Reserving resources in multiple paths to be used simultaneously
Definitions
- the present invention relates to the field of communications, and in particular to a cluster router CPU resource configuration method and a cluster router.
- the router In order to cope with the rapid increase of traffic and scale in the network, the router as the core of the network is also accelerating the pace of capacity expansion. Due to its powerful scalability, the cluster router has become the mainstream technology for solving the capacity expansion of the core router. Cluster router, simply That is, multiple routers are interconnected to form a logically integrated cluster router system.
- the cluster router is composed of a plurality of chassis, each frame has two or more CPUs, and the CPU runs various management modules and service modules.
- the management module usually performs management functions such as device configuration command delivery, device resource, and status monitoring collection.
- the service module usually performs routing protocol calculation, label delivery, and specific function processing.
- the management module can also be used as a special management service. Therefore, for the sake of simplicity, these management modules and service modules of the cluster router are simply referred to as "service modules" in the following description.
- service modules The stability of these business modules has a great impact on the stability of the cluster system.
- Each service module of the cluster router runs centrally on one CPU of the cluster system. This requires high performance on the system CPU.
- some systems propose the concept of a primary CPU and a backup CPU.
- another backup CPU is added to run backups of all service modules of the primary CPU. This approach enhances reliability. It also runs and backs up all the business modules as a whole.
- the main CPU completes the operation of all the business modules.
- the entire main CPU's services are switched to the standby CPU.
- the service modules are still concentrated in one main CPU and one backup CPU, other CPU resources in the cluster router system are not well utilized, and the use of CPU resources is very uneven.
- the present invention provides a cluster router CPU resource configuration method and a cluster router to solve at least the problem that the CPU resources on the cluster router cannot meet the service requirements.
- a method for configuring a cluster router CPU resource including:
- the cluster router runs different business modules on different CPUs.
- the cluster router runs different service modules on different CPUs, including:
- the cluster router runs different active service modules and standby service modules on different CPUs, where the The service module includes: the primary service module and the standby service module, where the standby service module is a standby module of the primary service module, where the service of the active service module cannot work normally,
- the standby service module is converted into a main service module of the cluster router.
- the cluster router runs a CPU resource management module on the plurality of CPUs, and the resource management module configures one or more of the service modules to configure corresponding CPU resources.
- the resource management module in the case that the service module is revoked from the allocated CPU, the resource management module reclaims CPU resources configured for the service module.
- the resource management module creates and updates a CPU resource allocation table, where the CPU resource allocation table is used to record an operation of configuring the CPU resource of the service module.
- the resource management module configuring corresponding CPU resources for one or more service modules includes:
- the resource management module selects, according to the CPU resource allocation table, a CPU with the lowest load among the plurality of CPUs to run the primary service module or the standby service module.
- the resource management module configures one or more service modules with corresponding CPU resources, including at least one of the following:
- the CPU with the least load of the active service module is selected and allocated to the active service module;
- the CPU with the least load of the standby service module is selected to allocate the standby service module.
- the resource management module includes an active management module and a standby management module
- the primary management module and the standby management module are run on different CPUs of the plurality of CPUs.
- the standby management module takes over the primary management module. jobs.
- a cluster router including: a service module and a CPU,
- the service module includes: the primary service module and the standby service module:
- the different service modules and the standby service module are running on different CPUs, and the standby service module is a standby module of the active service module, and the service of the active service module cannot work normally. In case, the standby service module is converted into a main service module of the cluster router.
- the apparatus further includes: a resource management module,
- a CPU resource management module is run on the plurality of CPUs, and the resource management module is configured to configure corresponding CPU resources for one or more of the service modules.
- the resource management module includes an active management module and a standby management module
- the primary management module and the standby management module run on different CPUs.
- the standby management module takes over the work of the primary management module.
- the standby service module is a standby module of the primary service module, and the service of the primary service module cannot work normally.
- the standby service module is converted into the main service module of the cluster router, which solves the problem that the CPU resources on the cluster router cannot meet the service requirements, and improves the reliability of the cluster router system.
- FIG. 1 is a flow chart of a cluster router CPU resource according to an embodiment of the present invention
- FIG. 2 is a schematic diagram of interaction between a resource management module and each service module according to a preferred embodiment of the present invention
- FIG. 3 is a schematic flowchart of allocating active and standby CPU resources by a new service module according to a preferred embodiment of the present invention
- FIG. 4 is a schematic flowchart of a service module switching of a cluster router system according to a preferred embodiment of the present invention
- FIG. 5 is a schematic flow chart of CPU resource recovery of a cluster router system according to a preferred embodiment of the present invention.
- FIG. 1 is a flowchart of a cluster router CPU resource according to an embodiment of the present invention. As shown in FIG. 1, the process includes the following steps:
- step S102 the cluster router runs different service modules on different CPUs.
- the service modules of the cluster router are no longer concentrated on one CPU of the cluster router, which solves the problem that the CPU resources on the cluster router cannot meet the service requirements, and improves the reliability of the cluster router system.
- the cluster router runs different active service modules and standby service modules on different CPUs, where the service module includes: the primary service module and the standby service module, where the standby service module is The standby module of the active service module is converted into the active service module of the cluster router when the service of the active service module fails to work normally.
- the cluster router may also run a CPU resource management module on the plurality of CPUs, and the resource management module configures corresponding CPU resources for one or more of the service modules.
- the resource management module reclaims the CPU resources configured for the service module.
- the resource management module creates and updates a CPU resource allocation table for recording the operation of configuring the CPU resource of the service module.
- the resource management module selects, according to the CPU resource allocation table, the CPU with the lowest load or the most suitable resource among the plurality of CPUs to run the primary service module or the standby service module.
- the resource management module configuring the corresponding CPU resource for the one or more service modules may include at least one of the following:
- the CPU with the least load of the active service module is selected and allocated to the active service module.
- the CPU that is most suitable for the operation of the service module can be selected according to the specific system resources and the characteristics of the service module.
- the resource management module includes an active management module and a standby management module
- the primary management module and the standby management module run on different CPUs of the plurality of CPUs.
- the standby management module takes over the work of the primary management module.
- a cluster router including: a service module and a CPU,
- the service module includes: the primary service module and the standby service module:
- the standby service module is a standby module of the primary service module. If the service of the active service module fails to work normally, the standby is performed.
- the service module is converted into the main service module of the cluster router.
- the apparatus further includes: a resource management module,
- a CPU resource management module is configured on the plurality of CPUs, and the resource management module is configured to configure corresponding CPU resources for one or more of the service modules.
- the resource management module includes an active management module and a standby management module
- the primary management module and the standby management module run on different CPUs.
- the standby management module takes over the work of the primary management module.
- the preferred embodiment provides a method for rationally allocating system CPU resources, and improves the reliability of the cluster router system.
- the distributed cluster router preferably implemented by the present invention provides a method for balancing and rationally allocating system CPU resources, including a main management module. , standby management module, main service module, standby service module, CPU resource allocation table.
- Active management module and standby management module The management module of the cluster router system responsible for managing CPU resources.
- the standby management module serves as a standby module of the primary management module, and takes over the work of the primary management module when the primary module fails to work, and switches to the primary management module.
- the main service module and the standby service module are: each service module that can be independently operated in the cluster router system, and the standby service module serves as a backup module of the main service module, and takes over the work of the main module when the main module fails to work, and switches Main business module.
- the management module of the cluster router system records the service modules of each CPU running in the system.
- the system When the cluster router system is started, the system first selects a CPU to run the main management module, which is responsible for allocating and managing each service module. Create and update a CPU resource allocation table.
- the system selects the CPU with the lightest CPU load according to the CPU resource allocation table and assigns it to the service as the main CPU of the service module, and selects another CPU as the standby CPU of the service module. Update the CPU resource allocation table.
- the primary and backup modules are switched, the active module is revoked from the allocated CPU resources, and the standby module is transferred to the active module.
- the active management module re-allocates the CPU resources for the standby module of the service. , update the CPU resource allocation table.
- the system When deleting a service that has been independently allocated CPU resources, the system reclaims the active and standby CPU resources allocated to it and updates the CPU resource allocation table.
- the CPU module After the cluster router is started, when no service is configured, the CPU module is not actively allocated to related service modules. Further, when the system selects a CPU for the service module, the CPU resource that is not running any service module is preferentially allocated to the service module; if there is no CPU resource of any service module in the system, the standby module that runs only the standby module and runs is selected.
- the least amount of CPU resources are allocated to the new service loading main module, and the CPU module that runs only the main module and runs the running main module is allocated to the new service loading standby module; if the system does not only run the standby module For the CPU resources of the module, select the CPU resource with the least number of active modules to allocate to the new service load master module; if there is no CPU resource running only the active module in the system, select the CPU with the least number of spare modules.
- the resource is allocated to the new service to load the standby module.
- the cluster router system of the preferred embodiment of the present invention balances the load of each CPU in the cluster router system, so that the CPU resources in the cluster router system are effectively utilized, and each service module allocated by the system has a backup module, and The main module is allocated on the same CPU.
- the standby module can be autonomously transferred to the main module. Since each service module in the system is independent, when a certain service module in the system is abnormal, When the switchover of the active and standby modules is performed, the other independent service modules are not affected, and the service burden of the active CPU is also reduced, thereby improving the overall reliability of the system.
- the hardware module includes: Take the 2+2 cluster router system as an example. There are four chassis in the system. Each chassis has two master CPUs. There are 8 CPU resources available in the system. The two CPUs of the center frame 1 are C1 and C2, the two CPUs of the center frame 2 are C3 and C4, the two CPUs of the line card frame 1 are L1 and L2, and the two CPUs of the line card frame 2 are L3 and L4.
- the software module part includes: an independently assignable service module in the cluster system, and assumes that the system has five service modules that can be independently allocated, respectively, A, B, C, D, and E;
- the processing steps of the CPU resource allocation process part are as follows:
- the active and standby CPUs of the management module are selected independently. Assume that C1 and C3 are selected respectively. The system runs normally without any service.
- the CPUs in the CPU resource allocation table maintained by the management module are empty:
- FIG. 3 is a schematic diagram of a process of allocating active and standby CPU resources by a new service module according to a preferred embodiment of the present invention.
- the system is configured with the A service: according to the process in FIG. 3, the system query management module is first maintained. If there is any CPU resource that does not load any service module, select one of them, such as C2, and assign it to the A service to load the main service module. If the CPU resource table is still queried, the CPU resources of any service module are still not loaded. One of them, for example, C4 is assigned to the A service to load the standby service module; at the same time, the allocation information is added to the CPU resource allocation table;
- the system is configured with the B service. According to the rules of the preceding steps, the L1 is allocated to the B service to load the main service module. The L3 is loaded with the standby service module for the B service, and the allocation information is added to the CPU resource allocation table.
- the system is configured with the C service: according to the rules of the above steps, the L2 is allocated to the C service to load the main service module, the L4 is allocated to the C service to load the standby service module, and the allocation information is added to the CPU resource allocation table;
- the D service is configured in the system. According to the rules in Figure 3, the CPU resources of any service module are not loaded in the system. Then, only the CPU resources of the standby module are allocated, such as C3, and the D service is loaded with the main service module.
- the C2 of the standby service module loads the standby service module for the D service, and adds the allocation information to the CPU resource allocation table;
- the E service is configured in the system. According to the rules in Figure 3 above, the C4 is allocated to the E service to load the main service module, the L1 is allocated to the E service to load the standby service module, and the allocation information is added to the CPU resource allocation table.
- FIG. 4 is a schematic flowchart of a service module switching of a cluster router system according to a preferred embodiment of the present invention.
- a service main module in the system is abnormal, such as a C service module
- the C on the L2 CPU is revoked.
- the service main module converts the C service standby module on the L4 CPU into the C service main module, and updates the CPU resource table of the management module.
- the L2 of the CPU resource table in the management module is not loaded with any service.
- the L2 is allocated to the C service to load the standby module, and the CPU resource allocation table of the management module is updated;
- a service main module in the system is abnormal, such as the A service module
- the A service main module on the C2 CPU is revoked, and the A service standby module on the C4 CPU is converted into the A service main module, and the management is updated.
- the CPU resource allocation table of the module At this time, there is no CPU resource in the CPU resource table of the management module that does not load any service.
- the L4 that loads only one main service module can be allocated to load the standby module for the A service. At the same time, update the CPU resource allocation table of the management module.
- FIG. 5 is a schematic flowchart of CPU resource recovery of a cluster router system according to a preferred embodiment of the present invention.
- the management module reclaims the allocation to E according to the process of FIG.
- the CPU resource of the service, and the CPU resource allocation table of the management module is updated.
- the preferred embodiment of the present invention mainly utilizes each CPU resource in the cluster router to distribute the functions of each module in the system to the available CPU resources in the system, thereby reducing the system performance requirements of the system and reducing the CPU performance.
- the burden on the main CPU increases the reliability of the system and makes full use of the existing resources in the system.
- the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware, but in many cases, the former is A better implementation.
- the technical solution of the present invention which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk,
- the optical disc includes a number of instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method of various embodiments of the present invention.
- Embodiments of the present invention also provide a storage medium.
- the foregoing storage medium may be configured to store program code for performing the method steps of the above embodiment:
- the foregoing storage medium may include, but is not limited to, a U disk, a read only memory (ROM, Read-Only Memory), Random Access Memory (RAM), removable hard disk, disk or optical disk, etc., which can store program code.
- ROM read only memory
- RAM Random Access Memory
- removable hard disk disk or optical disk, etc., which can store program code.
- the processor performs the method steps of the foregoing embodiments according to the stored program code in the storage medium.
- modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein.
- the steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated as a single integrated circuit module.
- the invention is not limited to any specific combination of hardware and software.
- different primary service modules and standby service modules are run on different CPUs, where the standby service module is a standby module of the primary service module, and the primary service module is used in the primary service module.
- the standby service module is converted into the main service module of the cluster router, which solves the problem that the CPU resources on the cluster router cannot meet the service requirements, and improves the reliability of the cluster router system.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Hardware Redundancy (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
Provided are a CPU resource configuration method for a cluster router and a cluster router. The method comprises: separating functions of various modules in a cluster router system; operating different service modules on different CPUs; and operating different main service modules and standby service modules on different CPUs, wherein the standby service modules are standby modules of the main service modules, and in the case where services of the main service modules cannot operate normally, the standby service modules are converted into the main service modules of the cluster router, thereby solving the problem that CPU resources on the cluster router cannot satisfy service requirements and improving the reliability of the cluster router system.
Description
本发明涉及通信领域,具体而言,涉及一种集群路由器CPU资源的配置方法及集群路由器。The present invention relates to the field of communications, and in particular to a cluster router CPU resource configuration method and a cluster router.
为了应对网络中流量和规模的急剧增加,作为网络核心的路由器也在不断加快扩容的步伐,集群路由器由于其强大的可扩展性成为目前解决核心路由器容量扩展的主流技术,集群路由器,简单的说,就是将多台路由器互联起来,形成一套逻辑上一体的集群路由器系统。In order to cope with the rapid increase of traffic and scale in the network, the router as the core of the network is also accelerating the pace of capacity expansion. Due to its powerful scalability, the cluster router has become the mainstream technology for solving the capacity expansion of the core router. Cluster router, simply That is, multiple routers are interconnected to form a logically integrated cluster router system.
在相关技术中,集群路由器是由多个机框构成,每个机框有两个或者以上的CPU,CPU运行着各种的管理模块和业务模块。管理模块通常完成设备配置命令下发、设备资源和状态监控收集等管理功能,业务模块通常完成路由协议计算、标签下发、特定功能处理等功能处理,管理模块也可以当做一种特殊的管理业务,因此为了简化起见,把集群路由器的这些管理模块和业务模块在下面描述中简称为“业务模块”。这些业务模块的稳定性,对于集群系统的稳定性有很大的影响。集群路由器各业务模块都集中运行在集群系统的一个CPU上,这样对系统CPU的性能要求较高,当这个CPU出问题时就会影响到系统中的所有业务,导致整个系统的崩溃。因此,有些系统为了增强可靠性,提出主用CPU和备份CPU的概念,在集中运行业务模块的CPU之外,增加了另外一个备份CPU来运行主用CPU所有业务模块的备份。这种做法,增强了可靠性,还是把所有业务模块作为整体来运行和备份,主CPU完成所有的业务模块的运行,发生故障时,整个主CPU的业务切换到备CPU中去。并且,由于业务模块仍然集中运行在一个主CPU和一个备份CPU里,集群路由器系统中的其他CPU资源没有得到很好的利用,CPU资源的使用很不均衡。In the related art, the cluster router is composed of a plurality of chassis, each frame has two or more CPUs, and the CPU runs various management modules and service modules. The management module usually performs management functions such as device configuration command delivery, device resource, and status monitoring collection. The service module usually performs routing protocol calculation, label delivery, and specific function processing. The management module can also be used as a special management service. Therefore, for the sake of simplicity, these management modules and service modules of the cluster router are simply referred to as "service modules" in the following description. The stability of these business modules has a great impact on the stability of the cluster system. Each service module of the cluster router runs centrally on one CPU of the cluster system. This requires high performance on the system CPU. When the CPU fails, it affects all services in the system, causing the entire system to crash. Therefore, in order to enhance reliability, some systems propose the concept of a primary CPU and a backup CPU. In addition to the CPU that centrally runs the service module, another backup CPU is added to run backups of all service modules of the primary CPU. This approach enhances reliability. It also runs and backs up all the business modules as a whole. The main CPU completes the operation of all the business modules. When a failure occurs, the entire main CPU's services are switched to the standby CPU. Moreover, since the service modules are still concentrated in one main CPU and one backup CPU, other CPU resources in the cluster router system are not well utilized, and the use of CPU resources is very uneven.
针对相关技术中,解决了集群路由器上CPU资源不能满足业务需求的问题,目前尚未提出有效的解决方案。In the related art, the problem that the CPU resources on the cluster router cannot meet the service requirements is solved, and an effective solution has not been proposed yet.
发明内容Summary of the invention
本发明提供了一种集群路由器CPU资源的配置方法及集群路由器,以至少解决了集群路由器上CPU资源不能满足业务需求的问题。The present invention provides a cluster router CPU resource configuration method and a cluster router to solve at least the problem that the CPU resources on the cluster router cannot meet the service requirements.
根据本发明的一个实施例,提供了一种集群路由器CPU资源的配置方法,包括:According to an embodiment of the present invention, a method for configuring a cluster router CPU resource is provided, including:
集群路由器将不同的业务模块运行在不同的CPU上。The cluster router runs different business modules on different CPUs.
在本发明的实施例中,集群路由器将不同的业务模块运行在不同的CPU上包括:In an embodiment of the invention, the cluster router runs different service modules on different CPUs, including:
所述集群路由器在不同的CPU上运行不同的主用业务模块和备用业务模块,其中,所述
业务模块包括:所述主用业务模块、所述备用业务模块,所述备用业务模块为所述主用业务模块的备用模块,在所述主用业务模块的业务不能正常工作的情况下,所述备用业务模块转换为所述集群路由器的主用业务模块。The cluster router runs different active service modules and standby service modules on different CPUs, where the
The service module includes: the primary service module and the standby service module, where the standby service module is a standby module of the primary service module, where the service of the active service module cannot work normally, The standby service module is converted into a main service module of the cluster router.
在本发明的实施例中,所述集群路由器在所述多个CPU上运行CPU资源管理模块,所述资源管理模块给一个或多个所述业务模块配置对应的CPU资源。In an embodiment of the present invention, the cluster router runs a CPU resource management module on the plurality of CPUs, and the resource management module configures one or more of the service modules to configure corresponding CPU resources.
在本发明的实施例中,在所述业务模块从分配的CPU上撤销的情况下,所述资源管理模块回收给所述业务模块配置的CPU资源。In an embodiment of the invention, in the case that the service module is revoked from the allocated CPU, the resource management module reclaims CPU resources configured for the service module.
在本发明的实施例中,所述资源管理模块创建并更新CPU资源分配表,所述CPU资源分配表用于记录所述业务模块的配置所述CPU资源的运行情况。In an embodiment of the present invention, the resource management module creates and updates a CPU resource allocation table, where the CPU resource allocation table is used to record an operation of configuring the CPU resource of the service module.
在本发明的实施例中,所述资源管理模块给一个或多个业务模块配置对应的CPU资源包括:In the embodiment of the present invention, the resource management module configuring corresponding CPU resources for one or more service modules includes:
所述资源管理模块根据所述CPU资源分配表选择所述多个CPU中负载最低的CPU运行所述主用业务模块或者所述备用业务模块。And the resource management module selects, according to the CPU resource allocation table, a CPU with the lowest load among the plurality of CPUs to run the primary service module or the standby service module.
在本发明的实施例中,所述资源管理模块给一个或多个业务模块配置对应的CPU资源包括以下至少之一:In an embodiment of the present invention, the resource management module configures one or more service modules with corresponding CPU resources, including at least one of the following:
选择所述多个CPU中未运行任何所述业务模块的CPU分配给所述主用业务模块;Selecting, among the plurality of CPUs, a CPU that does not run any of the service modules is allocated to the active service module;
选择所述多个CPU中未运行任何所述业务模块的CPU分配给所述备用业务模块;Selecting, by the CPU of the plurality of CPUs that the service module is not running, the standby service module;
若所述多个CPU均运行所述业务模块,则选择只运行备用业务模块且运行的备用业务模块负载最少的CPU分配给所述主用业务模块;If the plurality of CPUs are running the service module, selecting a CPU that only runs the standby service module and runs the standby service module with the least load is allocated to the active service module;
若所述多个CPU均运行所述业务模块,选择只运行主用业务模块且运行的主用模块负载最少的CPU分配给所述备用业务模块;If the plurality of CPUs are running the service module, selecting a CPU that only runs the active service module and runs the least loaded primary module is allocated to the standby service module;
若所述多个CPU均运行所述业务模块,且均运行备用模块的情况下,则选择运行主用业务模块负载最少的CPU分配给所述主用业务模块;If the plurality of CPUs are all running the service module, and all of the modules are running, the CPU with the least load of the active service module is selected and allocated to the active service module;
若所述多个CPU均运行所述业务模块,且均运行主用业务模块的情况下,则选择运行备用业务模块负载最少的CPU分配所述备用业务模块。If the plurality of CPUs are all running the service module, and both of the main service modules are running, the CPU with the least load of the standby service module is selected to allocate the standby service module.
在本发明的实施例中,所述资源管理模块包括主用管理模块和备用管理模块;In an embodiment of the present invention, the resource management module includes an active management module and a standby management module;
所述主用管理模块和所述备用管理模块运行在所述多个CPU不同的CPU上,在所述主用管理模块不能工作的情况下,所述备用管理模块接管所述主用管理模块的工作。The primary management module and the standby management module are run on different CPUs of the plurality of CPUs. When the primary management module is inoperable, the standby management module takes over the primary management module. jobs.
根据本发明的另一个实施例,还提供了一种集群路由器,包括:业务模块和CPU,According to another embodiment of the present invention, a cluster router is further provided, including: a service module and a CPU,
不同的所述业务模块运行在不同的所述CPU上。
Different of the service modules run on different CPUs.
在本发明的实施例中,所述业务模块包括:所述主用业务模块、所述备用业务模块:In an embodiment of the present invention, the service module includes: the primary service module and the standby service module:
不同的所述CPU上运行不同的所述主用业务模块和所述备用业务模块,所述备用业务模块为所述主用业务模块的备用模块,在所述主用业务模块的业务不能正常工作的情况下,所述备用业务模块转换为所述集群路由器的主用业务模块。The different service modules and the standby service module are running on different CPUs, and the standby service module is a standby module of the active service module, and the service of the active service module cannot work normally. In case, the standby service module is converted into a main service module of the cluster router.
在本发明的实施例中,所述装置还包括:资源管理模块,In an embodiment of the present invention, the apparatus further includes: a resource management module,
多个所述CPU上运行CPU资源管理模块,所述资源管理模块设置为给一个或多个所述业务模块配置对应的CPU资源。A CPU resource management module is run on the plurality of CPUs, and the resource management module is configured to configure corresponding CPU resources for one or more of the service modules.
在本发明的实施例中,所述资源管理模块包括主用管理模块和备用管理模块;In an embodiment of the present invention, the resource management module includes an active management module and a standby management module;
所述主用管理模块和所述备用管理模块运行在不同的所述CPU上,在所述主用管理模块不能工作的情况下,所述备用管理模块接管所述主用管理模块的工作。The primary management module and the standby management module run on different CPUs. When the primary management module is inoperable, the standby management module takes over the work of the primary management module.
通过本发明,采用在不同的CPU上运行不同的主用业务模块和备用业务模块,其中,该备用业务模块为该主用业务模块的备用模块,在该主用业务模块的业务不能正常工作的情况下,该备用业务模块转换为该集群路由器的主用业务模块,解决了集群路由器上CPU资源不能满足业务需求的问题,提高了集群路由器系统的可靠性。According to the present invention, different primary service modules and standby service modules are run on different CPUs, wherein the standby service module is a standby module of the primary service module, and the service of the primary service module cannot work normally. In this case, the standby service module is converted into the main service module of the cluster router, which solves the problem that the CPU resources on the cluster router cannot meet the service requirements, and improves the reliability of the cluster router system.
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:The drawings described herein are intended to provide a further understanding of the invention, and are intended to be a part of the invention. In the drawing:
图1是根据本发明实施例的一种集群路由器CPU资源的流程图;1 is a flow chart of a cluster router CPU resource according to an embodiment of the present invention;
图2是根据本发明优选实施例的资源管理模块与各业务模块间的交互示意图;2 is a schematic diagram of interaction between a resource management module and each service module according to a preferred embodiment of the present invention;
图3是根据本发明优选实施例的新增业务模块分配主备CPU资源的流程示意图;3 is a schematic flowchart of allocating active and standby CPU resources by a new service module according to a preferred embodiment of the present invention;
图4是根据本发明优选实施例的集群路由器系统业务模块倒换的流程示意图;4 is a schematic flowchart of a service module switching of a cluster router system according to a preferred embodiment of the present invention;
图5是根据本发明优选实施例的集群路由器系统CPU资源回收的流程示意图。FIG. 5 is a schematic flow chart of CPU resource recovery of a cluster router system according to a preferred embodiment of the present invention.
下文中将参考附图并结合实施例来详细说明本发明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。The invention will be described in detail below with reference to the drawings in conjunction with the embodiments. It should be noted that the embodiments in the present application and the features in the embodiments may be combined with each other without conflict.
需要说明的是,本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。It is to be understood that the terms "first", "second" and the like in the specification and claims of the present invention are used to distinguish similar objects, and are not necessarily used to describe a particular order or order.
在本实施例中提供了一种集群路由器CPU资源的配置方法,图1是根据本发明实施例的一种集群路由器CPU资源的流程图,如图1所示,该流程包括如下步骤:
In this embodiment, a method for configuring a cluster router CPU resource is provided. FIG. 1 is a flowchart of a cluster router CPU resource according to an embodiment of the present invention. As shown in FIG. 1, the process includes the following steps:
步骤S102,集群路由器将不同的业务模块运行在不同的CPU上。In step S102, the cluster router runs different service modules on different CPUs.
通过上述步骤,集群路由器的业务模块都不再集中运行在集群路由器的一个CPU上,解决了集群路由器上CPU资源不能满足业务需求的问题,提高了集群路由器系统的可靠性。Through the above steps, the service modules of the cluster router are no longer concentrated on one CPU of the cluster router, which solves the problem that the CPU resources on the cluster router cannot meet the service requirements, and improves the reliability of the cluster router system.
在本实施例中,该集群路由器在不同的CPU上运行不同的主用业务模块和备用业务模块,其中,该业务模块包括:该主用业务模块、该备用业务模块,该备用业务模块为该主用业务模块的备用模块,在该主用业务模块的业务不能正常工作的情况下,该备用业务模块转换为该集群路由器的主用业务模块。In this embodiment, the cluster router runs different active service modules and standby service modules on different CPUs, where the service module includes: the primary service module and the standby service module, where the standby service module is The standby module of the active service module is converted into the active service module of the cluster router when the service of the active service module fails to work normally.
在本实施例中,该集群路由器还可以在该多个CPU上运行CPU资源管理模块,该资源管理模块给一个或多个该业务模块配置对应的CPU资源。在该业务模块从分配的CPU上撤销的情况下,该资源管理模块回收给该业务模块配置的CPU资源。该资源管理模块创建并更新CPU资源分配表,该CPU资源分配表用于记录该业务模块的配置该CPU资源的运行情况。In this embodiment, the cluster router may also run a CPU resource management module on the plurality of CPUs, and the resource management module configures corresponding CPU resources for one or more of the service modules. In the case that the service module is revoked from the allocated CPU, the resource management module reclaims the CPU resources configured for the service module. The resource management module creates and updates a CPU resource allocation table for recording the operation of configuring the CPU resource of the service module.
在本实施例中,该资源管理模块根据该CPU资源分配表选择该多个CPU中负载最低或者资源最适合的CPU运行该主用业务模块或者该备用业务模块。In this embodiment, the resource management module selects, according to the CPU resource allocation table, the CPU with the lowest load or the most suitable resource among the plurality of CPUs to run the primary service module or the standby service module.
在本实施例中,该资源管理模块给一个或多个业务模块配置对应的CPU资源可以包括以下至少之一:In this embodiment, the resource management module configuring the corresponding CPU resource for the one or more service modules may include at least one of the following:
选择该多个CPU中未运行任何该业务模块的CPU分配给该主用业务模块;Selecting a CPU that does not run any of the plurality of CPUs to be allocated to the active service module;
选择该多个CPU中未运行任何该业务模块的CPU分配给该备用业务模块;Selecting, by the CPU that does not run any service module of the multiple CPUs, the standby service module;
若该多个CPU均运行该业务模块,则选择只运行备用业务模块且运行的备用业务模块负载最少的CPU分配给该主用业务模块;If the plurality of CPUs are running the service module, selecting a CPU that only runs the standby service module and runs the standby service module with the least load is allocated to the active service module;
若该多个CPU均运行该业务模块,选择只运行主用业务模块且运行的主用模块负载最少的CPU分配给该备用业务模块;If the plurality of CPUs are running the service module, select a CPU that only runs the active service module and runs the least loaded primary module to allocate the standby service module;
若该多个CPU均运行该业务模块,且均运行备用模块的情况下,则选择运行主用业务模块负载最少的CPU分配给该主用业务模块;If the plurality of CPUs are running the service module and both of the modules are running, the CPU with the least load of the active service module is selected and allocated to the active service module.
若该多个CPU均运行该业务模块,且均运行主用业务模块的情况下,则选择运行备用业务模块负载最少的CPU分配该备用业务模块;If the plurality of CPUs are running the service module and both of the main service modules are running, selecting a CPU with the least load of the standby service module to allocate the standby service module;
若有业务要求,可依据特定的系统资源和业务模块特点,选择最适合业务模块运行的CPU。If there is a business requirement, the CPU that is most suitable for the operation of the service module can be selected according to the specific system resources and the characteristics of the service module.
在本实施例中,该资源管理模块包括主用管理模块和备用管理模块;In this embodiment, the resource management module includes an active management module and a standby management module;
该主用管理模块和该备用管理模块运行在该多个CPU不同的CPU上,在该主用管理模块不能工作的情况下,该备用管理模块接管该主用管理模块的工作。The primary management module and the standby management module run on different CPUs of the plurality of CPUs. When the primary management module is inoperable, the standby management module takes over the work of the primary management module.
在本发明的另一实施例中,还提供了一种集群路由器,包括:业务模块和CPU,In another embodiment of the present invention, a cluster router is further provided, including: a service module and a CPU,
不同的该业务模块运行在不同的该CPU上。
Different business modules run on different CPUs.
在本实施例中,该业务模块包括:该主用业务模块、该备用业务模块:In this embodiment, the service module includes: the primary service module and the standby service module:
不同的该CPU上运行不同的该主用业务模块和该备用业务模块,该备用业务模块为该主用业务模块的备用模块,在该主用业务模块的业务不能正常工作的情况下,该备用业务模块转换为该集群路由器的主用业务模块。Different primary CPU modules and the standby service module are running on different CPUs, and the standby service module is a standby module of the primary service module. If the service of the active service module fails to work normally, the standby is performed. The service module is converted into the main service module of the cluster router.
在本实施例中,该装置还包括:资源管理模块,In this embodiment, the apparatus further includes: a resource management module,
多个该CPU上运行CPU资源管理模块,该资源管理模块用于给一个或多个该业务模块配置对应的CPU资源。A CPU resource management module is configured on the plurality of CPUs, and the resource management module is configured to configure corresponding CPU resources for one or more of the service modules.
在本实施例中,该资源管理模块包括主用管理模块和备用管理模块;In this embodiment, the resource management module includes an active management module and a standby management module;
该主用管理模块和该备用管理模块运行在不同的该CPU上,在该主用管理模块不能工作的情况下,该备用管理模块接管该主用管理模块的工作。The primary management module and the standby management module run on different CPUs. When the primary management module is inoperable, the standby management module takes over the work of the primary management module.
下面通过优选实施例和实施方式进行详细说明。The following is a detailed description of the preferred embodiments and embodiments.
本优选实施例提供了一种可合理分配系统CPU资源的方法,提高了集群路由器系统的可靠性。The preferred embodiment provides a method for rationally allocating system CPU resources, and improves the reliability of the cluster router system.
图2是根据本发明优选实施例的资源管理模块与各业务模块间的交互示意图,本发明优选实施的分布式集群路由器提供了一种可以均衡合理分配系统CPU资源的方法,包括主用管理模块、备用管理模块、主用业务模块、备用业务模块,CPU资源分配表。2 is a schematic diagram of interaction between a resource management module and each service module according to a preferred embodiment of the present invention. The distributed cluster router preferably implemented by the present invention provides a method for balancing and rationally allocating system CPU resources, including a main management module. , standby management module, main service module, standby service module, CPU resource allocation table.
主用管理模块和备用管理模块:集群路由器系统负责管理CPU资源的管理模块。备用管理模块作为主用管理模块的备用模块,在主用模块不能工作时,接管主用管理模块的工作,并且切换为主用管理模块。Active management module and standby management module: The management module of the cluster router system responsible for managing CPU resources. The standby management module serves as a standby module of the primary management module, and takes over the work of the primary management module when the primary module fails to work, and switches to the primary management module.
主用业务模块和备用业务模块:集群路由器系统中可独立运行的各业务模块,备用业务模块作为主用业务模块的备份模块,在主用模块不能工作时,接管主用模块的工作,并且切换为主用业务模块。The main service module and the standby service module are: each service module that can be independently operated in the cluster router system, and the standby service module serves as a backup module of the main service module, and takes over the work of the main module when the main module fails to work, and switches Main business module.
CPU资源分配表:集群路由器系统的管理模块中记录系统中各CPU运行的业务模块情况。CPU resource allocation table: The management module of the cluster router system records the service modules of each CPU running in the system.
本优选实施例中的分布式集群路由器系统的实现方法包括:The implementation method of the distributed cluster router system in the preferred embodiment includes:
启动集群路由器系统时,系统首先选择某个CPU运行主用管理模块,负责分配回收管理各业务模块。创建和更新CPU资源分配表。When the cluster router system is started, the system first selects a CPU to run the main management module, which is responsible for allocating and managing each service module. Create and update a CPU resource allocation table.
系统运行主用管理模块后,选择另外一个CPU运行备用管理模块,作为主用管理模块的备用模块,增强管理模块的可靠性。更新CPU资源分配表。After the system runs the main management module, select another CPU to run the standby management module as the standby module of the main management module to enhance the reliability of the management module. Update the CPU resource allocation table.
配置业务时,系统根据CPU资源分配表选择CPU负载最轻的CPU分配给该业务作为该业务模块主用CPU,同时选择另外一个CPU作为该业务模块的备用CPU。更新CPU资源分配表。
When configuring a service, the system selects the CPU with the lightest CPU load according to the CPU resource allocation table and assigns it to the service as the main CPU of the service module, and selects another CPU as the standby CPU of the service module. Update the CPU resource allocation table.
当系统中某项业务出现异常时,进行主备用模块倒换,主用模块从所分配的CPU资源上撤销,备用模块转为主用模块,主用管理模块重新为该业务的备用模块分配CPU资源,更新CPU资源分配表。When a certain service in the system is abnormal, the primary and backup modules are switched, the active module is revoked from the allocated CPU resources, and the standby module is transferred to the active module. The active management module re-allocates the CPU resources for the standby module of the service. , update the CPU resource allocation table.
当删除某项已独立分配CPU资源的业务时,系统回收已分配给它的主备CPU资源,更新CPU资源分配表。When deleting a service that has been independently allocated CPU resources, the system reclaims the active and standby CPU resources allocated to it and updates the CPU resource allocation table.
集群路由器启动后,未配置任何业务时,不主动给相关的业务模块分配CPU资源。进一步,系统为业务模块选择CPU时,优先选择未运行任何业务模块的CPU资源分配给该业务模块;若系统中无未运行任何业务模块的CPU资源,则选择只运行备用模块且运行的备用模块数最少的CPU资源分配给该项新业务加载主用模块,选择只运行主用模块且运行的主用模块最少的CPU资源分配给该项新业务加载备用模块;若系统中也无只运行备用模块的CPU资源,则选择运行主用模块数最少的CPU资源分配给该项新业务加载主用模块;若系统中也无只运行主用模块的CPU资源,则选择运行备用模块数最少的CPU资源分配给该项新业务加载备用模块。After the cluster router is started, when no service is configured, the CPU module is not actively allocated to related service modules. Further, when the system selects a CPU for the service module, the CPU resource that is not running any service module is preferentially allocated to the service module; if there is no CPU resource of any service module in the system, the standby module that runs only the standby module and runs is selected. The least amount of CPU resources are allocated to the new service loading main module, and the CPU module that runs only the main module and runs the running main module is allocated to the new service loading standby module; if the system does not only run the standby module For the CPU resources of the module, select the CPU resource with the least number of active modules to allocate to the new service load master module; if there is no CPU resource running only the active module in the system, select the CPU with the least number of spare modules. The resource is allocated to the new service to load the standby module.
采用本发明的优选实施例的集群路由器系统,均衡了集群路由器系统中各CPU的负载,使得集群路由器系统中各CPU资源得到有效充分利用,系统已分配的各业务模块均有备用模块,且不与主用模块分配在同一个CPU上,当主用模块出现异常时,备用模块可自主转为主用模块,由于系统中各业务模块是独立的,所以当系统中某一个业务模块出现异常并进行主备模块的倒换时,均不会影响到其他独立的业务模块,同时也减轻了主用CPU的业务负担,进而提高了系统的整体可靠性。The cluster router system of the preferred embodiment of the present invention balances the load of each CPU in the cluster router system, so that the CPU resources in the cluster router system are effectively utilized, and each service module allocated by the system has a backup module, and The main module is allocated on the same CPU. When the main module is abnormal, the standby module can be autonomously transferred to the main module. Since each service module in the system is independent, when a certain service module in the system is abnormal, When the switchover of the active and standby modules is performed, the other independent service modules are not affected, and the service burden of the active CPU is also reduced, thereby improving the overall reliability of the system.
硬件模块部分包括:以2+2集群路由器系统为例,该系统中共有4个机框,每个机框有2个主控CPU,则该系统中共有8个可用的CPU资源,分别编号:中心框1的两个CPU为C1、C2,中心框2的两个CPU为C3、C4,线卡框1的两个CPU为L1、L2,线卡框2的两个CPU为L3、L4;The hardware module includes: Take the 2+2 cluster router system as an example. There are four chassis in the system. Each chassis has two master CPUs. There are 8 CPU resources available in the system. The two CPUs of the center frame 1 are C1 and C2, the two CPUs of the center frame 2 are C3 and C4, the two CPUs of the line card frame 1 are L1 and L2, and the two CPUs of the line card frame 2 are L3 and L4.
软件模块部分包括:集群系统中的可独立分配的业务模块,假设系统有可独立分配的业务模块5个,分别为A、B、C、D、E;The software module part includes: an independently assignable service module in the cluster system, and assumes that the system has five service modules that can be independently allocated, respectively, A, B, C, D, and E;
CPU资源分配流程部分的处理步骤如下:The processing steps of the CPU resource allocation process part are as follows:
集群路由器系统启动后,自主选择管理模块的主备CPU,假设分别选择为C1、C3,系统正常运行无任何业务,管理模块维护的CPU资源分配表中各CPU的业务情况均为空:After the cluster router system is started, the active and standby CPUs of the management module are selected independently. Assume that C1 and C3 are selected respectively. The system runs normally without any service. The CPUs in the CPU resource allocation table maintained by the management module are empty:
图3是根据本发明优选实施例的新增业务模块分配主备CPU资源的流程示意图,如图3所示,此时系统配置了A业务:按照图3中的流程,首先系统查询管理模块维护的CPU资源表有未加载任何业务模块的CPU资源,则选择其中之一如C2分配给A业务加载主用业务模块;再次查询CPU资源表仍然有未加载任何业务模块的CPU资源,则再次选择其中之一如C4分配给A业务加载备用业务模块;同时将分配信息添加到CPU资源分配表中;FIG. 3 is a schematic diagram of a process of allocating active and standby CPU resources by a new service module according to a preferred embodiment of the present invention. As shown in FIG. 3, the system is configured with the A service: according to the process in FIG. 3, the system query management module is first maintained. If there is any CPU resource that does not load any service module, select one of them, such as C2, and assign it to the A service to load the main service module. If the CPU resource table is still queried, the CPU resources of any service module are still not loaded. One of them, for example, C4 is assigned to the A service to load the standby service module; at the same time, the allocation information is added to the CPU resource allocation table;
系统配置了B业务:按照上述步骤的规则,此次分配L1给B业务加载主用业务模块,分
配L3给B业务加载备用业务模块,同时将分配信息添加到CPU资源分配表中;The system is configured with the B service. According to the rules of the preceding steps, the L1 is allocated to the B service to load the main service module.
The L3 is loaded with the standby service module for the B service, and the allocation information is added to the CPU resource allocation table.
系统配置了C业务:按照上述步骤的规则,此次分配L2给C业务加载主用业务模块,分配L4给C业务加载备用业务模块,同时将分配信息添加到CPU资源分配表中;The system is configured with the C service: according to the rules of the above steps, the L2 is allocated to the C service to load the main service module, the L4 is allocated to the C service to load the standby service module, and the allocation information is added to the CPU resource allocation table;
系统配置了D业务:按照图3的规则,系统中已无未加载任何业务模块的CPU资源,则选择只分配了备用模块的CPU资源如C3给D业务加载主用业务模块,选择只分配了备业务模块的C2给D业务加载备用业务模块,同时将分配信息添加到CPU资源分配表中;The D service is configured in the system. According to the rules in Figure 3, the CPU resources of any service module are not loaded in the system. Then, only the CPU resources of the standby module are allocated, such as C3, and the D service is loaded with the main service module. The C2 of the standby service module loads the standby service module for the D service, and adds the allocation information to the CPU resource allocation table;
系统配置了E业务:按照上图3的规则,此次分配C4给E业务加载主用业务模块,分配L1给E业务加载备用业务模块,同时将分配信息添加到CPU资源分配表中;The E service is configured in the system. According to the rules in Figure 3 above, the C4 is allocated to the E service to load the main service module, the L1 is allocated to the E service to load the standby service module, and the allocation information is added to the CPU resource allocation table.
图4是根据本发明优选实施例的集群路由器系统业务模块倒换的流程示意图,如图4所示,当系统中某个业务主用模块异常如C业务模块时,则撤销L2号CPU上的C业务主用模块,并将L4号CPU上的C业务备用模块转为C业务主用模块,更新管理模块的CPU资源表,此时管理模块中的CPU资源表中L2是没有加载任何业务的,根据图4的规则,分配L2给C业务加载备用模块,同时更新管理模块的CPU资源分配表;4 is a schematic flowchart of a service module switching of a cluster router system according to a preferred embodiment of the present invention. As shown in FIG. 4, when a service main module in the system is abnormal, such as a C service module, the C on the L2 CPU is revoked. The service main module converts the C service standby module on the L4 CPU into the C service main module, and updates the CPU resource table of the management module. At this time, the L2 of the CPU resource table in the management module is not loaded with any service. According to the rule of FIG. 4, the L2 is allocated to the C service to load the standby module, and the CPU resource allocation table of the management module is updated;
当系统中某个业务主用模块异常如A业务模块时,则撤销C2号CPU上的A业务主用模块,并将C4号CPU上的A业务备用模块转为A业务主用模块,更新管理模块的CPU资源分配表,此时管理模块中的CPU资源表中没有未加载任何业务的CPU资源,根据图4的规则,可选择分配只加载了一个主业务模块的L4给A业务加载备用模块,同时更新管理模块的CPU资源分配表。When a service main module in the system is abnormal, such as the A service module, the A service main module on the C2 CPU is revoked, and the A service standby module on the C4 CPU is converted into the A service main module, and the management is updated. The CPU resource allocation table of the module. At this time, there is no CPU resource in the CPU resource table of the management module that does not load any service. According to the rule of FIG. 4, the L4 that loads only one main service module can be allocated to load the standby module for the A service. At the same time, update the CPU resource allocation table of the management module.
图5是根据本发明优选实施例的集群路由器系统CPU资源回收的流程示意图,如图5所示,当集群系统删除某项业务如业务E时,则根据图5流程,管理模块收回分配给E业务的CPU资源,更新管理模块的CPU资源分配表。5 is a schematic flowchart of CPU resource recovery of a cluster router system according to a preferred embodiment of the present invention. As shown in FIG. 5, when a cluster system deletes a certain service, such as service E, the management module reclaims the allocation to E according to the process of FIG. The CPU resource of the service, and the CPU resource allocation table of the management module is updated.
本发明优选实施例主要是充分利用集群路由器中的每个CPU资源,将系统中的各模块功能分布到系统中可用的CPU资源上,这样即可以减小系统对CPU性能的要求,还可以减轻主CPU的负担,提高系统的可靠性,并可充分利用系统中的现有资源。The preferred embodiment of the present invention mainly utilizes each CPU resource in the cluster router to distribute the functions of each module in the system to the available CPU resources in the system, thereby reducing the system performance requirements of the system and reducing the CPU performance. The burden on the main CPU increases the reliability of the system and makes full use of the existing resources in the system.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本发明各个实施例该的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware, but in many cases, the former is A better implementation. Based on such understanding, the technical solution of the present invention, which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk, The optical disc includes a number of instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method of various embodiments of the present invention.
本发明的实施例还提供了一种存储介质。可选地,在本实施例中,上述存储介质可以被设置为存储用于执行上述实施例方法步骤的程序代码:Embodiments of the present invention also provide a storage medium. Optionally, in this embodiment, the foregoing storage medium may be configured to store program code for performing the method steps of the above embodiment:
可选地,在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(ROM,
Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。Optionally, in this embodiment, the foregoing storage medium may include, but is not limited to, a U disk, a read only memory (ROM,
Read-Only Memory), Random Access Memory (RAM), removable hard disk, disk or optical disk, etc., which can store program code.
可选地,在本实施例中,处理器根据存储介质中已存储的程序代码执行上述实施例的方法步骤。Optionally, in this embodiment, the processor performs the method steps of the foregoing embodiments according to the stored program code in the storage medium.
显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。It will be apparent to those skilled in the art that the various modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein. The steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated as a single integrated circuit module. Thus, the invention is not limited to any specific combination of hardware and software.
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化,例如CPU资源调度算法,可以依据系统的硬件和软件条件,选择不同的更适合的方法。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above description is only for the preferred embodiment of the present invention, and is not intended to limit the present invention. For those skilled in the art, the present invention may have various changes and changes, such as a CPU resource scheduling algorithm, which may be based on the hardware of the system. And software conditions, choose a different and more suitable method. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.
基于本发明实施例提供的上述技术方案,在不同的CPU上运行不同的主用业务模块和备用业务模块,其中,该备用业务模块为该主用业务模块的备用模块,在该主用业务模块的业务不能正常工作的情况下,该备用业务模块转换为该集群路由器的主用业务模块,解决了集群路由器上CPU资源不能满足业务需求的问题,提高了集群路由器系统的可靠性。
According to the foregoing technical solution provided by the embodiment of the present invention, different primary service modules and standby service modules are run on different CPUs, where the standby service module is a standby module of the primary service module, and the primary service module is used in the primary service module. When the service is not working properly, the standby service module is converted into the main service module of the cluster router, which solves the problem that the CPU resources on the cluster router cannot meet the service requirements, and improves the reliability of the cluster router system.
Claims (12)
- 一种集群路由器CPU资源的配置方法,包括:A method for configuring a cluster router CPU resource includes:集群路由器将不同的业务模块运行在不同的CPU上。The cluster router runs different business modules on different CPUs.
- 根据权利要求1所述的方法,其中,集群路由器将不同的业务模块运行在不同的CPU上包括:The method of claim 1 wherein the cluster router running different service modules on different CPUs comprises:所述集群路由器在不同的CPU上运行不同的主用业务模块和备用业务模块,其中,所述业务模块包括:所述主用业务模块、所述备用业务模块,所述备用业务模块为所述主用业务模块的备用模块,在所述主用业务模块的业务不能正常工作的情况下,所述备用业务模块转换为所述集群路由器的主用业务模块。The cluster router runs different active service modules and standby service modules on different CPUs, where the service module includes: the primary service module and the standby service module, where the standby service module is The standby module of the active service module is converted into the active service module of the cluster router if the service of the active service module fails to work normally.
- 根据权利要求1所述的方法,其中,所述方法还包括:The method of claim 1 wherein the method further comprises:所述集群路由器在所述多个CPU上运行CPU资源管理模块,所述资源管理模块给一个或多个所述业务模块配置对应的CPU资源。The cluster router runs a CPU resource management module on the plurality of CPUs, and the resource management module configures corresponding CPU resources to one or more of the service modules.
- 根据权利要求3所述的方法,其中,所述方法还包括:The method of claim 3, wherein the method further comprises:在所述业务模块从分配的CPU上撤销的情况下,所述资源管理模块回收给所述业务模块配置的CPU资源。In a case where the service module is revoked from the allocated CPU, the resource management module reclaims CPU resources configured for the service module.
- 根据权利要求3所述的方法,其中,还包括:The method of claim 3, further comprising:所述资源管理模块创建并更新CPU资源分配表,所述CPU资源分配表用于记录所述业务模块的配置所述CPU资源的运行情况。The resource management module creates and updates a CPU resource allocation table, where the CPU resource allocation table is used to record the running of the CPU resource of the service module.
- 根据权利要求5所述的方法,其中,所述资源管理模块给一个或多个业务模块配置对应的CPU资源包括:The method of claim 5, wherein the resource management module configuring the corresponding CPU resources for the one or more service modules comprises:所述资源管理模块根据所述CPU资源分配表选择所述多个CPU中负载最低的CPU运行所述主用业务模块或者所述备用业务模块。And the resource management module selects, according to the CPU resource allocation table, a CPU with the lowest load among the plurality of CPUs to run the primary service module or the standby service module.
- 根据权利要求5所述的方法,其中,所述资源管理模块给一个或多个业务模块配置对应的CPU资源包括以下至少之一:The method according to claim 5, wherein the resource management module configures one or more service modules with corresponding CPU resources, including at least one of the following:选择所述多个CPU中未运行任何所述业务模块的CPU分配给所述主用业务模块;Selecting, among the plurality of CPUs, a CPU that does not run any of the service modules is allocated to the active service module;选择所述多个CPU中未运行任何所述业务模块的CPU分配给所述备用业务模块;Selecting, by the CPU of the plurality of CPUs that the service module is not running, the standby service module;若所述多个CPU均运行所述业务模块,则选择只运行备用业务模块且运行的备用业务模块负载最少的CPU分配给所述主用业务模块;If the plurality of CPUs are running the service module, selecting a CPU that only runs the standby service module and runs the standby service module with the least load is allocated to the active service module;若所述多个CPU均运行所述业务模块,选择只运行主用业务模块且运行的主用模块负载最少的CPU分配给所述备用业务模块;If the plurality of CPUs are running the service module, selecting a CPU that only runs the active service module and runs the least loaded primary module is allocated to the standby service module;若所述多个CPU均运行所述业务模块,且均运行备用模块的情况下,则选择运行主 用业务模块负载最少的CPU分配给所述主用业务模块;If the plurality of CPUs are all running the service module, and both of the modules are running, select the running master. Allocating the primary service module to the CPU with the least load of the service module;若所述多个CPU均运行所述业务模块,且均运行主用业务模块的情况下,则选择运行备用业务模块负载最少的CPU分配所述备用业务模块。If the plurality of CPUs are all running the service module, and both of the main service modules are running, the CPU with the least load of the standby service module is selected to allocate the standby service module.
- 根据权利要求3至权利要求7任一项所述的方法,其中,所述资源管理模块包括主用管理模块和备用管理模块;The method according to any one of claims 3 to 7, wherein the resource management module comprises an active management module and a standby management module;所述主用管理模块和所述备用管理模块运行在所述多个CPU不同的CPU上,在所述主用管理模块不能工作的情况下,所述备用管理模块接管所述主用管理模块的工作。The primary management module and the standby management module are run on different CPUs of the plurality of CPUs. When the primary management module is inoperable, the standby management module takes over the primary management module. jobs.
- 一种集群路由器,包括:业务模块和CPU,A cluster router includes: a service module and a CPU,不同的所述业务模块运行在不同的所述CPU上。Different of the service modules run on different CPUs.
- 根据权利要求9所述的装置,其中,所述业务模块包括:所述主用业务模块、所述备用业务模块:The apparatus according to claim 9, wherein the service module comprises: the primary service module, the standby service module:不同的所述CPU上运行不同的所述主用业务模块和所述备用业务模块,所述备用业务模块为所述主用业务模块的备用模块,在所述主用业务模块的业务不能正常工作的情况下,所述备用业务模块转换为所述集群路由器的主用业务模块。The different service modules and the standby service module are running on different CPUs, and the standby service module is a standby module of the active service module, and the service of the active service module cannot work normally. In case, the standby service module is converted into a main service module of the cluster router.
- 根据权利要求9所述的装置,其中,所述装置还包括:资源管理模块,The apparatus of claim 9, wherein the apparatus further comprises: a resource management module,多个所述CPU上运行CPU资源管理模块,所述资源管理模块设置为给一个或多个所述业务模块配置对应的CPU资源。A CPU resource management module is run on the plurality of CPUs, and the resource management module is configured to configure corresponding CPU resources for one or more of the service modules.
- 根据权利要求11所述的装置,其中,所述资源管理模块包括主用管理模块和备用管理模块;The apparatus according to claim 11, wherein the resource management module comprises an active management module and a standby management module;所述主用管理模块和所述备用管理模块运行在不同的所述CPU上,在所述主用管理模块不能工作的情况下,所述备用管理模块接管所述主用管理模块的工作。 The primary management module and the standby management module run on different CPUs. When the primary management module is inoperable, the standby management module takes over the work of the primary management module.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510270899.3 | 2015-05-25 | ||
CN201510270899.3A CN106302198A (en) | 2015-05-25 | 2015-05-25 | The collocation method of cluster routers cpu resource and cluster routers |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2016188135A1 true WO2016188135A1 (en) | 2016-12-01 |
Family
ID=57393277
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2016/071623 WO2016188135A1 (en) | 2015-05-25 | 2016-01-21 | Cpu resource configuration method for cluster router and cluster router |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN106302198A (en) |
WO (1) | WO2016188135A1 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108574626A (en) * | 2017-03-13 | 2018-09-25 | 中兴通讯股份有限公司 | A kind of distribution NAT two-node cluster hot backup flow switching systems and method |
CN114428665A (en) * | 2022-01-24 | 2022-05-03 | 北京百度网讯科技有限公司 | Data processing method, device, equipment and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1719831A (en) * | 2005-07-15 | 2006-01-11 | 清华大学 | A Highly Available Distributed Border Gateway Protocol System Based on Cluster Router Structure |
US20070274307A1 (en) * | 2004-04-15 | 2007-11-29 | Shuichi Karino | Cluster System, Cluster Member, And Program |
CN101938417A (en) * | 2010-09-01 | 2011-01-05 | 中兴通讯股份有限公司 | Realization method and board of active/standby configuration of boards |
CN102104542A (en) * | 2011-01-14 | 2011-06-22 | 中国人民解放军信息工程大学 | Method for realizing service group router under forwarding and controlling separated network architecture |
-
2015
- 2015-05-25 CN CN201510270899.3A patent/CN106302198A/en not_active Withdrawn
-
2016
- 2016-01-21 WO PCT/CN2016/071623 patent/WO2016188135A1/en active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070274307A1 (en) * | 2004-04-15 | 2007-11-29 | Shuichi Karino | Cluster System, Cluster Member, And Program |
CN1719831A (en) * | 2005-07-15 | 2006-01-11 | 清华大学 | A Highly Available Distributed Border Gateway Protocol System Based on Cluster Router Structure |
CN101938417A (en) * | 2010-09-01 | 2011-01-05 | 中兴通讯股份有限公司 | Realization method and board of active/standby configuration of boards |
CN102104542A (en) * | 2011-01-14 | 2011-06-22 | 中国人民解放军信息工程大学 | Method for realizing service group router under forwarding and controlling separated network architecture |
Also Published As
Publication number | Publication date |
---|---|
CN106302198A (en) | 2017-01-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10942828B2 (en) | Method for storing data shards, apparatus, and system | |
US10158579B2 (en) | Resource silos at network-accessible services | |
JP6185486B2 (en) | A method for performing load balancing in a distributed computing environment | |
CN100555230C (en) | Method for providing processor cluster for system with multiple processors | |
US20060015773A1 (en) | System and method for failure recovery and load balancing in a cluster network | |
JP2015522876A (en) | Method and apparatus for eliminating single points of failure in cloud-based applications | |
CN106993019A (en) | Distributed task dispatching method and system | |
CN103051691B (en) | Partition allocation method, device and distributed memory system | |
EP3180692A1 (en) | Fault tolerant federation of computing clusters | |
CN104702691B (en) | Distributed load equalizing method and device | |
CN104679594B (en) | A kind of middleware distributed computing method | |
CN111770477B (en) | Deployment method and related device for protection resources of MEC network | |
WO2017161979A1 (en) | Cloud platform-based method and device for managing servers | |
EP3864824A1 (en) | Methods and apparatuses for balancing utilization of computer resources | |
KR20200080458A (en) | Cloud multi-cluster apparatus | |
CN104506669B (en) | The IP address distribution system and method for a kind of Based on Distributed network simulation platform | |
CN114398203A (en) | Cloud disaster recovery system, method, electronic device and storage medium | |
CN110493060A (en) | A kind of virtual IP address distribution method and relevant apparatus | |
US10871997B2 (en) | System and method for routing computing workloads based on proximity | |
WO2016188135A1 (en) | Cpu resource configuration method for cluster router and cluster router | |
CN116016449A (en) | Method and system for uniformly distributing IP addresses based on container cloud platform | |
WO2016121879A1 (en) | Virtualization control apparatus, arrangement destination selecting method and program | |
JP2019139533A (en) | Arrangement configuration device and arrangement configuration method | |
CN109257201B (en) | A kind of license sending method and device | |
CN116909725A (en) | Pod scheduling methods, devices, electronic equipment and computer program products |
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: 16799024 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: 16799024 Country of ref document: EP Kind code of ref document: A1 |