CN116136797A - Service migration method, device, equipment, computer storage medium and program - Google Patents

Service migration method, device, equipment, computer storage medium and program Download PDF

Info

Publication number
CN116136797A
CN116136797A CN202310127082.5A CN202310127082A CN116136797A CN 116136797 A CN116136797 A CN 116136797A CN 202310127082 A CN202310127082 A CN 202310127082A CN 116136797 A CN116136797 A CN 116136797A
Authority
CN
China
Prior art keywords
target
host
server
resource pool
migration
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.)
Pending
Application number
CN202310127082.5A
Other languages
Chinese (zh)
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.)
China Mobile Communications Group Co Ltd
China Mobile Information Technology Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Information Technology 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 China Mobile Communications Group Co Ltd, China Mobile Information Technology Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202310127082.5A priority Critical patent/CN116136797A/en
Publication of CN116136797A publication Critical patent/CN116136797A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system
    • G06F9/5088Techniques for rebalancing the load in a distributed system involving task migration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5072Grid computing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/101Server selection for load balancing based on network conditions
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Hardware Redundancy (AREA)

Abstract

The application discloses a service migration method, a device, equipment, a computer storage medium and a program, which can determine a resource pool requirement and a host machine requirement corresponding to a target server to be migrated, select a target resource pool meeting the resource pool requirement from a plurality of resource pools by using a filtering method, select a target host machine meeting the host machine requirement from a plurality of host machines of the target resource pool, and migrate the target server to the target host machine. According to the embodiment of the application, the target resource pool and the target host meeting the migration requirement of the target server can be automatically selected based on the resource pool requirement and the host requirement, and compared with manual analysis, the method is lower in difficulty and higher in efficiency, and the time consumed by service migration can be effectively reduced.

Description

Service migration method, device, equipment, computer storage medium and program
Technical Field
The application belongs to the technical field of cloud computing, and particularly relates to a service migration method, device, equipment, a computer storage medium and a program.
Background
With the development of digitization and cloud computing, more and more businesses select to migrate to the cloud so as to improve the expansibility, high availability and economy of the businesses. The traditional migration tool mostly completes data transmission in a background script mode, or only carries out online migration, so that visual display of migration is facilitated, but the fundamental problem of business is not solved.
The conventional migration mode is that before migration, a resource manager, service personnel, operation and maintenance personnel and the like are subjected to scheme discussion and review according to migration requirements, and the migration destination is roughly judged according to multiparty experience. However, when the service migration is implemented in this way, if the destination resource environment changes, it is not enough to carry the migration task, a great amount of time is required to adjust the scheme, and the method mainly relies on manual analysis and processing, so that the migration is too long in time and low in efficiency.
Disclosure of Invention
The embodiment of the application provides a service migration method, a device, equipment, a computer storage medium and a program, which can automatically determine a target resource pool and a target host according to the resource pool requirement and the host requirement corresponding to a server to be migrated, and compared with manual analysis, the service migration method, the device, the equipment, the computer storage medium and the program have the advantages of less time consumption and higher efficiency.
In a first aspect, an embodiment of the present application provides a service migration method, including:
determining a resource pool requirement and a host machine requirement corresponding to a target server to be migrated in the service;
screening out target resource pools meeting the resource pool requirements from a plurality of resource pools by utilizing a filtering method;
Screening target hosts meeting the requirements of the hosts from a plurality of hosts in the target resource pool by utilizing a boxing algorithm;
and migrating the target server to the target host.
As one possible implementation manner, filtering the target resource pool meeting the resource pool requirement from the plurality of resource pools includes:
the resource pool requirements comprise technical stack type requirements and starting type requirements of the resource pool, and the resource pool which meets the technical stack type requirements and the starting type requirements is screened out from a plurality of resource pools and is used as a first resource pool;
in response to the number of first resource pools being one, taking the first resource pools as target resource pools;
and determining a target resource pool from the plurality of first resource pools by using the optimal path algorithm in response to the number of first resource pools being a plurality.
As one possible implementation, determining the target resource pool from the plurality of first resource pools using the optimal path algorithm includes:
determining weights between the target server and other servers in the service;
determining network delay between the first resource pool and other servers for each first resource pool;
according to the weight between the target server and other servers and the network time delay between the first resource pool and other servers, determining the network time delay corresponding to the first resource pool;
And taking the first resource pool with the minimum network delay as a target resource pool.
As one possible implementation manner, the screening, by using a boxing algorithm, the target host meeting the requirements of the hosts from the multiple hosts in the target resource pool includes:
under the condition that other servers and the target server do not synchronously migrate to the target resource pool, screening host machines with residual memory capacity meeting the specification requirements of the target server from a plurality of host machines in the target resource pool, and establishing a first mapping relation between the target server and the host machines meeting the specification requirements of the target server;
responding to the number of hosts with a first mapping relation with the target server as one, and taking the host with the first mapping relation with the target server as a target host;
and responding to the fact that the number of the host machines with the first mapping relation with the target server is a plurality of host machines, and selecting one host machine from the host machines with the first mapping relation with the target server as the target host machine.
As one possible implementation manner, the screening, by using a boxing algorithm, the target host meeting the requirements of the hosts from the multiple hosts in the target resource pool includes:
Under the condition that other servers and a target server synchronously migrate to a target resource pool, screening a host machine with residual memory capacity meeting the specification requirement of the server from a plurality of host machines in the target resource pool aiming at each server to be migrated, and establishing a first mapping relation between the server and the host machine meeting the specification requirement of the server;
respectively determining the total specification requirements corresponding to each alternative host machine, wherein the alternative host machines are host machines with a first mapping relation, and the total specification requirements are the sum of the specification requirements of all servers with the first mapping relation with the alternative host machines;
determining the number of hosts with a first mapping relation with the target server in response to the residual capacity of all the candidate hosts meeting the corresponding total specification requirements;
responding to the number of hosts with a first mapping relation with the target server as one, and taking the host with the first mapping relation with the target server as a target host;
and responding to the fact that the number of the host machines with the first mapping relation with the target server is a plurality of host machines, and selecting one host machine from the host machines with the first mapping relation with the target server as the target host machine.
As a possible implementation manner, the method for screening the target host meeting the requirements of the host from the plurality of hosts in the target resource pool by using a boxing algorithm further includes:
determining a server which has a first mapping relation with only one host machine in other servers and the target server as a first server in response to the fact that the residual capacity of any alternative host machine does not meet the corresponding total specification requirement;
establishing a second mapping relation between the first server and a host machine with a first mapping relation, and releasing the first mapping relation corresponding to the first server;
updating the residual capacity of the host computer with the second mapping relation with the first server to be the capacity after subtracting the specification requirement of the first server;
after the residual capacity of the host is updated, determining a maximum server corresponding to each alternative host, wherein the maximum server corresponding to the alternative host is the server with the maximum specification requirement of the first mapping relation with the alternative host;
determining all the alternative hosts with a first mapping relation with the maximum server, wherein the host with the residual capacity meeting the specification requirement of the maximum server is used as the first host;
Selecting one host machine from the first host machines as a second host machine, establishing a second mapping relation between the maximum server and the second host machine, releasing the first mapping relation corresponding to the maximum server, and updating the residual capacity of the second host machine to be the capacity after subtracting the specification requirement of the maximum server;
after a second mapping relation between the target server and the host is established, the host with the second mapping relation with the target server is taken as the target host.
As one possible implementation, migrating the target server to the target host includes:
determining a corresponding migration scene according to the type of the target server, wherein the type is a physical machine or a virtual machine;
determining a target migration template of a migration template corresponding to a migration scene from preset migration templates, wherein the migration template comprises a migration step, a migration execution script or a command;
and migrating the target server to the target host by using the target migration template.
In a second aspect, an embodiment of the present application further provides a service migration apparatus, including:
the migration requirement determining module is used for determining a resource pool requirement and a host requirement corresponding to a target server to be migrated in the service;
The target resource pool determining module is used for screening target resource pools meeting the resource pool requirements from the plurality of resource pools by utilizing a filtering method;
the target host determining module is used for screening target hosts meeting the requirements of the hosts from a plurality of hosts in the target resource pool by utilizing a boxing algorithm;
and the migration module is used for migrating the target server to the target host.
In a third aspect, an embodiment of the present application further provides an electronic device, including: a processor and a memory storing computer program instructions;
the processor, when executing the computer program instructions, implements the service migration method as in the first aspect.
In a fourth aspect, embodiments of the present application further provide a computer readable storage medium, where computer program instructions are stored, which when executed by a processor implement a service migration method as in the first aspect.
In a fifth aspect, embodiments of the present application also provide a computer program product, where instructions in the computer program product, when executed by a processor of an electronic device, cause the electronic device to perform the service migration method as in the first aspect.
According to the service migration method, device, equipment, computer storage medium and program, the resource pool requirements and the host machine requirements corresponding to the target server to be migrated can be determined, the target resource pool meeting the resource pool requirements is selected from a plurality of resource pools by using a filtering method, the target host machine meeting the host machine requirements is selected from a plurality of host machines of the target resource pool, and the target server is migrated to the target host machine. According to the embodiment of the application, the target resource pool and the target host meeting the migration requirement of the target server can be automatically selected based on the resource pool requirement and the host requirement, and compared with manual analysis, the method is lower in difficulty and higher in efficiency, and the time consumed by service migration can be effectively reduced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments of the present application will be briefly described, and it is possible for a person skilled in the art to obtain other drawings according to these drawings without inventive effort.
Fig. 1 is a schematic flow chart of a service migration method provided in an embodiment of the present application;
FIG. 2 is a schematic diagram of optimal path addressing according to an embodiment of the present application;
FIG. 3 is a schematic diagram of an implementation of S13 provided in one embodiment of the present application;
FIG. 4 is a schematic diagram of an implementation of S13 provided in another embodiment of the present application;
FIG. 5 is a schematic diagram of an implementation of S13 provided in accordance with yet another embodiment of the present application;
FIG. 6 is a schematic diagram of a server reorganization analysis provided in an embodiment of the present application;
fig. 7 is a schematic diagram of migration execution in a P2V migration scenario provided in an embodiment of the present application;
FIG. 8 is a schematic flow chart of a migration tool according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a service migration device provided in an embodiment of the present application;
fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Features and exemplary embodiments of various aspects of the present application are described in detail below to make the objects, technical solutions and advantages of the present application more apparent, and to further describe the present application in conjunction with the accompanying drawings and the detailed embodiments. It should be understood that the specific embodiments described herein are intended to be illustrative of the application and are not intended to be limiting. It will be apparent to one skilled in the art that the present application may be practiced without some of these specific details. The following description of the embodiments is merely intended to provide a better understanding of the present application by showing examples of the present application.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
With the development of digitization and cloud computing, more and more businesses select to migrate to the cloud so as to improve the expansibility, high availability and economy of the businesses. However, in actual service migration, it is often not known how to perform migration, where to migrate, and how to migrate, and it is not possible to perceive a specific migration effect.
The conventional migration tool for service migration mostly completes data transmission in the form of background scripts or simply visualizes the migrated process on line, so as to facilitate visual display of migration, but not solve the fundamental problem of service.
The existing service migration scheme is only displayed on line, and manual intervention is still more in the processing process, so that the following problems mainly exist:
migration purposes are difficult to determine: before migration, only a resource manager, service personnel, operation and maintenance personnel and the like can carry out scheme discussion and review according to migration requirements, and the migration position is roughly judged according to multiparty experience. If the migration is implemented, the environment of the destination resource changes, which is insufficient to carry the migration task, and a great amount of time is required for adjusting the scheme.
The manual intervention in the migration process is as follows: because of lack of a curing scene, uncontrollable factors in the migration process are more, and in order to ensure smooth implementation of migration, a large amount of manual analysis and treatment are needed after problems are encountered, the migration process is long in time and low in efficiency.
The migration effect is difficult to embody: the traditional migration cannot realize the whole-process digitization of migration, cannot construct panoramic display, and is unfavorable for the embodiment of migration effect and the sedimentation and treatment of migration problem.
In view of this, the embodiment of the application provides a novel service migration method, which is based on route analysis, and searches for an optimal path for migration based on factors such as specification of resources, association of a resource pool, service attribute and influence of service topology on network delay, and the like, by combining a filtering method and an optimal path method and combining weight analysis. And selecting different migration scheduling templates according to different migration scenes, and gradually completing calculation power migration scheduling step by step in a workflow form, thereby solving the difficult problems that the migration process is not known and how to migrate is not known.
Referring to fig. 1, a flow chart of a service migration method provided in an embodiment of the present application, as shown in fig. 1, the service migration method provided in the embodiment may include the following steps:
s11, determining a resource pool requirement and a host machine requirement corresponding to a target server to be migrated in the service;
s12, screening out target resource pools meeting the resource pool requirements from a plurality of resource pools by utilizing a filtering method;
s13, screening target host machines meeting the requirements of the host machines from a plurality of host machines in the target resource pool by utilizing a boxing algorithm;
S14, migrating the target server to the target host.
Wherein, the service generally comprises one or more servers, and the target server refers to any server needing to be migrated in the service.
According to the service migration method, the resource pool requirements and the host machine requirements corresponding to the target server to be migrated are determined, the target resource pool meeting the resource pool requirements is selected from a plurality of resource pools by using a filtering method, the target host machine meeting the host machine requirements is selected from a plurality of host machines in the target resource pool, and the target server is migrated to the target host machine. According to the embodiment of the application, the target resource pool and the target host meeting the migration requirement of the target server can be automatically selected based on the resource pool requirement and the host requirement, and compared with manual analysis, the method is lower in difficulty and higher in efficiency, and the time consumed by service migration can be effectively reduced.
In some embodiments, in S11, the requirements of the target server on the resource pool start type, the resource pool technology stack type, the host specification, the host type, and/or the network delay may be analyzed according to the specification attribute and the service attribute of the target server, the analyzed requirements on the resource pool start type and/or the technology stack type are used as the resource pool requirements, the analyzed requirements on the host specification and/or the host type are used as the host requirements, and the analyzed requirements on the network delay are used as the network delay requirements.
The specification attribute and the service attribute of the target server can be directly obtained from the attribute information of the target server, and after the specification attribute and the service attribute of the target server are obtained, the specification attribute and the service attribute can be subjected to parameter disassembly, so that the requirements of the target server on a resource pool starting type, a resource pool technical stack type, a host machine specification, a host machine type, network delay and the like are identified.
After determining the migration requirement corresponding to the target server, the target resource pool to which the target server is to be migrated may be screened out from the multiple resource pools through S12.
In some embodiments, a specific implementation of S12 may include:
the resource pool requirements comprise technical stack type requirements and starting type requirements of the resource pool, and the resource pool which meets the technical stack type requirements and the starting type requirements is screened out from a plurality of resource pools and is used as a first resource pool;
in response to the number of first resource pools being one, taking the first resource pools as target resource pools;
and determining a target resource pool from the plurality of first resource pools by using the optimal path algorithm in response to the number of first resource pools being a plurality.
The target server has mandatory limiting requirements on the technical stack type, the starting type and the like of the resource pool, if the technical stack or the starting type does not meet the uniqueness requirement, the migration is not supported sufficiently, and therefore the conforming resource pool, namely the first resource pool, needs to be screened according to the two factors through uniqueness screening and filtering.
One or more first resource pools may be screened through screening, if only one first resource pool is screened, the first resource pool is directly used as a target resource pool, and if a plurality of first resource pools are screened, an optimal path method can be used, and an optimal target resource pool is calculated according to parameters such as weight of network delay and distribution of the resource pools.
In some embodiments, the specific implementation manner of determining the target resource pool from the plurality of first resource pools by using the optimal path algorithm may include the following steps:
determining weights between the target server and other servers in the service;
determining network delay between the first resource pool and other servers for each first resource pool;
according to the weight between the target server and other servers and the network time delay between the first resource pool and other servers, determining the network time delay corresponding to the first resource pool;
and taking the first resource pool with the minimum network delay as a target resource pool.
One service typically includes a plurality of servers, and the other servers in the service refer to servers in the service other than the target server. Aiming at the non-mandatory requirements of network delay and the like of the service, the weights between a target server and other servers can be configured according to actual requirements, an optimal path method is adopted according to the weights and a pod (resource pool) network delay matrix, the network delay is arranged in a reverse order from low to high, and a plurality of groups of selectable results are output.
Referring to fig. 2, for an optimal path addressing schematic, taking a group of services having three servers VM1, VM2 and VM3 as examples, the weight between VM1 and VM2 is t1, the weight between VM1 and VM3 is t2, the weight between VM2 and VM3 is t3, and in the case that the VM3 needs to be migrated, that is, the VM3 is regarded as a target server, it is determined by filtering analysis that three resource pools POD1, POD2 and POD3 can carry the migration of the VM3, that is, the POD1, POD2 and POD3 are all first resource pools, in order to select an optimal target resource pool from the three first resource pools, the network delay from each first resource pool to VM1 and VM2 needs to be determined, and the network delay from the first resource pool to VM1 and VM2 is equal to the network delay from the VM3 to VM1 and VM2 after the VM3 is migrated to the first resource pool. For each first resource pool, after obtaining the network delays from the first resource pool to VM1 and VM2, multiplying each network delay by a corresponding weight, namely multiplying the network delay from the first resource pool to VM1 by t2 to obtain a first product, multiplying the network delay from the first resource pool to VM2 by t3 to obtain a second product, and taking the sum of the first product and the second product as the network delay corresponding to the first resource pool. After obtaining the network time delay of the three first resource pools, arranging the three first resource pools in a reverse order from low to high according to the network time delay, and taking the first resource pool with the lowest corresponding network time delay as a target resource pool. For example, if the network delay corresponding to the POD2 is the lowest through analysis, the POD2 is taken as a target resource pool, and the target server is migrated to the POD2, namely the optimal path for migration.
By the method, the optimal path for migration can be explored by combining the comprehensive filtering method and the optimal path method from factors such as the specification of the target server, the association of the resource pool, the influence of the attribute of the service and the service topology on the network delay, and the like, and the target server is migrated according to the optimal path, so that the network delay between the migrated target server and other servers can be ensured to meet the network delay requirement, and the problem of overlarge network delay is avoided.
A resource pool may comprise a plurality of hosts, and the target server is typically migrated to one host when migrating, so that after determining the target resource pool, it may further be determined, through S13, that the target server is to be migrated to the target host finally.
The boxing algorithm is an algorithm for solving the boxing problem, the boxing problem is a complex discrete combination optimization problem, and the boxing algorithm is mainly used for determining an optimal boxing scheme.
When a target server is migrated, it can be generally divided into two cases, one is that when the target server is migrated to a target resource pool, no other server that is migrated to the target resource pool synchronously with the target server exists, and the other is that when the target server is migrated to the target resource pool, there is another server that is migrated to the target resource pool synchronously with the target server. For both cases S13, the target host corresponding to the target server may be determined in different manners.
In some embodiments, in the case that there is no synchronous migration of other servers and the target server to the target resource pool, as shown in fig. 3, the specific implementation of S13 may include the following steps:
s31, screening out host machines with residual memory capacity meeting the specification requirement of the target server from a plurality of host machines in the target resource pool, and establishing a first mapping relation between the target server and the host machines meeting the specification requirement of the target server;
s32, responding to the fact that the number of hosts with the first mapping relation with the target server is one, and taking the host with the first mapping relation with the target server as a target host;
s33, responding to the fact that the number of the host machines with the first mapping relation with the target server is multiple, and selecting one host machine from the host machines with the first mapping relation with the target server as a target host machine.
The host machines with the residual memory capacity meeting the specification requirements of the target server are screened from the host machines, so that the residual capacity of the target host machine which is finally determined is enough for the target server to use, and the problem of migration failure caused by insufficient residual capacity of the target host machine is avoided.
As an example, a specific implementation of S33 may include:
and respectively determining the allocation rate corresponding to each host machine with the first mapping relation with the target server, wherein the allocation rate refers to the ratio of the capacity allocated by the host machine to the total capacity of the host machines, and selecting the host machine with the minimum allocation rate from a plurality of host machines with the first mapping relation with the target server as the target host machine.
The allocation rate of the host, that is, the memory occupancy rate of the host, generally the memory occupancy rate of the host affects the running speed of the host, the higher the memory occupancy rate is, the slower the running speed is, the lower the memory occupancy rate is, the faster the running speed is, based on this, the host with the lowest allocation rate is selected as the target host, so that the running speed after the migration of the target server can be ensured.
Because when a plurality of servers synchronously migrate to the same resource pool, there may be a situation that some hosts are marked by a plurality of servers to be migrated due to residual capacity reorganization and the like, that is, a situation that a first mapping relation exists between the servers, in order to uniformly select the hosts, a potential overload risk caused by overlarge bearing resources of a single host is avoided, and capacity adjustment can be realized through reorganization analysis under the condition that a plurality of servers synchronously migrate to a target resource pool.
In some embodiments, in the case that there is a synchronous migration of other servers and the target server to the target resource pool, as shown in fig. 4, the specific implementation of S13 may include the following steps:
s41, screening out hosts with residual memory capacity meeting the specification requirements of the servers from a plurality of hosts in a target resource pool aiming at each server to be migrated, and establishing a first mapping relation between the servers and the hosts meeting the specification requirements of the servers;
s42, respectively determining the total specification requirements corresponding to each alternative host machine, wherein the alternative host machines are host machines with a first mapping relation, and the total specification requirements are the sum of the specification requirements of all servers with the alternative host machines with the first mapping relation;
s43, determining the number of hosts with a first mapping relation with the target server in response to the residual capacity of all the candidate hosts meeting the corresponding total specification requirement;
s44, responding to the fact that the number of hosts with the first mapping relation with the target server is one, and taking the host with the first mapping relation with the target server as a target host;
s45, responding to the fact that the number of the host machines with the first mapping relation with the target server is multiple, and selecting one host machine from the host machines with the first mapping relation with the target server as a target host machine.
The implementation of S45 may be the same as S33, and will not be described herein.
The fact that the residual capacities of all the candidate hosts meet the corresponding total specification requirements can indicate that the hosts cannot be overloaded when the servers migrate synchronously, so that in order to simplify the flow and improve the service migration efficiency, capacity adjustment is not needed at this time, and the target host can be determined directly according to the host with the first mapping relation with the target server.
In some embodiments, in the case that there is a synchronous migration of other servers and the target server to the target resource pool, as shown in fig. 5, the following steps may be further included after S42:
s51, determining a server which has a first mapping relation with only one host machine in other servers and the target server as a first server in response to the fact that the residual capacity of any alternative host machine does not meet the corresponding total specification requirement;
s52, establishing a second mapping relation between the first server and a host machine with a first mapping relation, and releasing the first mapping relation corresponding to the first server;
s53, updating the residual capacity of the host computer with the second mapping relation with the first server to the capacity after subtracting the specification requirement of the first server;
S54, after the residual capacity of the host is updated, determining a maximum server corresponding to each alternative host, wherein the maximum server corresponding to the alternative host is the server with the maximum specification requirement of the first mapping relation with the alternative host;
s55, determining a host machine with residual capacity meeting the specification requirement of the maximum server as a first host machine in all host machines with a first mapping relation with the maximum server;
s56, selecting one host machine from the first host machines as a second host machine, establishing a second mapping relation between the maximum server and the second host machine, removing the first mapping relation corresponding to the maximum server, and updating the residual capacity of the second host machine to be the capacity after subtracting the specification requirement of the maximum server;
s57, after the second mapping relation between the target server and the host is established, the host with the second mapping relation with the target server is used as the target host.
When the residual capacity of any alternative host does not meet the corresponding total specification requirement, it is indicated that overload caused by overlarge bearing resources of a single host may occur when a plurality of servers perform synchronous migration, that is, overload risk exists, so that in order to avoid overload, capacity adjustment is needed through recombination analysis.
When the reorganization analysis is performed, the first server with the first mapping relation with only one host machine in the other servers and the target server is determined through the S51, because only one host machine with the first mapping relation with only one host machine exists, the fact that only one host machine can meet the specification requirement of the server is indicated, namely, the server can only migrate to the host machine, otherwise, migration failure is caused, because in order to avoid server migration failure, the first server is found out first, and the second remapping between the first server and the host machine with the first mapping relation is established through the S52, namely, the second mapping relation is established, and the host machine with the second mapping relation with the first server is the host machine to which the first server is migrated, namely, the host machine to which the first server is to migrate is determined first through the method, so that host machine selection is not needed for the first server in the subsequent steps. The first mapping relationship corresponding to the first server is released in S52, so as to avoid that the host is repeatedly allocated to the first server in the following steps.
After determining the host to which the first server is to be migrated, the remaining capacity of the host may be updated through S53, so as to determine whether other servers may be accommodated in the host according to the updated remaining capacity.
When the reorganization analysis is performed, the largest server corresponding to the candidate host is determined in S54, because the specification of the largest server is the largest, that is, the more capacity is needed, host allocation is preferentially performed on the servers, so that it can be ensured that the host meeting the specification requirements can be determined finally, the server can complete migration, and if host allocation is performed on the servers later, the host cannot meet the specification requirements due to previous allocation, so that the migration of the server fails.
Since the host allocation has been completed in S52 for the first server having the first mapping relation with only one host, the maximum server determined in S54 has the first mapping relation with at least two hosts in the target resource pool, and therefore, for each maximum server determined in S54, it is necessary to screen out all hosts having the first mapping relation with it through S55 and S56, which are finally used for migration.
In S55, a host machine whose residual capacity meets the specification requirement of the maximum server is determined from all host machines having a first mapping relation with the maximum server as a first host machine, then one host machine is selected from the first host machines as a second host machine through S56, and a second mapping relation between the maximum server and the second host machine is established, where the second host machine is the host machine to which the maximum server is to be migrated.
As an example, a specific implementation of S56 may include:
and determining the corresponding distribution rate of each first host, wherein the distribution rate refers to the ratio of the capacity already distributed by the host to the total capacity of the hosts, and taking the first host with the smallest corresponding distribution rate as the second host.
By selecting the second host in this way, the running speed of the server after migration can be ensured.
After the second host corresponding to the maximum server is determined, the first mapping relation corresponding to the maximum server is released, so that the purpose of avoiding the subsequent repeated allocation of the host to the maximum server is achieved.
The remaining capacity of the second host is updated to a capacity less the specification requirement of the maximum server, so as to facilitate determining whether other servers can be accommodated in the host according to the updated remaining capacity.
Because it may not be possible to determine the hosts to which all the servers to be migrated are to be migrated at a time through S51-S56, if S56 is completed, S51 may be returned to be repeated until the second mapping relationship between all the servers to be migrated and the hosts is established.
As can be seen from the above, the host having the second mapping relation with the server is the host to which the server is to be migrated, and based on this, the host having the second mapping relation with the target server may be the target host in S57.
Through the mode, the improved boxing algorithm is used for carrying out recombination analysis on the hosts corresponding to the plurality of servers to be migrated to realize capacity adjustment, so that overload risks caused by overlarge bearing resources of a single host can be effectively avoided.
Referring to fig. 6, a schematic diagram of server reorganization analysis is provided in the embodiment of the present application, which takes migration of 11 servers VM1-VM11 to 5 hosts host1-host5 as an example, where the residual capacity of each host and the specification of each server are different, in the figure, the hatched portion in host hostx represents the used capacity, and the size of server VMx represents the server specification size. In migration analysis, for each server, the server is marked on a host machine conforming to the specification size of the server, and a first mapping relation between the host machine and the server is established based on the server. As shown in fig. 6, VM1, VM2, VM3, and VM5 are marked on host1, indicating that the remaining capacity of host1 satisfies the respective specification sizes of VM1, VM2, VM3, and VM5, VM4 and VM2 are marked on host2, indicating that the remaining capacity of host2 satisfies the respective specification sizes of VM4 and VM2, VM6, VM9, VM10, and VM11, indicating that the remaining capacity of host3 satisfies the respective specification sizes of VM2, VM5, VM6, VM9, VM10, and VM11, indicating that the remaining capacity of host4 satisfies the respective specification sizes of VM2 and VM5, indicating that the remaining capacity of host5 satisfies the respective sizes of VM5, VM6, VM7, and VM8, and indicating that the remaining capacity of host5 satisfies the respective sizes of VM5, VM6, VM7, and VM 8. After the migration marking is completed, there may be some virtual machines marked by the host machine with total specifications exceeding the residual capacity of the current host machine, and capacity adjustment is needed at this time, so as to reorganize the server and equalize the bearing capacity of the host machine as much as possible. When the reorganization is performed, it is determined that only the server marked on one host machine, namely the first server, as shown in fig. 6, VM1 and VM3 are marked on host1, VM4 is marked on host2, VM7 and VM8 are marked on host5, VM9, VM10 and VM11 are marked on host3, so that VM1, VM3, VM4, VM7, VM8, VM9, VM10 and VM11 are all the first servers, a second mapping relation between the first server and the marked host machine is established, the residual capacity of the host machine is reduced according to the marked first server, then host machine allocation is performed on the residual servers according to the steps of S54-S56, a second mapping relation between each server and the corresponding host machine is established, after determining the second mapping relation corresponding to all the servers, the reorganization analysis is determined, the host machines with the second mapping relation with the servers are used as the servers, and after the migration to the host machines with the second mapping relation are determined, the residual capacity is reduced according to the marked host machines, namely the overload risk is not reduced, and the residual capacity is not analyzed.
After determining the target host corresponding to the target server, the target server may be migrated to the target host through S14.
In some embodiments, a specific implementation of S14 may include:
determining a corresponding migration scene according to the type of the target server, wherein the type is a physical machine or a virtual machine;
determining a target migration template of a migration template corresponding to a migration scene from preset migration templates, wherein the migration template comprises a migration step, a migration execution script or a command;
and migrating the target server to the target host by using the target migration template.
Currently, according to the type of the server to be migrated, migration scenarios can be divided into two types of scenarios, namely P2V (Physical to virtual, physical machine to virtual machine) and V2V (Virtual to virtual, virtual machine to virtual machine) supporting migration to OpenStack, where OpenStack is an open-source cloud computing management platform item, and is a combination of a series of software open-source items. OpenStack provides scalable and resilient cloud computing services for private and public clouds. The project aims to provide a cloud computing management platform which is simple to implement, can be expanded in a large scale, is rich and has unified standards. Therefore, if the type of the server to be migrated is a physical machine, the corresponding migration scene is P2V, and if the type of the server to be migrated is a virtual machine, the corresponding migration scene is V2V, and according to the type of the server to be migrated, the corresponding migration scene can be determined according to the attribute information of the server to be migrated, so that the server to be migrated can be automatically determined according to the attribute information of the server to be migrated.
The migration template corresponding to the migration scene is established in advance, and the migration template can be generated by arranging and integrating contents such as migration steps, migration execution scripts or commands and the like and packaging the contents in one template. The migration step supports different steps according to different settings of scenes, and each step can encapsulate corresponding execution commands, call interfaces or scripts.
Taking a migration template corresponding to a P2V migration scene as an example, the migration template may include the following 9 migration steps:
step 1: and verifying network connectivity of the target server to be migrated and the transit virtual machine through a ping command.
Step 2: and (5) inputting a user name password to verify the remote login of the target server, and verifying whether the target server can perform the remote login or not through ssh.
Step 3: and (3) collecting and editing the starting mode, and confirming whether the starting mode is UEFI or Legacy by inquiring the target server/sys/firmware/efi so as to accurately match the resource pool type subsequently.
Step 4: and creating a bootable volume, starting the volume by the target virtual machine, and calling an interface to create the starting volume of the target virtual machine, wherein the target virtual machine is the virtual machine corresponding to the migration of the target server to the target host.
Step 5: and creating a transfer virtual machine, mounting a volume, creating a P2V migration transfer virtual machine, calling a virtual machine creation interface of a target resource pool, creating the transfer virtual machine, and calling the interface to mount the volume to the transfer virtual machine.
Step 6: and acquiring the bare metal storage volume, copying the disk of the bare metal server to the starting volume, and copying the disk of the target server to the starting volume through a command.
Step 7: unloading the volume from the transfer machine, and calling the script to unload the volume mounted by the transfer machine.
Step 8: and creating a virtual machine through the volume, starting the volume to create the virtual machine by using the copied P2V, calling an interface, and creating a target virtual machine through starting the volume in a target resource pool.
Step 9: and verifying the starting state of the target virtual machine, and checking the power state of the target virtual machine and whether the target virtual machine can be started normally through the interface and the login command.
The steps 1-3 are mainly used for checking before migration to determine whether migration conditions are met, and migration is performed again under the condition that the migration conditions are met, so that smooth migration can be ensured.
The steps 4 to 8 are specific migration processes, and the whole migration process can be mainly divided into mirror image making, mirror image transmission and mirror image starting virtual machine using, wherein the steps 4 and 5 are used for mirror image making, the steps 6 and 7 are used for mirror image transmission, and the step 8 is used for starting the virtual machine using the mirror image.
Step 9 is mainly used for verifying whether the virtual machine is started or not, and checking the migration completion state.
According to the method, different migration templates are selected according to different migration scenes, processing logic such as migration steps and environment inspection, network inspection and resource verification is solidified in one workflow through the migration templates, and when migration is carried out, server migration is completed step by step in a workflow mode according to the migration templates, so that the problem that how to migrate is solved.
Referring to fig. 7, a schematic diagram of execution of migration in a P2V migration scenario provided in this embodiment of the present application is shown in fig. 7, when service migration is required to be performed to a cloud management platform, a cloud migration request is initiated to the cloud management platform, after the cloud management platform receives the cloud migration request, the service can be migrated according to the service migration method provided in this embodiment of the present application, when the cloud management platform performs service migration, taking a target server to be migrated as a virtual machine, firstly, a create backup request is sent to a resource pool POD1 where the service is currently located, so as to perform environmental inspection and backup based on the create backup request, which mainly includes analyzing requirements on a resource pool start type, a host specification, a host type and a network delay according to the specification and the service attribute of the target server, determining a target resource pool according to the analyzed requirements by a filtering method and an optimal path algorithm, selecting a target host from the target resource pool by an improved packaging method, after determining a target mirror image host, transferring a file in a public management domain resource pool, uploading the file to the target mirror pool POD2, and pulling up a target virtual machine in the target mirror domain resource pool, that is also used as a target host, thereby completing target migration for the target virtual machine in the target virtual machine.
Referring to fig. 8, a schematic flow chart of a migration tool provided in an embodiment of the present application may be used to implement the service migration method provided in the embodiment of the present application. As shown in fig. 8, the migration tool may include a migration center route analysis module 801 and a migration center migration schedule template 802.
The migration center route analysis module 801 mainly includes a parameter disassembly unit, a filtering analysis unit, and an optimal path analysis unit. The parameter disassembling unit is mainly used for identifying configuration attributes, specification characteristics and network delay requirements of services of the target servers to be migrated, the filtering analysis unit and the optimal path analysis unit are mainly used for analyzing calculation migration matching conditions by combining calculation capacity scale and distribution rate of the current nano-tube pod, and performing adaptive selection on the target servers according to the network delay matrix analysis optimal path strategy among the pods, and finally outputting recommended migration optimal paths, namely determining a target resource pool and a target host.
The migration center migration scheduling template 802 mainly comprises a migration template and a migration task scheduling unit. Processing logic such as migration steps, environment inspection, network inspection, resource verification and the like is solidified in one workflow through a migration template. The migration task scheduling unit associates a migration template, associates a target server to be migrated, and executes a migration task according to the migration steps in the migration template corresponding to the migration scene of the target server according to the information of the target resource pool and the target host confirmed by the migration center route analysis module 801, so as to support manual migration and reservation migration, and support migration progress display and visual display of a migration process.
For migration of batch servers, multithreading execution is started in one task, threads are relatively independent, and the execution efficiency and the safety of migration are improved.
Based on the service migration method provided by the embodiment, correspondingly, the application also provides a specific implementation mode of the service migration device. Please refer to the following examples.
Referring to fig. 9, the service migration apparatus provided in the embodiment of the present application includes the following modules:
the migration requirement determining module 901 is configured to determine a resource pool requirement and a host requirement corresponding to a target server to be migrated in a service;
a target resource pool determining module 902, configured to screen a target resource pool that meets the resource pool requirement from multiple resource pools by using a filtering method;
the target host determining module 903 is configured to screen, by using a boxing algorithm, a target host that meets the requirements of the hosts from multiple hosts in the target resource pool;
and the migration module 904 is configured to migrate the target server to the target host.
According to the service migration device, the resource pool requirements and the host machine requirements corresponding to the target server to be migrated can be determined, the target resource pool meeting the resource pool requirements is selected from a plurality of resource pools by utilizing a filtering method, the target host machine meeting the host machine requirements is selected from a plurality of host machines of the target resource pool, and the target server is migrated to the target host machine. According to the embodiment of the application, the target resource pool and the target host meeting the migration requirement of the target server can be automatically selected based on the resource pool requirement and the host requirement, and compared with manual analysis, the method is lower in difficulty and higher in efficiency, and the time consumed by service migration can be effectively reduced.
In some embodiments, the target resource pool determination module 902 comprises:
the filtering analysis unit is used for screening the resource pool meeting the technical stack type requirement and the starting type requirement from a plurality of resource pools as a first resource pool, wherein the resource pool requirement comprises the technical stack type requirement and the starting type requirement of the resource pool;
a first determining unit configured to set the first resource pool as a target resource pool in response to the number of the first resource pools being one;
and the optimal path analysis unit is used for determining a target resource pool from the plurality of first resource pools by utilizing an optimal path algorithm in response to the number of the first resource pools being a plurality of.
In some embodiments, the optimal path analysis unit is specifically configured to:
determining weights between the target server and other servers in the service;
determining network delay between the first resource pool and other servers for each first resource pool;
according to the weight between the target server and other servers and the network time delay between the first resource pool and other servers, determining the network time delay corresponding to the first resource pool;
and taking the first resource pool with the minimum network delay as a target resource pool.
In some embodiments, the target host determination module 903 is specifically configured to:
under the condition that other servers and the target server do not synchronously migrate to the target resource pool, screening host machines with residual memory capacity meeting the specification requirements of the target server from a plurality of host machines in the target resource pool, and establishing a first mapping relation between the target server and the host machines meeting the specification requirements of the target server;
responding to the number of hosts with a first mapping relation with the target server as one, and taking the host with the first mapping relation with the target server as a target host;
and responding to the fact that the number of the host machines with the first mapping relation with the target server is a plurality of host machines, and selecting one host machine from the host machines with the first mapping relation with the target server as the target host machine.
In some embodiments, the target host determination module 903 is specifically configured to:
under the condition that other servers and a target server synchronously migrate to a target resource pool, screening a host machine with residual memory capacity meeting the specification requirement of the server from a plurality of host machines in the target resource pool aiming at each server to be migrated, and establishing a first mapping relation between the server and the host machine meeting the specification requirement of the server;
Respectively determining the total specification requirements corresponding to each alternative host machine, wherein the alternative host machines are host machines with a first mapping relation, and the total specification requirements are the sum of the specification requirements of all servers with the first mapping relation with the alternative host machines;
determining the number of hosts with a first mapping relation with the target server in response to the residual capacity of all the candidate hosts meeting the corresponding total specification requirements;
responding to the number of hosts with a first mapping relation with the target server as one, and taking the host with the first mapping relation with the target server as a target host;
and responding to the fact that the number of the host machines with the first mapping relation with the target server is a plurality of host machines, and selecting one host machine from the host machines with the first mapping relation with the target server as the target host machine.
In some embodiments, the target host determination module 903 is specifically further configured to:
determining a server which has a first mapping relation with only one host machine in other servers and the target server as a first server in response to the fact that the residual capacity of any alternative host machine does not meet the corresponding total specification requirement;
Establishing a second mapping relation between the first server and a host machine with a first mapping relation, and releasing the first mapping relation corresponding to the first server;
updating the residual capacity of the host computer with the second mapping relation with the first server to be the capacity after subtracting the specification requirement of the first server;
after the residual capacity of the host is updated, determining a maximum server corresponding to each alternative host, wherein the maximum server corresponding to the alternative host is the server with the maximum specification requirement of the first mapping relation with the alternative host;
determining all the alternative hosts with a first mapping relation with the maximum server, wherein the host with the residual capacity meeting the specification requirement of the maximum server is used as the first host;
selecting one host machine from the first host machines as a second host machine, establishing a second mapping relation between the maximum server and the second host machine, releasing the first mapping relation corresponding to the maximum server, and updating the residual capacity of the second host machine to be the capacity after subtracting the specification requirement of the maximum server;
after a second mapping relation between the target server and the host is established, the host with the second mapping relation with the target server is taken as the target host.
In some embodiments, the migration module 904 is specifically configured to:
determining a corresponding migration scene according to the type of the target server, wherein the type is a physical machine or a virtual machine;
determining a target migration template of a migration template corresponding to a migration scene from preset migration templates, wherein the migration template comprises a migration step, a migration execution script or a command;
and migrating the target server to the target host by using the target migration template.
The service migration device provided in the embodiment of the present application can implement each process implemented by the embodiment of the service migration method, and in order to avoid repetition, details are not repeated here.
Fig. 10 shows a schematic hardware structure of an electronic device according to an embodiment of the present application.
The electronic device may include a processor 1001 and a memory 1002 storing computer program instructions.
In particular, the processor 1001 described above may include a Central Processing Unit (CPU), or an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), or may be configured to implement one or more integrated circuits of embodiments of the present application.
Memory 1002 may include mass storage for data or instructions. By way of example, and not limitation, memory 1002 may include a Hard Disk Drive (HDD), floppy Disk Drive, flash memory, optical Disk, magneto-optical Disk, magnetic tape, or universal serial bus (Universal Serial Bus, USB) Drive, or a combination of two or more of the foregoing. The memory 1002 may include removable or non-removable (or fixed) media, where appropriate. Memory 1002 may be internal or external to the integrated gateway disaster recovery device, where appropriate. In a particular embodiment, the memory 1002 is a non-volatile solid state memory. Memory 1002 may include Read Only Memory (ROM), random Access Memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical, or other physical/tangible memory storage devices. Thus, in general, memory 1002 includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software comprising computer-executable instructions and which, when executed (e.g., by one or more processors), perform the operations described by any of the traffic migration methods of the embodiments described above.
The processor 1001 implements any of the service migration methods of the above embodiments by reading and executing computer program instructions stored in the memory 1002.
In one example, the electronic device may also include a communication interface 1003 and a bus 1010. As shown in fig. 10, the processor 1001, the memory 1002, and the communication interface 1003 are connected to each other by a bus 1010, and perform communication with each other.
The communication interface 1003 is mainly used for implementing communication among the modules, devices, units and/or apparatuses in the embodiments of the present application.
Bus 1010 includes hardware, software, or both, coupling components of the online data flow billing device to each other. By way of example, and not limitation, the buses may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an infiniband interconnect, a Low Pin Count (LPC) bus, a memory bus, a micro channel architecture (MCa) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a video electronics standards association local (VLB) bus, or other suitable bus, or a combination of two or more of the above. Bus 1010 may include one or more buses, where appropriate. Although embodiments of the present application describe and illustrate a particular bus, the present application contemplates any suitable bus or interconnect.
In addition, in combination with the service migration method in the above embodiment, the embodiment of the application may be implemented by providing a computer storage medium. The computer storage medium has stored thereon computer program instructions; the computer program instructions, when executed by a processor, implement any of the service migration methods of the above embodiments.
It should be clear that the present application is not limited to the particular arrangements and processes described above and illustrated in the drawings. For the sake of brevity, a detailed description of known methods is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method processes of the present application are not limited to the specific steps described and illustrated, and those skilled in the art can make various changes, modifications, and additions, or change the order between steps, after appreciating the spirit of the present application.
The functional blocks shown in the above-described structural block diagrams may be implemented in hardware, software, firmware, or a combination thereof. When implemented in hardware, it may be, for example, an electronic circuit, an Application Specific Integrated Circuit (ASIC), suitable firmware, a plug-in, a function card, or the like. When implemented in software, the elements of the present application are the programs or code segments used to perform the required tasks. The program or code segments may be stored in a machine readable medium or transmitted over transmission media or communication links by a data signal carried in a carrier wave. A "machine-readable medium" may include any medium that can store or transfer information. Examples of machine-readable media include electronic circuitry, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio Frequency (RF) links, and the like. The code segments may be downloaded via computer networks such as the internet, intranets, etc.
It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, the present application is not limited to the order of the above-described steps, that is, the steps may be performed in the order mentioned in the embodiments, may be different from the order in the embodiments, or several steps may be performed simultaneously.
Aspects of the present disclosure are described above with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions/acts specified in the flowchart and/or block diagram block or blocks. Such a processor may be, but is not limited to being, a general purpose processor, a special purpose processor, an application specific processor, or a field programmable logic circuit. It will also be understood that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware which performs the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In the foregoing, only the specific embodiments of the present application are described, and it will be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the systems, modules and units described above may refer to the corresponding processes in the foregoing method embodiments, which are not repeated herein. It should be understood that the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the present application, which are intended to be included in the scope of the present application.

Claims (11)

1. A method for migrating traffic, comprising:
determining a resource pool requirement and a host machine requirement corresponding to a target server to be migrated in the service;
screening out a target resource pool meeting the resource pool requirement from a plurality of resource pools by utilizing a filtering method;
screening target host machines meeting the requirements of the host machines from a plurality of host machines in the target resource pool by utilizing a boxing algorithm;
and migrating the target server to the target host.
2. The method of claim 1, wherein the filtering the target resource pool from the plurality of resource pools to meet the resource pool requirement comprises:
The resource pool requirements comprise technical stack type requirements and starting type requirements of the resource pool, and the resource pool which accords with the technical stack type requirements and the starting type requirements is screened out from a plurality of resource pools and is used as a first resource pool;
in response to the number of the first resource pools being one, taking the first resource pools as target resource pools;
and determining a target resource pool from the plurality of first resource pools by using an optimal path algorithm in response to the number of the first resource pools being a plurality.
3. The method of claim 2, wherein said determining a target resource pool from a plurality of said first resource pools using an optimal path algorithm comprises:
determining weights between the target server and other servers in the service;
determining network delay between the first resource pool and the other servers for each first resource pool;
determining the network delay corresponding to the first resource pool according to the weight between the target server and the other servers and the network delay between the first resource pool and the other servers;
and taking the first resource pool with the minimum network delay as a target resource pool.
4. The method of claim 1, wherein the screening the target hosts from the plurality of hosts in the target resource pool using a boxing algorithm to meet the requirements of the hosts comprises:
under the condition that other servers and the target server synchronously migrate to the target resource pool, screening out host machines with residual memory capacity meeting the specification requirement of the target server from a plurality of host machines in the target resource pool, and establishing a first mapping relation between the target server and the host machines meeting the specification requirement of the target server;
responding to the number of hosts with a first mapping relation with the target server as one, and taking the host with the first mapping relation with the target server as a target host;
and responding to the fact that the number of the host machines with the first mapping relation with the target server is a plurality of host machines, and selecting one host machine from the host machines with the first mapping relation with the target server as a target host machine.
5. The method of claim 1, wherein the screening the target hosts from the plurality of hosts in the target resource pool using a boxing algorithm to meet the requirements of the hosts comprises:
Under the condition that other servers and the target server synchronously migrate to the target resource pool, screening out hosts with residual memory capacity meeting the specification requirements of the servers from a plurality of hosts in the target resource pool aiming at each server to be migrated, and establishing a first mapping relation between the servers and the hosts meeting the specification requirements of the servers;
respectively determining the total specification requirements corresponding to each alternative host machine, wherein the alternative host machines are host machines with a first mapping relation, and the total specification requirements are the sum of the specification requirements of all servers with the first mapping relation with the alternative host machines;
determining the number of hosts with a first mapping relation with the target server in response to the residual capacities of all the candidate hosts meeting the corresponding total specification requirements;
responding to the number of hosts with a first mapping relation with the target server as one, and taking the host with the first mapping relation with the target server as a target host;
and responding to the fact that the number of the host machines with the first mapping relation with the target server is a plurality of host machines, and selecting one host machine from the host machines with the first mapping relation with the target server as a target host machine.
6. The method of claim 5, wherein the screening the target hosts from the plurality of hosts in the target resource pool using a boxing algorithm, the target hosts meeting the requirements of the hosts, further comprises:
determining a server which has a first mapping relation with only one host machine in the other servers and the target server as a first server in response to the fact that the residual capacity of any candidate host machine does not meet the corresponding total specification requirement;
establishing a second mapping relation between the first server and a host machine with a first mapping relation, and releasing the first mapping relation corresponding to the first server;
updating the residual capacity of the host computer with the second mapping relation with the first server to be the capacity after subtracting the specification requirement of the first server;
after the residual capacity of the host is updated, determining the maximum server corresponding to each alternative host, wherein the maximum server corresponding to the alternative host is the server with the maximum specification requirement of the first mapping relation with the alternative host;
determining all the alternative hosts with a first mapping relation with the maximum server, wherein the host with the residual capacity meeting the specification requirement of the maximum server is used as a first host;
Selecting one host machine from the first host machines as a second host machine, establishing a second mapping relation between the maximum server and the second host machine, releasing a first mapping relation corresponding to the maximum server, and updating the residual capacity of the second host machine to be the capacity after subtracting the specification requirement of the maximum server;
after a second mapping relation between the target server and the host is established, the host with the second mapping relation with the target server is used as a target host.
7. The method of claim 1, wherein said migrating the target server to the target host comprises:
determining a corresponding migration scene according to the type of the target server, wherein the type is a physical machine or a virtual machine;
determining a target migration template of a migration template corresponding to the migration scene from preset migration templates, wherein the migration template comprises a migration step, a migration execution script or a command;
and migrating the target server to the target host by using the target migration template.
8. A service migration apparatus, comprising:
The migration requirement determining module is used for determining a resource pool requirement and a host requirement corresponding to a target server to be migrated in the service;
the target resource pool determining module is used for screening target resource pools meeting the resource pool requirements from a plurality of resource pools by utilizing a filtering method;
the target host determining module is used for screening target hosts meeting the requirements of the hosts from a plurality of hosts in the target resource pool by utilizing a boxing algorithm;
and the migration module is used for migrating the target server to the target host.
9. An electronic device, the device comprising: a processor and a memory storing computer program instructions;
the service migration method of any one of claims 1-7 when executed by the processor.
10. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon computer program instructions, which when executed by a processor, implement the service migration method according to any of claims 1-7.
11. A computer program product, characterized in that instructions in the computer program product, when executed by a processor of an electronic device, cause the electronic device to perform the service migration method of any one of claims 1-7.
CN202310127082.5A 2023-02-02 2023-02-02 Service migration method, device, equipment, computer storage medium and program Pending CN116136797A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310127082.5A CN116136797A (en) 2023-02-02 2023-02-02 Service migration method, device, equipment, computer storage medium and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310127082.5A CN116136797A (en) 2023-02-02 2023-02-02 Service migration method, device, equipment, computer storage medium and program

Publications (1)

Publication Number Publication Date
CN116136797A true CN116136797A (en) 2023-05-19

Family

ID=86333422

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310127082.5A Pending CN116136797A (en) 2023-02-02 2023-02-02 Service migration method, device, equipment, computer storage medium and program

Country Status (1)

Country Link
CN (1) CN116136797A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116600014A (en) * 2023-07-17 2023-08-15 中移(苏州)软件技术有限公司 Server scheduling method and device, electronic equipment and readable storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116600014A (en) * 2023-07-17 2023-08-15 中移(苏州)软件技术有限公司 Server scheduling method and device, electronic equipment and readable storage medium
CN116600014B (en) * 2023-07-17 2023-10-10 中移(苏州)软件技术有限公司 Server scheduling method and device, electronic equipment and readable storage medium

Similar Documents

Publication Publication Date Title
US10171377B2 (en) Orchestrating computing resources between different computing environments
US9703660B2 (en) Testing a virtualized network function in a network
JP6686910B2 (en) Network function virtualization management and orchestration method, device and program
EP3606008A1 (en) Method and device for realizing resource scheduling
US9854034B2 (en) Workload deployment density management for a multi-stage computing architecture implemented within a multi-tenant computing environment
EP3668009A1 (en) Life cycle management method and device for network service
US20160285966A1 (en) Capability-based abstraction of software-defined infrastructure
CN113127150B (en) Rapid deployment method and device of cloud primary system, electronic equipment and storage medium
US20190281503A1 (en) Management Method, Management Unit, and System
CN105979007A (en) Acceleration resource processing method and device and network function virtualization system
CN106663012B (en) Hardware acceleration method and related equipment
US9792110B2 (en) Automatic online system upgrade
US20190377606A1 (en) Smart accelerator allocation and reclamation for deep learning jobs in a computing cluster
CN107534577B (en) Method and equipment for instantiating network service
CN111399968B (en) Virtual resource management method, device and system based on container
CN116136797A (en) Service migration method, device, equipment, computer storage medium and program
CN110875838B (en) Resource deployment method, device and storage medium
CN110048875A (en) A kind of method and apparatus of upgrading driving
US20220329529A1 (en) 5g filters for virtual network functions
US11721099B2 (en) Cloud based active commissioning system for video analytics
US20210118113A1 (en) Image recovery
US10637735B2 (en) Pattern-based migration of workloads
JP6449487B2 (en) Software security verification method, device, and system
US10171313B2 (en) Managing workload to meet execution criterion in a hybrid cloud environment
US20230040842A1 (en) Network service management system and network service management method

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