CN108268367B - Application program affinity judgment method and related application program - Google Patents

Application program affinity judgment method and related application program Download PDF

Info

Publication number
CN108268367B
CN108268367B CN201611258347.1A CN201611258347A CN108268367B CN 108268367 B CN108268367 B CN 108268367B CN 201611258347 A CN201611258347 A CN 201611258347A CN 108268367 B CN108268367 B CN 108268367B
Authority
CN
China
Prior art keywords
application program
application
affinity
identification information
hardware
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201611258347.1A
Other languages
Chinese (zh)
Other versions
CN108268367A (en
Inventor
王俊峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201611258347.1A priority Critical patent/CN108268367B/en
Publication of CN108268367A publication Critical patent/CN108268367A/en
Application granted granted Critical
Publication of CN108268367B publication Critical patent/CN108268367B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3604Software analysis for verifying properties of programs

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the invention discloses an application program affinity judging method and a related application program, wherein the method is applied to a network function virtualization system, the network function virtualization system comprises a first application program and a second application program, and the method comprises the following steps: when the first application program is started, the first application program acquires the anti-affinity information of the first application program; the first application program sends a reverse affinity detection message to a second application program in a network element where the first application program is located; and the first application program receives the inverse affinity detection feedback message returned by the second application program and quits starting. When the first application program is started, the anti-affinity detection message is sent to other application programs in the network element where the first application program is located to determine whether the anti-affinity application program of the first application program exists in the network element or not, and the application program is quitted to be started when the anti-affinity application program exists, so that the reliability of the application program is improved.

Description

Application program affinity judgment method and related application program
Technical Field
The invention relates to the field of Internet, in particular to an application program affinity judging method and a related application program.
Background
Network Function Virtualization (NFV) systems decouple software and hardware and abstract functions, so that Network device functions do not rely on dedicated hardware any more, resources can be shared sufficiently and flexibly, rapid development and deployment of new services are realized, and automatic deployment, elastic expansion, fault isolation, self-healing and the like are performed based on actual service requirements. The main idea of NFV is to replace proprietary dedicated network element devices by servers, storage and network devices based on industry standards, and network element devices under this idea architecture will share the same physical server.
The inverse affinity means that when a service is processed by using the NFV system, in order to improve service reliability, virtual machines processing the same service need to be allocated on different physical servers to avoid service loss caused by virtual machine failure. At present, in an NFV system, it is ensured that a plurality of virtual machines are respectively deployed on different servers through an inverse affinity configuration, the inverse affinity configuration may be implemented by a Management and Orchestration (MANO) system according to a Virtual Network Function Descriptor (VNFD) file, and the VNFD file is implemented mainly by manual writing. That is, writing of the VNFD file is completed by artificially determining whether different application programs have inverse affinity, so that there is a large subjective factor in determining the inverse affinity of the application programs. When a VNFD writer is unfamiliar with services, judgment of inverse affinity among application programs is wrong, so that written VNFD files are incorrect, and the NFV system has potential reliability hazards.
Disclosure of Invention
The embodiment of the invention provides an application program affinity judging method and a related application program, so that an anti-affinity application program of the application program can be accurately judged, and the reliability of the application program is improved.
In a first aspect, an embodiment of the present invention provides an application affinity determining method, where the method is applied to a network function virtualization system, where the network function virtualization system includes a first application program and a second application program, and the method includes: when a first application program is started, the first application program acquires anti-affinity information of the first application program, wherein the anti-affinity information comprises hardware server identification information of the first application program and service type identification information of the first application program, the hardware server identification information is used for identifying a hardware server deployed by the first application program, and the service type identification information is used for identifying the service type of a service borne by the first application program; then the first application program sends a reverse affinity detection message to a second application program in a network element where the first application program is located, wherein the reverse affinity detection message is used for detecting whether the second application program is a reverse affinity application program of the first application program or not, the reverse affinity detection message comprises reverse affinity information, the service type of the service borne by the reverse affinity application program of the first application program is the same as the service type of the service borne by the first application program, and a hardware server deployed by the reverse affinity application program of the first application program is the same as a hardware server deployed by the first application program; and finally, the first application program receives an inverse affinity detection feedback message returned by the second application program and quits starting, wherein the inverse affinity detection feedback message indicates that the second application program is the inverse affinity application program of the first application program.
In the solution provided in the embodiment of the present invention, when the first application program is started, the first application program determines whether the anti-affinity application program of the first application program exists in the network element by sending an anti-affinity detection message to another application program in the network element where the first application program is located, and then quits starting when the anti-affinity application program of the first application program exists in the network element where the first application program is located, so as to improve the reliability of the application program.
In one possible design, the anti-affinity probe message further includes an anti-affinity identifier, where the anti-affinity identifier is used to instruct the second application to determine whether the second application is an anti-affinity application of the first application. Therefore, when the anti-affinity identifier indicates that the first application program needs to perform anti-affinity judgment, the first application program judges whether the hardware server is deployed with the anti-affinity application of the first application program or not, and the application program is more flexibly deployed.
In one possible design, the network function virtualization system further includes a hardware layer, a hypervisor layer, and an operating system layer, the hypervisor layer being deployed with a hardware monitor module, the operating system layer being deployed with a unified hardware interface module, the first application being in communication with the operating system layer, the operating system layer being in communication with the hypervisor layer, the hypervisor layer being in communication with the hardware layer, the hardware layer including a hardware server; at this time, the first application program acquires the hardware server identification information of the first application program, specifically: the first application program acquires the hardware server identification information of the first application program through the unified hardware interface module and the hardware monitoring module. Therefore, the hardware server identification information of the hardware server can be obtained at the application program layer.
In one example, the hardware server identification information includes at least one of: the hardware monitoring module and the unified hardware interface module are connected through a socket, in the socket connection, the unified hardware interface module is a server, and meanwhile, the unified hardware interface module serves as the server to provide connection and interface for the application program to connect and call hardware server hardware information of the hardware server. Through one or more of the identification information, the hardware server can be accurately and uniquely identified.
In a second aspect, an embodiment of the present invention provides an application affinity determining method, where the method is applied to a network function virtualization system, where the network function virtualization system includes a first application and a second application, and the method includes: the method comprises the steps that a second application program receives an anti-affinity detection message sent by a first application program, the anti-affinity detection message is used for detecting whether the second application program in a network element where the first application program is located is the anti-affinity application program of the first application program, the anti-affinity detection message comprises hardware server identification information of the first application program and service type identification information of the first application program, the hardware server identification information is used for identifying a hardware server deployed by the first application program, and the service type identification information is used for identifying the service type of service borne by the first application program; then the second application program judges whether the second application program is the inverse affinity application program of the first application program according to the inverse affinity detection message, the service type of the service carried by the inverse affinity application program of the first application program is the same as the service type of the service carried by the first application program, and a hardware server deployed by the inverse affinity application program of the first application program is the same as a hardware server deployed by the first application program; when the second application program determines that the second application program is the anti-affinity application program of the first application program, the second application program sends an anti-affinity detection feedback message to the first application program, and the anti-affinity detection feedback message indicates that the second application program is the anti-affinity application program of the first application program.
In the solution provided in the embodiment of the present invention, when the second application receives the anti-affinity detection message of the first application, by determining whether the second application is the anti-affinity application of the first application, the first application is instructed to quit the start when the second application is the anti-affinity application of the first application, so as to improve the reliability of the application.
In one possible design, the second application determines whether the second application is the anti-affinity application of the first application according to the anti-affinity detection message, specifically: the second application program judges whether the service type identification information of the first application program and the service type identification information of the second application program have a unique mapping relation or not; and then when the service type identification information of the first application program and the service type identification information of the second application program have a unique mapping relation, the second application program judges whether the hardware server identification information of the second application program and the hardware server identification information of the first application program have the unique mapping relation or not, so that when the hardware server identification information of the second application program and the hardware server identification information of the first application program have the unique mapping relation, the second application program is determined to be the anti-affinity application program of the first application program. After the unique mapping relation between the service type identification information of the first application program and the service type identification information of the second application program is determined, whether the hardware server identification information of the first application program and the hardware server identification information of the second application program have the unique mapping relation or not is judged, and the judgment efficiency of the inverse affinity is improved.
In one possible design, the anti-affinity probe message further includes an anti-affinity identifier, where the anti-affinity identifier is used to instruct the second application to determine whether the second application is an anti-affinity application of the first application; the second application program judges whether the second application program is the anti-affinity application program of the first application program according to the anti-affinity detection message, and the method specifically comprises the following steps: and when the anti-affinity detection message comprises the anti-affinity identification, the second application program judges whether the second application program is the anti-affinity application program of the first application program or not according to the anti-affinity detection message. Making application deployment more flexible
In a third aspect, an embodiment of the present invention provides a first application program, where the first application program is applied to a network function virtualization system, where the network function virtualization system includes a first application program and a second application program, and the first application program has a function of implementing the first aspect, where the function may be implemented by hardware or may be implemented by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above-described functions.
In a fourth aspect, an embodiment of the present invention provides a first application program, where the first application program includes a processor, a receiver, and a transmitter, and the processor is configured to support the first application program to perform corresponding functions in the above method. The receiver and transmitter are used to support communication between a first application and a second application. Further, the first application may also include a memory for coupling with the processor that stores program instructions and data necessary for the first application.
In a fifth aspect, an embodiment of the present invention provides a computer storage medium for storing computer software instructions for the first application program described in the third aspect, which includes a program designed to execute the above aspects.
In a sixth aspect, an embodiment of the present invention provides a second application program, where the second application program is applied to a network function virtualization system, where the network function virtualization system includes a first application program and a second application program, and the second application program has a function of implementing the second aspect, where the function may be implemented by hardware or may be implemented by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above-described functions.
In a seventh aspect, an embodiment of the present invention provides a second application program, where the second application program includes a processor, a receiver, and a transmitter, and the processor is configured to support the second application program to perform corresponding functions in the foregoing method. The receiver and transmitter are used to support communication between the second application and the first application. Further, the second application may also include a memory for coupling with the processor that stores program instructions and data necessary for the second application.
In an eighth aspect, an embodiment of the present invention provides a computer storage medium for storing computer software instructions for the second application program described above for the sixth aspect, which includes a program designed to execute the above aspects.
Compared with the prior art, in the scheme of the embodiment of the present invention, when the first application is started, the first application determines whether the anti-affinity application of the first application exists in the network element by sending an anti-affinity detection message to other applications in the network element where the first application is located, and then exits from the start when the anti-affinity application of the first application exists in the network element where the first application is located, so as to improve the reliability of the application.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic architecture diagram of a network function virtualization system according to an embodiment of the present invention;
FIG. 2 is a block diagram of another network function virtualization system according to an embodiment of the present invention;
FIG. 3 is a block diagram of a network function virtualization system according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating a method for determining affinity of an application according to an embodiment of the present invention;
FIG. 5 is a functional block diagram of a first application provided by an embodiment of the apparatus of the present invention;
fig. 6 is a schematic structural diagram of another first application program according to an embodiment of the present invention;
FIG. 7 is a functional block diagram of a second application provided by an embodiment of the apparatus of the present invention;
fig. 8 is a schematic structural diagram of another second application program according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention.
In order to better understand the technical solution of the present invention, the following briefly describes the architecture of the network function virtualization system.
Referring first to fig. 1 and fig. 2, fig. 1 is a schematic architecture diagram of a network function virtualization system 100 according to an embodiment of the present invention, and fig. 2 is a schematic architecture diagram of another network function virtualization system 200 according to an embodiment of the present invention. Fig. 1 and fig. 2 are two main NFV architectures provided by an embodiment of the present invention, where fig. 1 is a bare machine type architecture, and fig. 2 is a host machine type architecture. As shown in fig. 1, the network function virtualization system includes a Hardware layer 110, a hypervisor (hypervisor) layer 120, an Operating System (OS) layer 130, an application (application) layer 140, a Hardware Monitor (HWM) module 150, and a unified Hardware interface (unified Hardware interface, UHI) module 160, wherein the operating system layer 130 and each application constitute a Virtual Machine (VM).
The hardware layer 110 is a hardware platform operated in a virtualized environment, and the hardware layer 110 may be composed of one or more servers; the hypervisor 120 is directly installed on the hardware computing resource for managing and calling the hardware resource, without requiring a bottom operating system, i.e., the hypervisor can be understood as a thin operating system; the operating system layer 130 includes one or more operating systems, which are access operating systems (Guest OSs) running on a hypervisor; the application layer 140 includes one or more application program modules, which are applications running on an Access operating system and provide services for clients, and the hardware monitoring module 150 is a hardware management module deployed in the management program layer and configured to obtain hardware information of a server in the hardware layer, such as a physical Access Control (MAC) address of a physical network card in the server, a Central Processing Unit (CPU) model, and the like; the unified hardware interface module 160 is a unified hardware interface module deployed in the access operating system, and is configured to communicate with a hardware monitoring module deployed in the hypervisor layer, acquire hardware information of a server in the hardware layer, and provide an interface for an application program application in an upper layer, so that the application program module acquires the hardware information.
As shown in fig. 2, the network function virtualization system includes a hardware layer 210, a host (host) layer 220, a hypervisor 230, an access operating system 240, an application layer 250, a hardware monitoring module 260, and a unified hardware interface module 270. The network function virtualization system architecture shown in fig. 2 is different from the network function virtualization system architecture shown in fig. 1 in that, in the network function virtualization system architecture shown in fig. 2, a host layer 220 is added to enable a hypervisor to run on a basic operating system, so as to construct a whole set of virtual hardware platform, a user installs a new operating system and application software as required, and the operating systems at the bottom layer and the upper layer can be completely unrelated.
In the embodiment of the present invention, whether based on the architecture of fig. 1 or fig. 2, the application program running on the operating system is actually running on the hardware server, and different application programs may run on different hardware servers and may also run on the same hardware server. For the application program, in the network function virtualization system, the configuration is performed on the same or different hardware servers according to the affinity of the application program. The virtual machines distributed to the same host machine are called as having affinity, the virtual machines distributed to different host machines are called as having anti-affinity, and the different host machines and the hardware server have unique corresponding relation. The anti-affinity is mainly to improve reliability, and virtual machines processing the same service need to be distributed on different host machines to avoid service loss caused by virtual machine failure. In addition, when one virtual machine fails during backup of the virtual machines, the backup virtual machine takes over the service of the original failed virtual machine, and in order to avoid the situation that the main and standby virtual machines are unavailable due to the failure of the host machine, the main and standby virtual machines need to be distributed to different host machines.
To illustrate a deployment scheme of an application program in the prior art, reference is first made to fig. 3, and fig. 3 is a schematic architecture diagram of a network function virtualization system 300 according to an embodiment of the present invention. In the Network function virtualization System shown in fig. 3, the Network function virtualization System includes a Network function virtualization Infrastructure layer (NFV Infrastructure, NFVI for short) 310, a Virtual Network Function (VNFS) 320, an Operation/service Support System (OSS/BSS) 330, and a Network function virtualization Management and Orchestration System (NFV Management and organization, NFV MANO) 340.
The virtualization infrastructure layer 310 includes a hardware resource layer, a virtualization layer, and a virtual resource layer, and the VNFS320 includes a plurality of VNFS and a plurality of Element Managers (EM), which may provide different virtual network functions for users. With respect to the architecture shown in fig. 1 or fig. 2, the application programs in fig. 1 or fig. 2 may be considered to be used to carry the VNF in fig. 3.
The NFV MANO includes a Network function virtualization Orchestrator (NFV editor, NFVO), one or more Virtualized Network function managers (VNF managers, VNFM) and a Virtualized Infrastructure Manager (VIM), a Network Service directory (NS catalog) for managing and orchestrating the entire NFVI resource, mapping and associating the Service Network and the NFVI resource, and implementing the OSS Service resource flow, and the MANO realizes operations such as creation of a virtual machine, installation of a Network element, configuration of affinity and anti-affinity, and system expansion and contraction by parsing a virtual Network function Descriptor (VNF Descriptor, VNFD) file provided by a product.
Therefore, in the prior art, in order to implement configuration of inverse affinity for an application, the configuration may be implemented by manually writing a VNFD file based on the network function virtualization system shown in fig. 3, and the reliability of manually writing the VNFD file is associated with a VNFD writer, so that there is a large subjective factor. In view of the foregoing problems, embodiments of the present invention provide a virtualized application configuration method, so as to determine the inverse affinity of an application through an application program itself, and improve the configuration accuracy of the inverse affinity of the application. The details will be described below.
Referring to fig. 4, fig. 4 is a schematic flowchart of an application affinity determining method according to an embodiment of the present invention, which is detailed as follows:
step S401, when the first application program is started, the first application program obtains inverse affinity information of the first application program, where the inverse affinity information includes hardware server identification information of the first application program and service type identification information of the first application program, the hardware server identification information is used to identify a hardware server deployed by the first application program, and the service type identification information is used to identify a service type of a service carried by the first application program.
In the embodiment of the invention, when the first application program is started, the started hardware server is determined by the virtual machine scheduling mechanism.
Optionally, in an embodiment of the present invention, when the first application program is deployed in the virtual machine, the first application program may establish a connection with a unified hardware interface on the operating system, and when the first application program is started, the first application program obtains the hardware server identification information of the first application program through the unified hardware interface module and the hardware monitoring module.
Specifically, the hardware monitoring module obtains hardware server identification information corresponding to the hardware layer through an interface provided by the operating system, then the hardware monitoring module sends the hardware server identification information to the unified hardware interface module, and then the first application program obtains the hardware server identification information through the unified hardware interface module.
The hardware monitoring module and the unified hardware interface module are connected through a socket, in the socket connection, the unified hardware interface module is a server, and meanwhile, the unified hardware interface module serves as the server to provide connection and interface for the application program to connect and call hardware server hardware information of the hardware server.
Optionally, in an embodiment of the present invention, the hardware server identification information includes at least one of:
the hardware server comprises a physical address of a physical network card of the hardware server, a CPU model of the hardware server, a basic input output system (BISO) of the hardware server, a mainboard Identification (ID) of the hardware server, a processor identification of the hardware server, a memory identification of the hardware server, a cache identification of the hardware server and a system identification of the hardware server.
In the embodiment of the present invention, for the first application, the application programs of the same service type may be configured with the inverse affinity to be deployed on different hardware servers, so the inverse affinity application of the first application program is selected through the service type identifier and the hardware server identifier information.
Optionally, in some embodiments of the present invention, the anti-affinity information may further include other identification information according to the actual application deployment requirement.
Specifically, in one embodiment of the present invention, the first application may obtain the anti-affinity information, such as the service type identifier of the first application, from the database during the startup phase.
Step S402, the first application program sends a reverse affinity detection message to a second application program in a network element where the first application program is located. The second application receives the anti-affinity probe message sent by the first application.
Wherein the anti-affinity probe message is used to probe whether the second application is an anti-affinity application of the first application, and the anti-affinity probe message includes the anti-affinity information.
It can be understood that, in the embodiment of the present invention, in order to deploy applications of the same service type on different hardware servers, the service type of the service carried by the anti-affinity application of the first application and the deployed hardware server may be determined to be the same as the second application. Such that when the anti-affinity application of the first application has been launched in the same network element, the first application is no longer deployed on the hardware server. For example, if the first application program and the second application program are two application programs deployed by a primary and a secondary, the application programs deployed by the primary and the secondary need to be deployed on different physical servers, so that the method can determine that the application programs deployed by the primary and the secondary are deployed on different physical hardware servers, and improve the reliability of the application.
Optionally, in an embodiment of the present invention, the anti-affinity probe message further includes an anti-affinity identifier, where the anti-affinity identifier is used to instruct the second application program to determine whether the second application program is an anti-affinity application program of the first application program.
It can be understood that, by carrying the anti-affinity identifier in the anti-affinity probe message, when the anti-affinity identifier indicates that the first application needs to perform anti-affinity determination, the first application determines whether the anti-affinity application of the first application is deployed on the hardware server.
Optionally, in another embodiment of the present invention, if the anti-affinity identifier indicates that the first application does not need to perform anti-affinity deployment, the first application does not perform anti-affinity determination any more, that is, does not determine whether the hardware server corresponding to the hardware server identifier information has the anti-affinity second application of the first application deployed thereon.
It can be understood that the first application program is instructed to perform the anti-affinity judgment or not to perform the anti-affinity judgment by carrying the anti-affinity identifier in the anti-affinity information, so that the application program deployment is more flexible.
Optionally, in an embodiment of the present invention, the first application may broadcast to all applications in the network element where the first application is located, and the broadcast message is the anti-affinity probe message. At this time, any one of the applications in the network element where the first application is located may be regarded as the second application.
Step S403, the second application determines whether the second application is the anti-affinity application of the first application according to the anti-affinity detection message.
The service type of the service carried by the anti-affinity application program of the first application program is the same as the service type of the service carried by the first application program, and the hardware server deployed by the anti-affinity application program of the first application program is the same as the hardware server deployed by the first application program.
Specifically, in an embodiment of the present invention, the service type identification information of the second application indicates a service type of a service carried by the second application, the service type identification information of the second application indicates that a service type carried by the first application is the same, the hardware server identification information of the second application indicates a hardware server deployed by the second application, and the hardware server identification information of the first application indicates that a hardware server deployed by the first application is the same, where the second application is an inverse affinity application of the first application.
Optionally, in an embodiment of the present invention, the anti-affinity probe message further includes an anti-affinity identifier, where the anti-affinity identifier is used to instruct the second application program to determine whether the second application program is an anti-affinity application program of the first application program;
the second application program, according to the anti-affinity detection message, determines whether the second application program is an anti-affinity application program of the first application program, specifically:
and when the anti-affinity detection message comprises the anti-affinity identifier, the second application program judges whether the second application program is the anti-affinity application program of the first application program according to the anti-affinity detection message.
It can be understood that, when it is required to indicate whether the second application performs the anti-affinity determination through an anti-affinity identifier, only when the anti-affinity probe message includes the anti-affinity identifier, the second application determines whether the second application is an anti-affinity application of the first application, so that the determination of the anti-affinity is more flexible.
Optionally, in an embodiment of the present invention, the determining, by the second application program according to the inverse affinity detection message, whether the second application program is an inverse affinity application program of the first application program includes:
the second application program judges whether the service type identification of the first application program and the service type identification information of the second application program have a unique mapping relation or not;
when the service type identification information of the first application program and the service type identification information of the second application program have a unique mapping relationship, the second application program judges whether the hardware server identification information of the second application program and the hardware server identification information of the first application program have the unique mapping relationship, so that when the hardware server identification information of the second application program and the hardware server identification information of the first application program have the unique mapping relationship, the second application program is determined to be the anti-affinity application program of the first application program.
The service type identification information of the first application program and the service type identification information of the second application program have a unique mapping relation, which means that the service type identification information of the first application program and the service type identification information of the second application program can be mapped to the same service type, namely, the same service type is indicated; the hardware server identification information of the second application program and the hardware server identification information of the first application program have a unique mapping relationship, which means that the hardware server identification information of the second application program and the hardware server identification information of the first application program can both be mapped to the same hardware server, that is, both are used for indicating the same hardware server.
It should be noted that, in an embodiment of the present invention, for the same type of service, the same service type identification information may be used for identification, and also different service type identification information may be used for identification, where the different service type identification information can be uniquely mapped to the same service type.
Optionally, in another embodiment of the present invention, when the service type identifier of the first application and the service type identifier of the second application do not have a unique mapping relationship, or when the hardware server identifier information of the first application and the hardware identifier information of the second application do not have a unique mapping relationship, or when the service type identifier and the hardware identifier information of the first application, and the service type identifier and the hardware server identifier information of the second application do not have a unique mapping relationship, it is determined that the second application is not an anti-affinity application of the first application.
It can be understood that, for different applications, only the application of the same service type needs to be disposed with inverse affinity, so that it needs to be determined whether the service type identification information of the second application and the service type identification information of the first application can be mapped to the same service type, and only when the service types borne by the first application and the second application are the same, it is further determined whether the hardware server identification information of the first application and the hardware server identification information of the second application can be mapped to the same hardware server. If the service type of the second application program is different from the service type of the first application program, the second application program is definitely not the anti-affinity application program of the first application program, so that the first application program can be normally started without further judgment. The efficiency of determination of the inverse affinity can be improved.
It should be noted that, when the first application program sends the anti-affinity detection message to all application programs deployed in the network element where the first application program is located, the second application program may be considered as any application program in the application programs in the network element where the first application program is located, that is, all application programs that receive the affinity detection message all execute the actions of the second application program.
Step S404, when the second application program determines that the second application program is the inverse affinity application program of the first application program, the second application program sends an inverse affinity detection feedback message to the first application program.
Optionally, when the anti-affinity detection feedback message indicates that the second application is the anti-affinity application of the first application, step S405 is executed, and the first application receives the anti-affinity detection feedback message returned by the second application and exits from starting.
For example, in an example of the present invention, if the first application program and the second application program are main and standby application programs that process the same service type, and at this time, if the first application program and the second application program are both deployed on the same hardware server, when the first application program is started, the second application program instructs the first application program to exit from the start, so as to ensure the operational reliability of the main and standby application programs.
Specifically, at this time, when the first application program receives the inverse affinity detection feedback message indicating that the inverse affinity application program of the first application program exists, the first application program reports the alarm information to the user and quits the starting.
Optionally, in another embodiment of the present invention, when the second application determines that the second application is not an anti-affinity application of the first application, the anti-affinity probe feedback message will indicate that the second application is not an anti-affinity application of the first application.
Optionally, in an embodiment of the present invention, when the first application receives the anti-affinity detection feedback messages of all applications in the network element where the first application is located, and the anti-affinity detection feedback messages returned by all applications indicate that the application is not the anti-affinity application of the first application, that is, the anti-affinity application of the first application does not exist in the network element where the first application is located, so that step S406 is executed, and the first application is normally started.
Optionally, in an embodiment of the present invention, the first application starts a timer when sending the anti-affinity detection message to the second application, for example, 3 seconds, and when the first application receives the anti-affinity detection feedback message of the second application within the time determined by the timer, determines whether the first application is normally started according to the anti-affinity detection feedback message; and when the first application program does not receive the anti-affinity detection feedback messages of all the application programs within the time determined by the timer, ignoring the anti-affinity detection feedback messages sent by the application programs which are not received, and only processing the received anti-affinity detection feedback messages returned by the application programs.
It can be seen that, in the solution of this embodiment, when the first application is started, the first application determines whether the anti-affinity application of the first application exists in the network element by sending an anti-affinity detection message to another application in the network element where the first application is located, and then quits starting when the anti-affinity application of the first application exists in the network element where the first application is located, so as to improve the reliability of the application.
Referring to fig. 5, fig. 5 is a functional unit block diagram of a first application 500 according to an embodiment of the present invention, which is applied to a network function virtualization system, where the network function virtualization system includes a first application and a second application. As shown in fig. 5, the first application 500 includes an obtaining module 510, a sending module 520, and a receiving module 530. Wherein:
an obtaining module 510, configured to obtain, when the first application 500 is started, anti-affinity information of the first application 500, where the anti-affinity information includes hardware server identification information of the first application 500 and service type identification information of the first application 500, the hardware server identification information is used to identify a hardware server deployed by the first application 500, and the service type identification information is used to identify a service type of a service carried by the first application 500;
a sending module 520, configured to send an anti-affinity detection message to a second application in a network element where the first application 500 is located, where the anti-affinity detection message is used to detect whether the second application is an anti-affinity application of the first application 500, the anti-affinity detection message includes the anti-affinity information, a service type of a service carried by the anti-affinity application of the first application 500 is the same as a service type of a service carried by the first application 500, and a hardware server deployed by the anti-affinity application of the first application 500 is the same as a hardware server deployed by the first application 500;
a receiving module 530, configured to receive, by the first application 500, an inverse affinity detection feedback message returned by the second application and quit starting, where the inverse affinity detection feedback message indicates that the second application is an inverse affinity application of the first application 500.
Optionally, in an embodiment of the present invention, the anti-affinity probe message further includes an anti-affinity identifier, where the anti-affinity identifier is used to instruct the second application program to determine whether the second application program is an anti-affinity application program of the first application program 500.
Optionally, in an embodiment of the present invention, the network function virtualization system further includes a hardware layer, a Hypervisor (Hypervisor) layer, and an Operating System (OS) layer, the Hypervisor layer is deployed with a hardware monitoring (HWM) module, the operating system layer is deployed with a Unified Hardware Interface (UHI) module, the first application 500 is in communication with the operating system layer, the operating system layer is in communication with the Hypervisor layer, the Hypervisor layer is in communication with the hardware layer, and the hardware layer includes the hardware server;
the obtaining module 510 is specifically configured to:
the hardware server identification information of the first application 500 is obtained through the unified hardware interface module and the hardware monitoring module.
It can be seen that in the solution of this embodiment, when the first application 500 is started, the first application 500 determines whether the anti-affinity application of the first application 500 exists in the network element by sending an anti-affinity probe message to other applications in the network element where the first application 500 is located, and then exits from starting when the anti-affinity application of the first application 500 exists in the network element where the first application 500 is located, so as to improve the reliability of the application.
It should be noted that the virtual network function processing apparatus described in the embodiment of the present invention is presented in the form of a functional unit. The term "unit" as used herein is to be understood in its broadest possible sense, and objects used to implement the functions described by the respective "unit" may be, for example, an integrated circuit ASIC, a single circuit, a processor (shared, dedicated, or chipset) and memory that execute one or more software or firmware programs, a combinational logic circuit, and/or other suitable components that provide the described functionality.
For example, it can be considered by those skilled in the art that the first application 500 may specifically be the first application entity apparatus shown in fig. 6.
Referring to fig. 6, fig. 6 is a schematic structural diagram of another first application 600 according to an embodiment of the present invention, which is applied to a network function virtualization system, where the network function virtualization system includes a first application and a second application. As shown in the figure, the first application 600 provided by the embodiment of the present invention includes a processor 601, a memory 602, a receiver 603, a transmitter 604, and a bus 605, and the processor 601, the memory 602, the receiver 603, and the transmitter 604 are connected by the bus 604 and perform communication with each other.
The processor 601 is configured to call the executable program code in the memory 602, and perform the following operations:
when the first application 600 is started, acquiring anti-affinity information of the first application 600, where the anti-affinity information includes hardware server identification information of the first application 600 and service type identification information of the first application 600, the hardware server identification information is used to identify a hardware server deployed by the first application 600, and the service type identification information is used to identify a service type of a service carried by the first application 600;
sending, by a sender 604, an anti-affinity probe message to a second application in a network element where the first application 600 is located, where the anti-affinity probe message is used to probe whether the second application is an anti-affinity application of the first application 600, the anti-affinity probe message includes the anti-affinity information, a service type of a service carried by the anti-affinity application of the first application 600 is the same as a service type of a service carried by the first application 600, and a hardware server deployed by the anti-affinity application of the first application 600 is the same as a hardware server deployed by the first application 600;
receiving, by the receiver 603, an anti-affinity detection feedback message returned by the second application, and exiting from the starting, where the anti-affinity detection feedback message indicates that the second application is an anti-affinity application of the first application 600.
Optionally, in an embodiment of the present invention, the anti-affinity probe message further includes an anti-affinity identifier, where the anti-affinity identifier is used to instruct the second application program to determine whether the second application program is an anti-affinity application program of the first application program 600.
Optionally, in an embodiment of the present invention, the network function virtualization system further includes a hardware layer, a Hypervisor (Hypervisor) layer, and an Operating System (OS) layer, the Hypervisor layer is deployed with a hardware monitoring (HWM) module, the operating system layer is deployed with a Unified Hardware Interface (UHI) module, the first application 600 communicates with the operating system layer, the operating system layer communicates with the Hypervisor layer, the Hypervisor layer communicates with the hardware layer, and the hardware layer includes the hardware server;
the processor 601 obtains the hardware server identification information of the first application 600, specifically:
the hardware server identification information of the first application 600 is obtained through the unified hardware interface module and the hardware monitoring module.
It can be seen that in the solution of this embodiment, when the first application 600 is started, the first application 600 determines whether the anti-affinity application of the first application 600 exists in the network element by sending an anti-affinity probe message to other applications in the network element where the first application 600 is located, and then exits from starting when the anti-affinity application of the first application 600 exists in the network element where the first application 600 is located, so as to improve the application reliability.
It should be noted that the processor 601 may be a single processor or may be a general term for multiple processing elements. For example, the processor may be a Central Processing Unit (CPU), an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to implement embodiments of the present invention, such as: one or more microprocessors (digital signal processors, DSPs), or one or more Field Programmable Gate Arrays (FPGAs).
The memory 602 may be a storage device or a combination of storage elements, and is used for storing executable program codes or parameters, data, etc. required by the operation of the access network management device. And the memory 502 may include a Random Access Memory (RAM) or a non-volatile memory (non-volatile memory), such as a magnetic disk memory, a Flash memory (Flash), and the like.
The bus 605 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (EISA) bus, or the like. The bus 505 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 6, but this is not intended to represent only one bus or type of bus.
In the foregoing embodiment shown in fig. 5, the functions of the units may be implemented based on the structure of the first application program shown in fig. 6. In the foregoing embodiment shown in fig. 4, the method flow of the steps may be implemented based on the first application program shown in fig. 6.
Referring to fig. 7, fig. 7 is a functional unit block diagram of a second application 700 according to an embodiment of the present invention, which is applied to a network function virtualization system, where the network function virtualization system includes a first application and a second application. As shown in fig. 7, the second application 700 includes a receiving module 710, a determining module 720 and a sending module 730. Wherein:
a receiving module 710, configured to receive an inverse affinity detection message sent by the first application, where the inverse affinity detection message is used to detect whether a second application 700 in a network element where the first application is located is an inverse affinity application of the first application, the inverse affinity detection message includes hardware server identification information of the first application and service type identification information of the first application, the hardware server identification information is used to identify a hardware server deployed by the first application, and the service type identification information is used to identify a service type of a service carried by the first application;
a determining module 720, configured to determine, according to the anti-affinity detection message, whether the second application 700 is an anti-affinity application of the first application, where a service type of a service carried by the anti-affinity application of the first application is the same as a service type of a service carried by the first application, and a hardware server deployed by the anti-affinity application of the first application is the same as a hardware server deployed by the first application;
a sending module 730, configured to send a reverse affinity detection feedback message to the first application program when the second application program 700 determines that the second application program 700 is a reverse affinity application program of the first application program, where the reverse affinity detection feedback message indicates that the second application program 700 is a reverse affinity application program of the first application program.
Optionally, in an embodiment of the present invention, the determining module 720 is specifically configured to:
the second application 700 determines whether the service type identifier of the first application and the service type identifier of the second application 700 have a unique mapping relationship;
when the service type identification information of the first application program and the service type identification information of the second application program 700 have a unique mapping relationship, determining whether the hardware server identification information of the second application program 700 and the hardware server identification information of the first application program have a unique mapping relationship, so as to determine that the second application program 700 is an anti-affinity application program of the first application program when the hardware server identification information of the second application program 700 and the hardware server identification information of the first application program have a unique mapping relationship.
Optionally, in an embodiment of the present invention, the anti-affinity probe message further includes an anti-affinity identifier, where the anti-affinity identifier is used to instruct the second application 700 to determine whether the second application 700 is an anti-affinity application of the first application;
the determining module 720 is specifically configured to determine whether the second application 700 is the anti-affinity application of the first application according to the anti-affinity probe message when the anti-affinity probe message includes the anti-affinity identifier.
It can be seen that, in the solution of this embodiment, when the second application 700 receives the anti-affinity detection message of the first application, it is determined whether the second application 700 is the anti-affinity application of the first application, so as to instruct the first application to quit the startup when the second application 700 is the anti-affinity application of the first application, so as to improve the application reliability.
It should be noted that the virtual network function processing apparatus described in the embodiment of the present invention is presented in the form of a functional unit. The term "unit" as used herein is to be understood in its broadest possible sense, and objects used to implement the functions described by the respective "unit" may be, for example, an integrated circuit ASIC, a single circuit, a processor (shared, dedicated, or chipset) and memory that execute one or more software or firmware programs, a combinational logic circuit, and/or other suitable components that provide the described functionality.
For example, those skilled in the art may consider the second application to be specifically the first application entity apparatus shown in fig. 8.
Referring to fig. 8, fig. 8 is a schematic structural diagram of another second application 800 according to an embodiment of the present invention, which is applied to a network function virtualization system, where the network function virtualization system includes a first application and a second application. As shown in the figure, the second application 800 provided by the embodiment of the present invention includes a processor 801, a memory 802, a receiver 803, a transmitter 804 and a bus 805, and the processor 801, the memory 802, the receiver 803 and the transmitter 804 are connected through the bus 804 and perform communication with each other.
The processor 801 is configured to call the executable program code in the memory 802, and perform the following operations:
receiving, by a receiver 803, an anti-affinity detection message sent by the first application, where the anti-affinity detection message is used to detect whether a second application in a network element where the first application is located is an anti-affinity application of the first application, the anti-affinity detection message includes hardware server identification information of the first application and service type identification information of the first application, the hardware server identification information is used to identify a hardware server deployed by the first application, and the service type identification information is used to identify a service type of a service carried by the first application;
judging whether the second application program is the anti-affinity application program of the first application program according to the anti-affinity detection message, wherein the service type of the service borne by the anti-affinity application program of the first application program is the same as that of the service borne by the first application program, and a hardware server deployed by the anti-affinity application program of the first application program is the same as that deployed by the first application program;
when the second application program determines that the second application program is the anti-affinity application program of the first application program, sending an anti-affinity detection feedback message to the first application program through a sender 804, wherein the anti-affinity detection feedback message indicates that the second application program is the anti-affinity application program of the first application program.
Optionally, in an embodiment of the present invention, the processor 801 determines, according to the anti-affinity probe message, whether the second application is an anti-affinity application of the first application, specifically:
judging whether the service type identification information of the first application program and the service type identification information of the second application program have a unique mapping relation or not;
when the service type identification information of the first application program and the service type identification information of the second application program have a unique mapping relation, judging whether the hardware server identification information of the second application program and the hardware server identification information of the first application program have the unique mapping relation or not, and determining that the second application program is the anti-affinity application program of the first application program when the hardware server identification information of the second application program and the hardware server identification information of the first application program have the unique mapping relation.
Optionally, in an embodiment of the present invention, the anti-affinity probe message further includes an anti-affinity identifier, where the anti-affinity identifier is used to instruct the second application program to determine whether the second application program is an anti-affinity application program of the first application program;
the processor 801 determines, according to the anti-affinity detection message, whether the second application program is an anti-affinity application program of the first application program, specifically:
and when the anti-affinity detection message comprises the anti-affinity identification, judging whether the second application program is the anti-affinity application program of the first application program according to the anti-affinity detection message.
It can be seen that, in the solution of this embodiment, when the second application 800 receives the anti-affinity detection message of the first application, it is determined whether the second application 800 is the anti-affinity application of the first application, so as to instruct the first application to quit the startup when the second application 800 is the anti-affinity application of the first application, so as to improve the reliability of the application.
It should be noted that the processor 801 may be a single processor or may be a general term for a plurality of processing elements. For example, the processor may be a Central Processing Unit (CPU), an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to implement embodiments of the present invention, such as: one or more microprocessors (digital signal processors, DSPs), or one or more Field Programmable Gate Arrays (FPGAs).
The memory 802 may be a storage device or a combination of storage elements, and is used for storing executable program codes or parameters, data, etc. required by the operation of the access network management device. And the memory 502 may include a Random Access Memory (RAM) or a non-volatile memory (non-volatile memory), such as a magnetic disk memory, a Flash memory (Flash), and the like.
The bus 805 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (EISA) bus, or the like. The bus 505 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 8, but this is not intended to represent only one bus or type of bus.
In the foregoing embodiment shown in fig. 7, the functions of the units may be implemented based on the structure of the second application shown in fig. 8. In the foregoing embodiment shown in fig. 4, the method flow of the steps may be implemented based on the second application program shown in fig. 8.
An embodiment of the present invention further provides a computer storage medium, where the computer storage medium may store a program, and the program includes, when executed, some or all of the steps of any of the application affinity determination methods described in the above method embodiments.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implementing, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (13)

1. An application affinity determination method is applied to a Network Function Virtualization (NFV) system, the NFV system comprises a first application program (APP) and a second application program, and the method comprises the following steps:
when the first application program is started, the first application program acquires inverse affinity information of the first application program, wherein the inverse affinity information comprises hardware server identification information of the first application program and service type identification information of the first application program, the hardware server identification information is used for identifying a hardware server deployed by the first application program, and the service type identification information is used for identifying the service type of a service borne by the first application program;
the first application program sends a reverse affinity detection message to a second application program in a network element where the first application program is located, the reverse affinity detection message is used for detecting whether the second application program is a reverse affinity application program of the first application program, the reverse affinity detection message comprises the reverse affinity information, the service type of the service carried by the reverse affinity application program of the first application program is the same as the service type of the service carried by the first application program, and a hardware server deployed by the reverse affinity application program of the first application program is the same as the hardware server deployed by the first application program;
and the first application program receives an inverse affinity detection feedback message returned by the second application program and quits starting, wherein the inverse affinity detection feedback message indicates that the second application program is the inverse affinity application program of the first application program.
2. The method of claim 1, wherein the anti-affinity probe message further comprises an anti-affinity tag, and wherein the anti-affinity tag is used to instruct the second application to determine whether the second application is an anti-affinity application of the first application.
3. The method of claim 1 or 2, wherein the network function virtualization system further comprises a hardware layer, a hypervisor layer, and an Operating System (OS) layer, wherein the hypervisor layer is deployed with a hardware monitoring (HWM) module, wherein the operating system layer is deployed with a Unified Hardware Interface (UHI) module, wherein the first application is in communication with the operating system layer, wherein the operating system layer is in communication with the hypervisor layer, wherein the hypervisor layer is in communication with the hardware layer, and wherein the hardware layer comprises the hardware server;
the method for acquiring the hardware server identification information of the first application program by the first application program comprises the following steps:
and the first application program acquires the hardware server identification information of the first application program through the unified hardware interface module and the hardware monitoring module.
4. A virtualized application configuration method applied to a network function virtualization, NFV, system, the network function virtualization system comprising a first application APP and a second application, the method comprising:
the second application program receives an inverse affinity detection message sent by the first application program, where the inverse affinity detection message is used to detect whether a second application program in a network element where the first application program is located is an inverse affinity application program of the first application program, the inverse affinity detection message includes hardware server identification information of the first application program and service type identification information of the first application program, the hardware server identification information is used to identify a hardware server deployed by the first application program, and the service type identification information is used to identify a service type of a service carried by the first application program;
the second application program judges whether the second application program is the inverse affinity application program of the first application program according to the inverse affinity detection message, the service type of the service borne by the inverse affinity application program of the first application program is the same as the service type of the service borne by the first application program, and a hardware server deployed by the inverse affinity application program of the first application program is the same as a hardware server deployed by the first application program;
when the second application program determines that the second application program is the anti-affinity application program of the first application program, the second application program sends an anti-affinity detection feedback message to the first application program, wherein the anti-affinity detection feedback message indicates that the second application program is the anti-affinity application program of the first application program.
5. The method according to claim 4, wherein the second application determines whether the second application is the anti-affinity application of the first application according to the anti-affinity probe message, specifically:
the second application program judges whether the service type identification information of the first application program and the service type identification information of the second application program have a unique mapping relation or not;
when the service type identification information of the first application program and the service type identification information of the second application program have a unique mapping relationship, the second application program judges whether the hardware server identification information of the second application program and the hardware server identification information of the first application program have the unique mapping relationship, so that when the hardware server identification information of the second application program and the hardware server identification information of the first application program have the unique mapping relationship, the second application program is determined to be the anti-affinity application program of the first application program.
6. The method according to claim 4 or 5, wherein the anti-affinity probe message further comprises an anti-affinity identifier, and the anti-affinity identifier is used to instruct the second application to determine whether the second application is an anti-affinity application of the first application;
the second application program, according to the anti-affinity detection message, determines whether the second application program is an anti-affinity application program of the first application program, specifically:
and when the anti-affinity detection message comprises the anti-affinity identifier, the second application program judges whether the second application program is the anti-affinity application program of the first application program according to the anti-affinity detection message.
7. A first application APP, applied to a network function virtualization, NFV, system, said network function virtualization system comprising a first application and a second application, said first application comprising:
an obtaining module, configured to obtain, when the first application program is started, anti-affinity information of the first application program, where the anti-affinity information includes hardware server identification information of the first application program and service type identification information of the first application program, the hardware server identification information is used to identify a hardware server deployed by the first application program, and the service type identification information is used to identify a service type of a service carried by the first application program;
a sending module, configured to send a reverse affinity detection message to a second application in a network element where the first application is located, where the reverse affinity detection message is used to detect whether the second application is a reverse affinity application of the first application, the reverse affinity detection message includes the reverse affinity information, a service type of a service carried by the reverse affinity application of the first application is the same as a service type of a service carried by the first application, and a hardware server deployed by the reverse affinity application of the first application is the same as a hardware server deployed by the first application;
and the receiving module is used for receiving the inverse affinity detection feedback message returned by the second application program by the first application program and quitting starting, wherein the inverse affinity detection feedback message indicates that the second application program is the inverse affinity application program of the first application program.
8. The first application of claim 7, wherein the anti-affinity probe message further comprises an anti-affinity identifier, and wherein the anti-affinity identifier is used to instruct the second application to determine whether the second application is an anti-affinity application of the first application.
9. The first application of claim 7 or 8, wherein the network function virtualization system further comprises a hardware layer, a hypervisor layer, and an Operating System (OS) layer, wherein the hypervisor layer is deployed with a hardware monitoring (HWM) module, wherein the operating system layer is deployed with a Unified Hardware Interface (UHI) module, wherein the first application is in communication with the operating system layer, wherein the operating system layer is in communication with the hypervisor layer, wherein the hypervisor layer is in communication with the hardware layer, and wherein the hardware layer comprises the hardware server;
the acquisition module is specifically configured to:
and acquiring the hardware server identification information of the first application program through the unified hardware interface module and the hardware monitoring module.
10. A second application APP, for application in a network function virtualization, NFV, system, said network function virtualization system comprising a first application APP and a second application, said second application comprising:
a receiving module, configured to receive an inverse affinity detection message sent by the first application, where the inverse affinity detection message is used to detect whether a second application in a network element where the first application is located is an inverse affinity application of the first application, the inverse affinity detection message includes hardware server identification information of the first application and service type identification information of the first application, the hardware server identification information is used to identify a hardware server deployed by the first application, and the service type identification information is used to identify a service type of a service carried by the first application;
a determining module, configured to determine, according to the anti-affinity detection message, whether the second application is an anti-affinity application of the first application, where a service type of a service carried by the anti-affinity application of the first application is the same as a service type of a service carried by the first application, and a hardware server deployed by the anti-affinity application of the first application is the same as a hardware server deployed by the first application;
a sending module, configured to send an inverse affinity detection feedback message to the first application program when the second application program determines that the second application program is an inverse affinity application program of the first application program, where the inverse affinity detection feedback message indicates that the second application program is an inverse affinity application program of the first application program.
11. The second application program of claim 10, wherein the determining module is specifically configured to:
the second application program judges whether the service type identification information of the first application program and the service type identification information of the second application program have a unique mapping relation or not;
when the service type identification information of the first application program and the service type identification information of the second application program have a unique mapping relation, judging whether the hardware server identification information of the second application program and the hardware server identification information of the first application program have the unique mapping relation or not, and determining that the second application program is the anti-affinity application program of the first application program when the hardware server identification information of the second application program and the hardware server identification information of the first application program have the unique mapping relation.
12. The second application program according to claim 10 or 11, wherein the anti-affinity probe message further comprises an anti-affinity identifier, and the anti-affinity identifier is used to instruct the second application program to determine whether the second application program is an anti-affinity application program of the first application program;
the determining module is specifically configured to determine whether the second application is the anti-affinity application of the first application according to the anti-affinity detection message when the anti-affinity detection message includes the anti-affinity identifier.
13. A computer-readable storage medium, characterized in that it stores a computer program which, when executed by a computer device, is capable of implementing the method of any one of claims 1 to 6.
CN201611258347.1A 2016-12-30 2016-12-30 Application program affinity judgment method and related application program Active CN108268367B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611258347.1A CN108268367B (en) 2016-12-30 2016-12-30 Application program affinity judgment method and related application program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611258347.1A CN108268367B (en) 2016-12-30 2016-12-30 Application program affinity judgment method and related application program

Publications (2)

Publication Number Publication Date
CN108268367A CN108268367A (en) 2018-07-10
CN108268367B true CN108268367B (en) 2021-05-04

Family

ID=62754851

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611258347.1A Active CN108268367B (en) 2016-12-30 2016-12-30 Application program affinity judgment method and related application program

Country Status (1)

Country Link
CN (1) CN108268367B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103778017A (en) * 2012-10-19 2014-05-07 国际商业机器公司 Affinity of virtual processor dispatching
CN104137482A (en) * 2014-04-14 2014-11-05 华为技术有限公司 Disaster recovery data center configuration method and device under cloud computing framework
CN105656646A (en) * 2014-11-10 2016-06-08 中国移动通信集团公司 Deploying method and device for virtual network element
CN106161173A (en) * 2015-04-15 2016-11-23 中兴通讯股份有限公司 A kind of virtual network function that realizes disposes the method and device of specification configuration

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8255508B2 (en) * 2010-03-24 2012-08-28 International Business Machines Corporation Administration of virtual machine affinity in a data center

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103778017A (en) * 2012-10-19 2014-05-07 国际商业机器公司 Affinity of virtual processor dispatching
CN104137482A (en) * 2014-04-14 2014-11-05 华为技术有限公司 Disaster recovery data center configuration method and device under cloud computing framework
CN105656646A (en) * 2014-11-10 2016-06-08 中国移动通信集团公司 Deploying method and device for virtual network element
CN106161173A (en) * 2015-04-15 2016-11-23 中兴通讯股份有限公司 A kind of virtual network function that realizes disposes the method and device of specification configuration

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
网络功能虚拟化中的网络转发性能优化技术研究;唐宏等;《电信科学》;20141120;第30卷(第11期);第135-139、172页 *

Also Published As

Publication number Publication date
CN108268367A (en) 2018-07-10

Similar Documents

Publication Publication Date Title
US8910172B2 (en) Application resource switchover systems and methods
US11003553B2 (en) Method and apparatus for failover processing
US10097620B2 (en) Methods and apparatus to provision a workload in a virtual server rack deployment
US8332496B2 (en) Provisioning of operating environments on a server in a networked environment
US9348646B1 (en) Reboot-initiated virtual machine instance migration
EP3291499A1 (en) Method and apparatus for network service capacity expansion
CN110661647A (en) Life cycle management method and device
CN112486629B (en) Micro-service state detection method, micro-service state detection device, electronic equipment and storage medium
US10817378B2 (en) Managing boot failures in an information handling system
CN109491889B (en) Method and device for automatic test in NFV
CN111669284A (en) OpenStack automatic deployment method, electronic device, storage medium and system
US8990608B1 (en) Failover of applications between isolated user space instances on a single instance of an operating system
CN112269694B (en) Management node determining method and device, electronic equipment and readable storage medium
US9183092B1 (en) Avoidance of dependency issues in network-based service startup workflows
US9596157B2 (en) Server restart management via stability time
CN107145399B (en) Shared memory management method and shared memory management equipment
CN112732412B (en) Service configuration file processing method and device, storage medium and electronic equipment
CN107360015B (en) Method and device for switching shared storage
CN112698979A (en) Method and device for processing zookeeper double nodes, storage medium and processor
CN108268367B (en) Application program affinity judgment method and related application program
CN110688130A (en) Physical machine deployment method, physical machine deployment device, readable storage medium and electronic equipment
CN112527446A (en) Time zone synchronization method, equipment and terminal equipment
US9934113B2 (en) Enhanced console assisted recovery for a coordinated timing network
US9405605B1 (en) Correction of dependency issues in network-based service remedial workflows
CN110752950A (en) Update detection method and device for cloud resource pool and terminal equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant