CN113037569A - Redundant service method, device, equipment and medium based on double servers - Google Patents

Redundant service method, device, equipment and medium based on double servers Download PDF

Info

Publication number
CN113037569A
CN113037569A CN202110418633.4A CN202110418633A CN113037569A CN 113037569 A CN113037569 A CN 113037569A CN 202110418633 A CN202110418633 A CN 202110418633A CN 113037569 A CN113037569 A CN 113037569A
Authority
CN
China
Prior art keywords
virtual machine
service
target virtual
target
running
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
CN202110418633.4A
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.)
Hangzhou Hollysys Automation Co Ltd
Original Assignee
Hangzhou Hollysys Automation 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 Hangzhou Hollysys Automation Co Ltd filed Critical Hangzhou Hollysys Automation Co Ltd
Priority to CN202110418633.4A priority Critical patent/CN113037569A/en
Publication of CN113037569A publication Critical patent/CN113037569A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0663Performing the actions predefined by failover planning, e.g. switching to standby network elements
    • 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • 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/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/4557Distribution of virtual machine instances; Migration and load balancing
    • 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45595Network integration; Enabling network access in virtual machine instances

Abstract

The application discloses a redundant service method based on double servers, which comprises the following steps: respectively virtualizing two servers into corresponding virtual machines, and building a distributed file system by using a plurality of virtual mechanisms; when the application service deployed to the container and operated has a service requirement, selecting a target virtual machine from the virtual machines and responding to the service requirement by using the target virtual machine; and when the target virtual machine or a target server corresponding to the target virtual machine fails, transferring the service program running in the target virtual machine to the normally running virtual machine, and continuously responding to the service requirement. The method can reduce the waste of processing resources, the setting difficulty of the system and the maintenance cost on the basis that the system can continuously provide services when two servers are used for providing redundant services, and also discloses a redundant service device, equipment and a computer readable storage medium based on the double servers, which have the beneficial effects.

Description

Redundant service method, device, equipment and medium based on double servers
Technical Field
The present invention relates to the field of redundant services, and in particular, to a redundant service method, apparatus, device, and computer readable storage medium based on dual servers.
Background
At present, for some important application services, services are generally provided in a dual-server master-slave hot standby mode, that is, at least two servers are used for executing the same service in a mutual backup mode, when a main server fails, a standby server undertakes the task of executing the service, and the problem that the service is not interrupted when the main server fails is solved by using the standby server, so that the system can be automatically ensured to continuously provide the service without manual intervention. However, according to the method in the prior art, in order to ensure that the backup server can be used to continue providing services when the primary server fails, the backup server needs to perform services synchronously with the primary server to ensure the data information synchronization of the primary server and the backup server; since the execution service of the standby server is only for the synchronization of the data information, the overall execution efficiency is still only provided by the main server, and thus the standby server wastes a large amount of processing resources; in addition, the software and hardware of the main server and the standby server are required to be ensured to be completely consistent, so that the difficulty of system setting is improved; if one of the servers fails and there is no fully matched replacement server, both servers need to be replaced, thus increasing the cost of maintenance.
Therefore, how to reduce the waste of processing resources, the difficulty of setting the system, and the maintenance cost on the basis that the system can continuously provide services when two servers are used for providing redundant services is a technical problem that needs to be solved by technical personnel in the field.
Disclosure of Invention
In view of the above, an object of the present invention is to provide a redundant service method based on two servers, which can reduce the waste of processing resources, reduce the difficulty of setting the system, and reduce the maintenance cost on the basis that the system can continuously provide services when two servers are used to provide redundant services; another object of the present invention is to provide a dual server-based redundant service apparatus, a device and a computer readable storage medium, all of which have the above advantages.
In order to solve the above technical problem, the present invention provides a dual-server based redundancy service method, which includes:
respectively virtualizing two servers into corresponding virtual machines, and building a distributed file system by using a plurality of virtual mechanisms;
when the application service deployed to the container and running has a service requirement, selecting a target virtual machine from the virtual machines and responding to the service requirement by using the target virtual machine;
and when the target virtual machine or a target server corresponding to the target virtual machine fails, transferring a service program running in the target virtual machine to a normally running virtual machine, and continuously responding to the service requirement.
Preferably, when there is a service requirement for the application service deployed to the container and running, the process of selecting a target virtual machine from the virtual machines and responding to the service requirement by using the target virtual machine specifically includes:
when the service requirement exists in the application service deployed to run in the container, selecting a plurality of target virtual machines from the virtual machines and responding to the service requirement by utilizing the target virtual machines in a cluster load mode;
correspondingly, when the target virtual machine or the target server corresponding to the target virtual machine fails, the process of transferring the service program running in the target virtual machine to the virtual machine running normally and continuing to respond to the service requirement specifically includes:
when the target virtual machine or a target server corresponding to the target virtual machine fails, transferring a service program running in the target virtual machine to the plurality of normally running virtual machines, and continuously responding to the service demand by utilizing the plurality of normally running virtual machines in a cluster load manner.
Preferably, when the target virtual machine or the target server corresponding to the target virtual machine fails, the process of transferring the service program running in the target virtual machine to the virtual machine running normally and continuing to respond to the service requirement includes:
and when the target virtual machine or a target server corresponding to the target virtual machine fails, transferring a service program running in the target virtual machine to the normally running virtual machine according to a smoothing algorithm, and continuously responding to the service requirement.
Preferably, when the target virtual machine or the target server corresponding to the target virtual machine fails, the process of transferring the service program running in the target virtual machine to the virtual machine running normally and continuing to respond to the service requirement includes:
when the target virtual machine or a target server corresponding to the target virtual machine fails, after the target virtual machine retries for a preset number of times, transferring a service program running in the target virtual machine to the normally running virtual machine, and continuously responding to the service requirement.
Preferably, further comprising:
and respectively setting corresponding label information for each virtual machine according to the corresponding relation between the virtual machine and the server.
Preferably, when there is a service requirement for the application service deployed to the container and running, the process of selecting a target virtual machine from the virtual machines and responding to the service requirement by using the target virtual machine specifically includes:
when the application service deployed to the container and running has the service requirement, the target virtual machine is selected from the virtual machines according to the label information, and the service requirement is responded by the target virtual machine.
Preferably, further comprising:
and when the target virtual machine and/or the target server corresponding to the target virtual machine is detected to be out of order, sending out corresponding prompt information.
In order to solve the above technical problem, the present invention further provides a dual-server based redundancy service apparatus, including:
the virtualization module is used for respectively virtualizing two servers into corresponding virtual machines and building a distributed file system by using a plurality of virtual mechanisms;
the selection module is used for selecting a target virtual machine from the virtual machines and responding to the service requirement by utilizing the target virtual machine when the application service deployed to run in the container has the service requirement;
and the running module is used for transferring the service program running in the target virtual machine to the normally running virtual machine and continuously responding to the service requirement when the target virtual machine or the target server corresponding to the target virtual machine fails.
In order to solve the above technical problem, the present invention further provides a dual-server based redundancy service apparatus, including:
a memory for storing a computer program;
a processor for implementing the steps of any of the above dual server based redundancy service methods when executing the computer program.
To solve the above technical problem, the present invention further provides a computer-readable storage medium, having a computer program stored thereon, where the computer program is executed by a processor to implement the steps of any one of the above dual-server based redundancy service methods.
According to the dual-server-based redundancy service method provided by the invention, the two servers are respectively virtualized to form corresponding virtual machines, a distributed file system is built by utilizing a plurality of virtual machines, and each virtual machine in the distributed file system is utilized to provide redundancy service, so that the problem of uninterrupted service when the server or the virtual machine fails can be solved; data synchronization is carried out based on the distributed file system, so that when a target virtual machine or a normally running virtual machine executes service, other virtual machines do not need synchronous execution service to keep data information consistent, and waste of processing resources can be avoided; in addition, the method provides services by using the virtual machine, so that the consistency of software and hardware configuration of each server does not need to be ensured, the difficulty of system setting can be reduced, and the maintenance cost can be reduced.
In order to solve the technical problems, the invention also provides a redundant service device, equipment and a computer readable storage medium based on the double servers, which have the beneficial effects.
Drawings
In order to more clearly illustrate the embodiments or technical solutions of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly described below, and 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 provided drawings without creative efforts.
Fig. 1 is a flowchart of a dual-server-based redundancy service method according to an embodiment of the present invention;
fig. 2 is a system architecture diagram of a dual-server-based redundancy service method according to an embodiment of the present invention;
FIG. 3 is a block diagram of a dual-server based redundancy service apparatus according to an embodiment of the present invention;
fig. 4 is a structural diagram of a dual-server-based redundancy service device according to an embodiment of the present invention.
Detailed Description
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, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The core of the embodiment of the invention is to provide a redundant service method based on double servers, which can reduce the waste of processing resources, the setting difficulty of the system and the maintenance cost on the basis that the system can continuously provide services when two servers are used for providing redundant services; another core of the present invention is to provide a dual-server based redundant service apparatus, a device and a computer readable storage medium, all having the above-mentioned advantages.
In order that those skilled in the art will better understand the disclosure, the invention will be described in further detail with reference to the accompanying drawings and specific embodiments.
Fig. 1 is a flowchart of a dual-server-based redundancy service method according to an embodiment of the present invention; fig. 2 is a system architecture diagram of a dual-server-based redundancy service method according to an embodiment of the present invention. As shown in fig. 1 and 2, a dual server-based redundancy service method includes:
s10: and respectively virtualizing the two servers into corresponding virtual machines, and building a distributed file system by using a plurality of virtual mechanisms.
Specifically, in actual operation, firstly, virtualization operations need to be performed on each server for providing redundant services according to actual requirements, so as to obtain virtual machines corresponding to each server. Generally, a server can virtualize a plurality of virtual machines, so that virtualizing two servers will result in a plurality of virtual machines, and a distributed file system is built by using a plurality of virtual machines. In the embodiment, the number of the virtual machines virtualized by each server is not limited, and the virtual machines are selected according to actual requirements; generally, at least three virtual machines are required in a distributed file system.
As shown in fig. 2, after performing virtualization operations on two servers, each server virtualizes three virtual machines, that is, a distributed file system is established by using six virtual machines. It should be noted that the virtualization means may be implemented by vmware (Virtual Machine ware) or KVM (Kernel-based Virtual Machine, a virtualization technology under the Linux system), and the like, which is not limited in this embodiment.
S20: when the application service deployed to the container and running has a service requirement, selecting a target virtual machine from the virtual machines and responding to the service requirement by using the target virtual machine.
Specifically, in actual operation, the application service project is made into a mirror image, the application service is operated in a container mode, and the service is issued by using the container. The container technology is a kernel lightweight operating system layer virtualization technology, and the specific type of the container technology is not limited in this embodiment. For example, Docker, a widely used container technology, is a lightweight method for packaging and isolating application workloads, allowing multiple workloads to be run on the same physical or virtual server without conflict; the Docker container helps to optimize IT infrastructure utilization and cost.
Specifically, cluster management software of the container runs on the virtual machines, and the method of the embodiment is executed on the cluster management software, so that a plurality of virtual machines are utilized to provide redundant services; the cluster management software of the container mainly includes Swarm (Docker container cluster management engine), kubernets (open source container arrangement engine for managing containerized applications on multiple hosts in a cloud platform), messos (a universal cluster manager), and the like; it can be understood that the virtual machine running the cluster management software of the container is a management node in the distributed file system, and the remaining virtual machines are working nodes.
More specifically, the service is deployed into the container to run, when the application service deployed into the container to run has a service requirement, a target virtual machine is selected from a plurality of virtual machines in the distributed file system according to a preset rule, and the service requirement is responded by the target virtual machine.
S30: and when the target virtual machine or a target server corresponding to the target virtual machine fails, transferring the service program running in the target virtual machine to the normally running virtual machine, and continuously responding to the service requirement.
Specifically, when the target virtual machine or the target server corresponding to the target virtual machine fails, that is, the target virtual machine cannot continue to execute the service, the service running in the target virtual machine needs to be transferred to another normally running virtual machine, and the normally running virtual machine is used to continue to respond to the service requirement. It is understood that the failure of the target virtual machine or the target server may be a downtime or other type of failure, which is not limited in this embodiment. It should be noted that, in actual operation, a service program running in a target virtual machine is generally transferred to a normally running virtual machine with relatively good performance, so as to improve the stability and reliability of continuously providing services by using the normally running virtual machine.
It can be seen that, in the embodiment, the physical hardware resources are provided by the server, the physical resources are partitioned and isolated by the virtualization means, the parallel resource allocation and the automatic fault transfer are realized by the containerization technology, only one virtual machine provides services at the same time by the redundancy means, and the services are not interrupted when the server or the virtual machine fails.
In the dual-server-based redundancy service method provided by the embodiment of the invention, the two servers are respectively virtualized to form corresponding virtual machines, the distributed file system is built by utilizing a plurality of virtual machines, and the redundancy service is provided by utilizing each virtual machine in the distributed file system, so that the problem of uninterrupted service when the server or the virtual machine fails can be solved; data synchronization is carried out based on the distributed file system, so that when a target virtual machine or a normally running virtual machine executes service, other virtual machines do not need synchronous execution service to keep data information consistent, and waste of processing resources can be avoided; in addition, the method provides services by using the virtual machine, so that the consistency of software and hardware configuration of each server does not need to be ensured, the difficulty of system setting can be reduced, and the maintenance cost can be reduced.
On the basis of the foregoing embodiment, this embodiment further describes and optimizes the technical solution, and specifically, in this embodiment, when there is a service demand for an application service deployed to a container to run, a process of selecting a target virtual machine from virtual machines and responding to the service demand by using the target virtual machine specifically includes:
when the application service deployed to the container and operated has a service requirement, selecting a plurality of target virtual machines from the virtual machines and responding to the service requirement by utilizing the target virtual machines in a cluster load mode;
correspondingly, when the target virtual machine or the target server corresponding to the target virtual machine fails, the service program running in the target virtual machine is transferred to the virtual machine running normally, and the process of continuously responding to the service requirement specifically includes:
when the target virtual machine or a target server corresponding to the target virtual machine fails, the service program running in the target virtual machine is transferred to the plurality of normally running virtual machines, and the plurality of normally running virtual machines are utilized to continuously respond to the service requirement in a cluster load mode.
Specifically, in this embodiment, a plurality of target virtual machines are specifically selected, the service requirement is distributed to the plurality of target virtual machines, the plurality of target virtual machines respond to the service requirement in a cluster load manner, and the plurality of target virtual machines are used to cooperatively provide services. Correspondingly, when the target virtual machine or the target server corresponding to the target virtual machine fails and other normally operating virtual machines need to continuously respond to the service demand, the plurality of normally operating virtual machines need to be used to continuously provide the service in a cluster load manner.
It can be understood that, generally, a corresponding number of normally operating virtual machines are determined according to the number of target virtual machines that actually have a failure, and if a target server corresponding to a target virtual machine has a failure, a service program running in the target virtual machine needs to be transferred to a normally operating virtual machine of another server, so that a service is continuously provided by using the normally operating virtual machine without interrupting the service.
In this embodiment, as the same service requirement can be responded by using the multiple target virtual machines/normally operating virtual machines in the distributed file system in a cluster load manner, that is, the multiple target virtual machines and the normally operating virtual machines participate in the calculation at the same time, a calculation power is provided for responding to the service requirement, and the total calculation power is equal to the sum of the calculation powers of the target virtual machines and the normally operating virtual machines; compared with the technical scheme that the service is executed only by the main server and the total computing power is equal to that of the main server in the prior art, the method of the embodiment can greatly improve the service efficiency.
In addition, in the prior art, when the processing performance of the redundant service needs to be improved, the processing performance can only be improved by adding or stacking hardware devices, and for some servers, the hardware devices may not be added or stacked, so that the processing performance cannot be improved. According to the method of the embodiment, when the processing performance of the redundant service needs to be improved, the computing power can be improved by adding the servers and correspondingly virtualizing the corresponding virtual machines, so that the processing performance of the redundant service is improved, and the system setting is more flexible.
On the basis of the foregoing embodiment, this embodiment further describes and optimizes the technical solution, and specifically, in this embodiment, when a target virtual machine or a target server corresponding to the target virtual machine fails, a service program running in the target virtual machine is transferred to a virtual machine running normally, and a process of continuing to respond to a service requirement specifically includes:
and when the target virtual machine or a target server corresponding to the target virtual machine fails, transferring the service program running in the target virtual machine to the normally running virtual machine according to the smoothing algorithm, and continuously responding to the service requirement. .
It should be noted that, in actual operation, the smoothing algorithm is generally provided by container cluster management software, and the purpose of automatically migrating the service on the target virtual machine to the normally running virtual machine after the target virtual machine fails and continuously providing the service by using the normally running virtual machine is achieved. The smoothing algorithm includes various types, and the present embodiment does not limit the specific type of smoothing algorithm used.
Specifically, the server program running in the target virtual machine is transferred to the normally running virtual machine according to parameters such as the resource utilization rate of each virtual machine, the performance of the virtual machine, the number of times the virtual machine is selected, and the like, so that the normally running virtual machine can be relatively stably and reliably used for continuously providing services.
On the basis of the foregoing embodiment, this embodiment further describes and optimizes the technical solution, and specifically, in this embodiment, when a target virtual machine or a target server corresponding to the target virtual machine fails, a service program running in the target virtual machine is transferred to a virtual machine running normally, and a process of continuing to respond to a service requirement specifically includes:
when the target virtual machine or a target server corresponding to the target virtual machine fails, the service program running in the target virtual machine is transferred to the normally running virtual machine after the target virtual machine retries for the preset times, and the service requirement is continuously responded.
Specifically, in this embodiment, when the target virtual machine or the target server corresponding to the target virtual machine fails and causes service interruption, the operation of re-connecting or re-sending a request is continuously performed by using the target virtual machine in a retry manner, and if the retry number reaches a preset number, it is further determined that the target virtual machine or the target server fails, and at this time, the service program running in the target virtual machine is transferred to the virtual machine running normally, and the service requirement is continuously responded.
As can be seen, since service migration needs to consume a certain amount of processing resources, in this embodiment, after retry on the target virtual machine reaches a preset number, the service program running in the target virtual machine is transferred to the virtual machine running normally, and service requirements are continuously responded, which relatively guarantees that service migration is performed only when the target virtual machine/target server is unavailable, so that processing resources can be further relatively saved.
On the basis of the above embodiments, the present embodiment further describes and optimizes the technical solution, and specifically, the present embodiment further includes:
and respectively setting corresponding label information for each virtual machine according to the corresponding relation between the virtual machine and the server.
In actual operation, the cluster management software of the container can set corresponding label information for each virtual machine. Referring to fig. 2, for example, a server No. 1 and a server No. 2 are virtualized respectively to obtain three virtual machines, and corresponding tag information is set for each virtual machine according to a corresponding relationship between each virtual machine and the server; for example, the tag information of the virtual machine corresponding to the server No. 1 is a, and the tag information of the virtual machine corresponding to the server No. 2 is B. Furthermore, tag information may be set for each virtual machine, for example, tag information of three virtual machines virtualized by server No. 1 is a1, a2, and A3, respectively, that is, the virtual machine corresponding to server No. 1 is virtual machine a1, virtual machine a2, virtual machine A3, and the virtual machine corresponding to server No. 2 is virtual machine B1, virtual machine B2, virtual machine B3; the virtual machines virtualized by different servers can be distinguished according to the tag information, and the unique corresponding virtual machine can be determined by the tag information, so that the running condition of each virtual machine can be checked according to the tag information in the following process.
As a preferred embodiment, when there is a service demand for an application service deployed to a container and running, a process of selecting a target virtual machine from virtual machines and responding to the service demand by using the target virtual machine specifically includes:
when the application service deployed to the container and running has a service requirement, selecting a target virtual machine from the virtual machines according to the label information and responding to the service requirement by using the target virtual machine.
It should be noted that after the corresponding tag information is respectively set for each virtual machine according to the corresponding relationship between the virtual machine and the server, it indicates that the corresponding relationship between the virtual machine and the server can be determined according to the tag information, and the only corresponding virtual machine can be determined according to the tag information, so that when the application service deployed in the container and running has a service requirement, a target virtual machine can be further selected according to the tag information and the running requirement of each virtual machine; for example, it is required to execute the same service using virtual machines of the same server, or it is required to execute the service using a specified virtual machine, so that a target virtual machine can be selected from the virtual machines according to preset tag information.
Therefore, in the embodiment, the target virtual machine is selected according to the tag information, and the corresponding virtual machine can be used more flexibly and accurately to provide services, so that the use experience of the user is further improved.
On the basis of the above embodiments, the present embodiment further describes and optimizes the technical solution, and specifically, the present embodiment further includes:
and when the target virtual machine and/or the target server corresponding to the target virtual machine is detected to be out of order, sending out corresponding prompt information.
Specifically, in this embodiment, when it is detected that the target virtual machine and/or the target server corresponding to the target virtual machine has a failure, the prompting device is further triggered to send out the corresponding prompting information. It should be noted that the prompting device may specifically be a buzzer and/or an indicator light and/or a display, and the prompting device such as the buzzer, the indicator light, and the display is triggered to send out corresponding prompting information, such as a buzzer sound, a flashing light, characters or images, so as to intuitively prompt the user that the current target virtual machine/target server is out of order, and the user needs to perform service by using the normally operating virtual machine/server, so that the user can intuitively know the current service condition according to the prompting information, and thus the use experience of the user can be further improved.
The above detailed description is made for the embodiment of the dual-server-based redundancy service method provided by the present invention, and the present invention also provides a dual-server-based redundancy service apparatus, a device, and a computer-readable storage medium corresponding to the method.
Fig. 3 is a structural diagram of a dual-server based redundancy service apparatus according to an embodiment of the present invention, and as shown in fig. 3, the dual-server based redundancy service apparatus includes:
the virtualization module 31 is configured to virtualize two servers into corresponding virtual machines, and establish a distributed file system using multiple virtual machines;
the selection module 32 is configured to select a target virtual machine from the virtual machines and respond to a service requirement by using the target virtual machine when the application service deployed in the container and running has the service requirement;
and the running module 33 is configured to, when the target virtual machine or the target server corresponding to the target virtual machine fails, transfer the service program running in the target virtual machine to the normally running virtual machine, and continue to respond to the service requirement.
The dual-server-based redundancy service device provided by the embodiment of the invention has the beneficial effects of the dual-server-based redundancy service method.
As a preferred embodiment, the selection module specifically includes:
the first selection submodule is used for selecting a plurality of target virtual machines from the virtual machines and responding to service requirements in a cluster load mode by utilizing the target virtual machines when the application services deployed to run in the container have service requirements;
correspondingly, the operation module specifically comprises:
the first operation sub-module is used for transferring the service program operated in the target virtual machine to the plurality of normally operated virtual machines when the target virtual machine or the target server corresponding to the target virtual machine fails, and continuously responding to the service requirement by using the plurality of normally operated virtual machines in a cluster load manner.
As a preferred embodiment, the operation module specifically includes:
and the second operation submodule is used for transferring the service program operated in the target virtual machine to the normally operated virtual machine according to the smoothing algorithm when the target virtual machine or the target server corresponding to the target virtual machine fails, and continuously responding to the service requirement.
As a preferred embodiment, the operation module specifically includes:
and the third operation submodule is used for transferring the service program operated in the target virtual machine to the normally operated virtual machine after the target virtual machine retries for the preset times when the target virtual machine or the target server corresponding to the target virtual machine fails, and continuously responding to the service requirement.
As a preferred embodiment, a dual server-based redundancy service apparatus further includes:
and the label setting module is used for setting corresponding label information for each virtual machine according to the corresponding relation between the virtual machine and the server.
As a preferred embodiment, the selection module specifically includes:
and the second selection submodule is used for selecting a target virtual machine from the virtual machines according to the tag information and responding to the service requirement by using the target virtual machine when the application service deployed to the container and operated has the service requirement.
As a preferred embodiment, a dual server-based redundancy service apparatus further includes:
and the prompting module is used for sending out corresponding prompting information when the target virtual machine and/or the target server corresponding to the target virtual machine is detected to be out of order.
Fig. 4 is a structural diagram of a dual-server-based redundancy service apparatus according to an embodiment of the present invention, and as shown in fig. 4, a dual-server-based redundancy service apparatus includes:
a memory 41 for storing a computer program;
a processor 42 for implementing the steps of the dual server based redundancy service method as described above when executing the computer program.
The redundancy service equipment based on the double servers provided by the embodiment of the invention has the beneficial effects of the redundancy service method based on the double servers.
In order to solve the above technical problem, the present invention further provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the dual-server based redundancy service method as described above.
The computer-readable storage medium provided by the embodiment of the invention has the beneficial effects of the dual-server-based redundancy service method.
The dual-server based redundancy service method, apparatus, device and computer readable storage medium provided by the present invention are described in detail above. The principles and embodiments of the present invention are explained herein using specific examples, which are set forth only to help understand the method and its core ideas of the present invention. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present invention.
The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.

Claims (10)

1. A redundant service method based on double servers is characterized by comprising the following steps:
respectively virtualizing two servers into corresponding virtual machines, and building a distributed file system by using a plurality of virtual mechanisms;
when the application service deployed to the container and running has a service requirement, selecting a target virtual machine from the virtual machines and responding to the service requirement by using the target virtual machine;
and when the target virtual machine or a target server corresponding to the target virtual machine fails, transferring a service program running in the target virtual machine to a normally running virtual machine, and continuously responding to the service requirement.
2. The method according to claim 1, wherein when there is a service requirement for the application service deployed in the container, the process of selecting a target virtual machine from the virtual machines and responding to the service requirement by using the target virtual machine specifically includes:
when the service requirement exists in the application service deployed to run in the container, selecting a plurality of target virtual machines from the virtual machines and responding to the service requirement by utilizing the target virtual machines in a cluster load mode;
correspondingly, when the target virtual machine or the target server corresponding to the target virtual machine fails, the process of transferring the service program running in the target virtual machine to the virtual machine running normally and continuing to respond to the service requirement specifically includes:
when the target virtual machine or a target server corresponding to the target virtual machine fails, transferring a service program running in the target virtual machine to the plurality of normally running virtual machines, and continuously responding to the service demand by utilizing the plurality of normally running virtual machines in a cluster load manner.
3. The method according to claim 1, wherein when the target virtual machine or a target server corresponding to the target virtual machine fails, transferring a service program running in the target virtual machine to a normally running virtual machine, and continuing a process of responding to the service requirement specifically includes:
and when the target virtual machine or a target server corresponding to the target virtual machine fails, transferring a service program running in the target virtual machine to the normally running virtual machine according to a smoothing algorithm, and continuously responding to the service requirement.
4. The method according to claim 1, wherein when the target virtual machine or a target server corresponding to the target virtual machine fails, transferring a service program running in the target virtual machine to a normally running virtual machine, and continuing a process of responding to the service requirement specifically includes:
when the target virtual machine or a target server corresponding to the target virtual machine fails, after the target virtual machine retries for a preset number of times, transferring a service program running in the target virtual machine to the normally running virtual machine, and continuously responding to the service requirement.
5. The method of claim 1, further comprising:
and respectively setting corresponding label information for each virtual machine according to the corresponding relation between the virtual machine and the server.
6. The method according to claim 5, wherein when there is a service requirement for the application service deployed in the container, the process of selecting a target virtual machine from the virtual machines and responding to the service requirement by using the target virtual machine specifically includes:
when the application service deployed to the container and running has the service requirement, the target virtual machine is selected from the virtual machines according to the label information, and the service requirement is responded by the target virtual machine.
7. The method of any one of claims 1 to 6, further comprising:
and when the target virtual machine and/or the target server corresponding to the target virtual machine is detected to be out of order, sending out corresponding prompt information.
8. A dual server based redundant service device, comprising:
the virtualization module is used for respectively virtualizing two servers into corresponding virtual machines and building a distributed file system by using a plurality of virtual mechanisms;
the selection module is used for selecting a target virtual machine from the virtual machines and responding to the service requirement by utilizing the target virtual machine when the application service deployed to run in the container has the service requirement;
and the running module is used for transferring the service program running in the target virtual machine to the normally running virtual machine and continuously responding to the service requirement when the target virtual machine or the target server corresponding to the target virtual machine fails.
9. A dual server based redundant service device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the dual server based redundancy service method of any of claims 1 to 7 when executing said computer program.
10. A computer-readable storage medium, characterized in that a computer program is stored thereon, which, when being executed by a processor, carries out the steps of the dual server-based redundancy service method according to any one of claims 1 to 7.
CN202110418633.4A 2021-04-19 2021-04-19 Redundant service method, device, equipment and medium based on double servers Pending CN113037569A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110418633.4A CN113037569A (en) 2021-04-19 2021-04-19 Redundant service method, device, equipment and medium based on double servers

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110418633.4A CN113037569A (en) 2021-04-19 2021-04-19 Redundant service method, device, equipment and medium based on double servers

Publications (1)

Publication Number Publication Date
CN113037569A true CN113037569A (en) 2021-06-25

Family

ID=76456873

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110418633.4A Pending CN113037569A (en) 2021-04-19 2021-04-19 Redundant service method, device, equipment and medium based on double servers

Country Status (1)

Country Link
CN (1) CN113037569A (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102325192A (en) * 2011-09-30 2012-01-18 上海宝信软件股份有限公司 Cloud computing implementation method and system
US20130185716A1 (en) * 2012-01-13 2013-07-18 Computer Associates Think, Inc. System and method for providing a virtualized replication and high availability environment
CN104484243A (en) * 2014-12-05 2015-04-01 广东新支点技术服务有限公司 High-reliability system device and method combining virtual machine fault-tolerant technique and high-availability cluster technique
CN106446159A (en) * 2016-09-23 2017-02-22 华为技术有限公司 Method for storing files, first virtual machine and name node
CN107046810A (en) * 2015-12-03 2017-08-15 华为技术有限公司 A kind of virtual machine backup information moving method, device and system
CN107122230A (en) * 2017-05-31 2017-09-01 郑州云海信息技术有限公司 A kind of high availability method and its device based on server cluster
CN111651235A (en) * 2020-04-17 2020-09-11 北京奇艺世纪科技有限公司 Virtual machine set task management method and device
CN111880906A (en) * 2020-08-03 2020-11-03 广东省华南技术转移中心有限公司 Virtual machine high-availability management method, system and storage medium
CN112527469A (en) * 2020-12-29 2021-03-19 浙江工业大学 Fault-tolerant combination method of cloud computing server

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102325192A (en) * 2011-09-30 2012-01-18 上海宝信软件股份有限公司 Cloud computing implementation method and system
US20130185716A1 (en) * 2012-01-13 2013-07-18 Computer Associates Think, Inc. System and method for providing a virtualized replication and high availability environment
CN104484243A (en) * 2014-12-05 2015-04-01 广东新支点技术服务有限公司 High-reliability system device and method combining virtual machine fault-tolerant technique and high-availability cluster technique
CN107046810A (en) * 2015-12-03 2017-08-15 华为技术有限公司 A kind of virtual machine backup information moving method, device and system
CN106446159A (en) * 2016-09-23 2017-02-22 华为技术有限公司 Method for storing files, first virtual machine and name node
CN107122230A (en) * 2017-05-31 2017-09-01 郑州云海信息技术有限公司 A kind of high availability method and its device based on server cluster
CN111651235A (en) * 2020-04-17 2020-09-11 北京奇艺世纪科技有限公司 Virtual machine set task management method and device
CN111880906A (en) * 2020-08-03 2020-11-03 广东省华南技术转移中心有限公司 Virtual machine high-availability management method, system and storage medium
CN112527469A (en) * 2020-12-29 2021-03-19 浙江工业大学 Fault-tolerant combination method of cloud computing server

Similar Documents

Publication Publication Date Title
US11190440B2 (en) Methods and apparatus to configure and manage network resources for use in network-based computing
US8015431B2 (en) Cluster system and failover method for cluster system
EP4242841A2 (en) Highly available stateful containers in a cluster environment
Yang et al. On improvement of cloud virtual machine availability with virtualization fault tolerance mechanism
US8560628B2 (en) Supporting autonomous live partition mobility during a cluster split-brained condition
US8473692B2 (en) Operating system image management
CN108632067B (en) Disaster recovery deployment method, device and system
US8495412B2 (en) Autonomous propagation of virtual input/output (VIO) operation(s) to second VIO server (VIOS) due to a detected error condition at a first VIOS
US8726274B2 (en) Registration and initialization of cluster-aware virtual input/output server nodes
CN106528327B (en) A kind of data processing method and backup server
CN108270726B (en) Application instance deployment method and device
EP3188008B1 (en) Virtual machine migration method and device
US11614977B2 (en) Optimizing clustered applications in a clustered infrastructure
CN110912991A (en) Super-fusion-based high-availability implementation method for double nodes
US10331472B2 (en) Virtual machine service availability
CN106980529B (en) Computer system for managing resources of baseboard management controller
EP3806395B1 (en) Virtual network function (vnf) deployment method and apparatus
CN105183554A (en) Hybrid computing system of high-performance computing and cloud computing, and resource management method therefor
US11768724B2 (en) Data availability in a constrained deployment of a high-availability system in the presence of pending faults
US10880367B2 (en) Load balancing stretched clusters in a distributed network
CN113886089A (en) Task processing method, device, system, equipment and medium
US8661089B2 (en) VIOS cluster alert framework
CN107995319B (en) Virtual device configuration method and network device
CN113037569A (en) Redundant service method, device, equipment and medium based on double servers
CN111221620A (en) Storage method, storage device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210625