CN105959145B - A kind of method and system for the concurrent management server being applicable in high availability cluster - Google Patents

A kind of method and system for the concurrent management server being applicable in high availability cluster Download PDF

Info

Publication number
CN105959145B
CN105959145B CN201610395528.2A CN201610395528A CN105959145B CN 105959145 B CN105959145 B CN 105959145B CN 201610395528 A CN201610395528 A CN 201610395528A CN 105959145 B CN105959145 B CN 105959145B
Authority
CN
China
Prior art keywords
server
real
virtual
real server
business
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610395528.2A
Other languages
Chinese (zh)
Other versions
CN105959145A (en
Inventor
沈星宇
莫庆良
吴崇峰
吴健
余世清
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Zhongxing Newstart Technology Co Ltd
Original Assignee
Guangdong Zhongxing Newstart 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 Guangdong Zhongxing Newstart Technology Co Ltd filed Critical Guangdong Zhongxing Newstart Technology Co Ltd
Priority to CN201610395528.2A priority Critical patent/CN105959145B/en
Publication of CN105959145A publication Critical patent/CN105959145A/en
Application granted granted Critical
Publication of CN105959145B publication Critical patent/CN105959145B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0659Management of faults, events, alarms or notifications using network fault recovery by isolating or reconfiguring faulty entities
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Hardware Redundancy (AREA)

Abstract

The embodiment of the invention discloses a kind of method and system of concurrent management server for being applicable in high availability cluster, method includes: that the runtime server being located under high availability cluster system based on high availability cluster software detection whether there is failure;Judge the runtime server type, when judging the runtime server type is the first virtual server, then by the Linux virtual server LVS service switching carried on the first virtual server to the second virtual server, the LVS business is run by the second virtual server;When judging the runtime server type is the first real server, then the actual services that the first real server is carried are switched to the second real server, the actual services are run by the second real server.Implement the embodiment of the present invention, the business on every real server and virtual server is made all to provide service incessantly, it is maximum to meet the needs of users.

Description

A kind of method and system for the concurrent management server being applicable in high availability cluster
Technical field
The present invention relates to computer cluster technology field more particularly to a kind of concurrent management clothes for being applicable in high availability cluster The method and system of business device.
Background technique
High-availability cluster, original English text are High Availability Cluster, abbreviation HACluster, cluster It (cluster) is to be made of one group of computer, they provide a user one group of Internet resources as a whole.These are single Computer system is exactly the node (node) of cluster.The appearance of high-availability cluster is to make the integrity service of cluster as far as possible may be used With to reduce the loss as brought by computer hardware and software fallibility.If some node failure, its redundant node It will be in several seconds time inscribed let it be responsibility.Therefore, for a user, cluster is never shut down.High-availability cluster The main function of software is exactly the automation for realizing trouble shooting and service switching.Only there are two the high-availability clusters of node to be also known as For two-node cluster hot backup, i.e., backed up mutually using two-server.When a server breaks down, can be held by another server Service role is carried on a shoulder pole, so that automatic guarantee system can continue external offer service in the case where not needing manual intervention.Dual-locomotive heat One kind of standby only high-availability cluster, highly available cluster system can more support more than two nodes, provide and compare two-node cluster hot backup More, more advanced function is more able to satisfy the changes in demand of user's emergence.
Current high availability cluster introduces linux virtual server (Linux Virtual Server, LVS), Virtual server (Virtual server) High Availabitity (High is realized using LVS+Keepalived or LVS+heartbeat Availability), it ensure that LVS business uninterruptedly provides the ability of load balancing, LVS and real service in existing framework Device, which belongs under different mode, to be managed, and existing service architecture can not meet the ability of parallel processing LVS and real server, is lacked same Effective management of the Shi Binghang to real server and LVS, lack to the business on every real server (Real server) with And business uninterruptedly persistently provides the guarantee of service ability on LVS.
Summary of the invention
It is an object of the invention to overcome the deficiencies in the prior art, and the present invention provides a kind of applicable high availability clusters The method and system of concurrent management server provide the business on every real server and virtual server all incessantly Service, it is maximum to meet the needs of users.
To solve the above-mentioned problems, the invention proposes a kind of sides of concurrent management server for being applicable in high availability cluster Method includes the following steps:
It is located at the runtime server under high availability cluster system with the presence or absence of event based on high availability cluster software detection Barrier;
Judge the runtime server type, when judging the runtime server type is the first virtual server, Then by the Linux virtual server LVS service switching carried on the first virtual server to the second virtual server, by the second void Quasi- server runs the LVS business, and first virtual server and the second virtual server are by high availability cluster system Under different real server carried;
When judging the runtime server type is the first real server, then the first real server is carried Actual services be switched to the second real server, the actual services are run by the second real server.
It is described judge the runtime server type be the first real server when, then by the first real server institute The actual services of carrying are switched to the second real server, run the actual services by the second real server and include;
Judge whether first real server carries the first virtual server, if judging first real service Device carries the first virtual server, then the actual services that the first real server is carried is switched to the second real service Device runs the actual services by the second real server, by the LVS service switching carried on the first virtual server to second Virtual server runs the LVS business by the second virtual server;
If judge that first real server does not carry the first virtual server, by the first real server institute The actual services of carrying are switched to the second real server, run the actual services by the second real server.
The actual services that first real server is carried are switched in the second real server further include:
When judging that the first real server breaks down, in actual services handoff procedure, high availability cluster is soft Part detects that the business on the first real server is not present, and first is deleted from the LVS routing table of virtual server and is really taken The real IP routing of business device restores the second real server real IP and is routed to Virtual Service after completing actual services switching In the LVS routing table of device.
It is described judge the runtime server type be the first real server when, then by the first real server institute The actual services of carrying are switched to the second real server, run the actual services by the second real server and include:
The fault type of first real server is judged, if the fault type is the true industry for being associated with LVS business Business is in application, be then switched to the second real server for the actual services that the first real server is carried, by the second true clothes Business device runs the actual services;Or the first real server of triggering is restarted automatically;
If the fault type is the fault type of dereferenced LVS, the first real server is carried true Service switching runs the actual services to the second real server, by the second real server.
The method also includes:
Whether restored based on the faulty server of high availability cluster software detection, the server includes virtual clothes Business device and real server;
After judging that the faulty server restores, carried out according to the configuration file in high availability cluster software Service failure recovery, the automatic switchback of LVS business switched before is true to the first virtual server or by what is switched before First real server of the automatic switchback of business to after restoring;Or
After judging that the faulty server restores, carried out according to the configuration file in high availability cluster software Standby host registration process, using after recovery the first real server or the first virtual server as in consequent malfunction treatment mechanism Standby host.
Correspondingly, the invention also provides a kind of system of concurrent management server for being applicable in high availability cluster, it is described System includes:
Fault detection module, the operation for being located under high availability cluster system based on high availability cluster software detection Server whether there is failure;
Type of server judgment module, for judging the runtime server type;
Service switching module, for carrying out industry according to the runtime server type judged in type of server judgment module Business switching, comprising:
Virtual service switch unit, for judge the runtime server type be the first virtual server when, then It is virtual by second by the Linux virtual server LVS service switching carried on the first virtual server to the second virtual server Server runs the LVS business, and first virtual server and the second virtual server are by under high availability cluster system Different real server carried;
Actual services switch unit, for judge the runtime server type be the first real server when, then The actual services that first real server is carried are switched to the second real server, as described in the operation of the second real server Actual services.
It is virtual that the type of server judgment module is also used to judge whether first real server carries first Server;
The service switching module is judging that first real server carries the first virtual server, then by first The actual services that real server is carried are switched to the second real server, run the true industry by the second real server The LVS service switching carried on first virtual server to the second virtual server is run institute by the second virtual server by business State LVS business;When judging that first real server does not carry the first virtual server, then by the first real server The actual services carried are switched to the second real server, run the actual services by the second real server.
The system also includes:
Cluster LVS routing module, for switching in actual services when judging that the first real server breaks down Cheng Zhong, the business in high availability cluster software detection to the first real server are not present, and route from the LVS of virtual server It is true to restore the second real server after completing actual services switching for the real IP routing that the first real server is deleted in table Real IP is routed in the LVS routing table of virtual server.
The system also includes:
Fault type module, for judging institute when judging the runtime server type is the first real server The fault type for stating the first real server judges that the fault type is the true of association LVS business in fault type module Industry business is in application, be then switched to the second true clothes for the actual services that the first real server is carried by service switching module Business device runs the actual services by the second real server;Or the first real server of triggering is restarted automatically;
When fault type module judges the fault type for the fault type of dereferenced LVS, then by service switching mould The actual services that first real server is carried are switched to the second real server by block, run institute by the second real server State actual services.
The system also includes:
Fault recovery detection module, for whether extensive based on the faulty server of high availability cluster software detection Multiple, the server includes virtual server and real server;
Fault recovery automatic switching module, for judging that the faulty server restores in fault recovery detection module Later, service failure recovery is carried out according to the configuration file in high availability cluster software, the LVS business switched before is automatic It is switched to the first virtual server or the first real server by the automatic switchback of the actual services switched before to after restoring;
Standby host Registration Module is used for after fault recovery detection module judges that the faulty server restores, root Standby host registration process is carried out according to the configuration file in high availability cluster software, by the first real server or the after recovery One virtual server is as the standby host in consequent malfunction treatment mechanism.
In embodiments of the present invention, by being detected on virtual server and real server in high availability cluster system State, can ensure the service switching of virtual server and real server in a failure mode.Since the present invention is implemented Carry virtual server by the real server in high availability cluster system in example, virtual server there are two or with On, it is distributed on different real server, monitors all servers in entire high availability cluster system, detecting After breaking down to associated server, the type of runtime server is first determined whether out, come further according to the type of runtime server It realizes active-standby switch, ensures that corresponding business will not be thrust.The present embodiment makes on every real server and virtual server Business service is all provided incessantly, it is maximum to meet the needs of users.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with Other attached drawings are obtained according to these attached drawings.
Fig. 1 is the method flow diagram of the concurrent management server for being applicable in high availability cluster of the embodiment of the present invention;
Fig. 2 is the system structure diagram of the concurrent management server for being applicable in high availability cluster of the embodiment of the present invention;
Fig. 3 is another structural representation of system of the concurrent management server for being applicable in high availability cluster of the embodiment of the present invention Figure;
Fig. 4 is the high availability cluster system concrete application schematic diagram of the embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
The method that the concurrent management server of high availability cluster is applicable in involved in the embodiment of the present invention, passes through base It is located at the runtime server under high availability cluster system with the presence or absence of failure in high availability cluster software detection;Judgement operation Type of server then will be on the first virtual server when judging the runtime server type is the first virtual server The Linux virtual server LVS service switching of carrying runs the LVS to the second virtual server, by the second virtual server Business, first virtual server and the second virtual server are by the different real server institutes under high availability cluster system Carrying;When judging the runtime server type is the first real server, then the first real server is carried Actual services are switched to the second real server, run the actual services by the second real server.
Correspondingly, Fig. 1 shows the side of the concurrent management server for being applicable in high availability cluster in the embodiment of the present invention Method flow chart, the flow chart include the following steps:
S101, the runtime server under high availability cluster system is located at based on high availability cluster software detection;
Under high availability cluster system, it is related at least two virtual server, more than two real services Device, the real server quantity are greater than virtual server quantity, these virtual servers are respectively by different real server It is carried, for example virtual server 1 is there are on real server 1, virtual server 2 is there are on real server 2, Virtual Service Device 1 and virtual server 2 are there are main and standby relation, and generally there are a virtual servers in operation, run related LVS industry Business.Being related to the real server under high availability cluster system can be multiple real server to support the operation of business, Be related to one backup real server, the real server of the backup can be with backup virtual server involved in Real server is identical, can also be different.
S102, judge that runtime server with the presence or absence of failure, enters S103, otherwise if runtime server is there are failure Continue step S101;
Due to including real server and virtual server, each type of server under the high availability cluster system All there may be failure, need to judge that the server to break down is virtual server or real server.
In specific implementation process, can by check business each resource whether normal operation, if there is some resource It is abnormal, then switch.And these resources are embodied in: business faults itself (such as business application failure stops), operation The system failure or hardware fault etc. can all cause business to be unable to operate normally, and business only switches or is restarted automatically at this time ?.Can choose switching for traffic failure, perhaps business itself is restarted if it is server failure (such as power-off or server Restart), then business must switch.In general, this failure may relate to software fault or hardware fault etc..If fortune Capable is LVS business, then is virtual server, is otherwise real server.It can certainly be by being specified in configuration file Type of server is virtual server, real server, mixing server (virtual server and real server share).
S103, the type for judging runtime server are entered if the type of runtime server is virtual server S104 enters S105 if the type of runtime server is real server;
S104, by the LVS service switching carried on the first virtual server to the second virtual server, by the second virtual clothes Business device runs LVS business;
When judging runtime server type is the first virtual server, then will carry on the first virtual server Linux virtual server LVS service switching runs the LVS business to the second virtual server, by the second virtual server, this In the first virtual server and the second virtual server held by the different real server under high availability cluster system It carries.
S105, the actual services that the first real server is carried are switched to the second real server, it is true by second Server runs actual services.
In the specific implementation process, it can further judge whether the real server to break down carries in step S105 There is virtual server, if the real server that judgement is broken down carries the virtual server of operation, by failure The actual services that real server is carried are switched on the real server of backup, and it is true to run this by the real server backed up Industry business, and by the LVS service switching to the virtual server of backup carried on virtual server, by the Virtual Service backed up Device runs the LVS business;If the real server that judgement is broken down does not carry virtual server, it will break down The actual services that are carried of real server be switched on the real server of backup, run by the real server backed up true Industry business.It should be noted that the real server of the virtual server and backup that back up here can be it is true by what is backed up Server is carried, and is also possible to different real server and is carried.
In the specific implementation process, in step S105 when judging that the first real server breaks down, in true industry It is engaged in handoff procedure, the business in high availability cluster software detection to the first real server is not present, from virtual server LVS routing table in delete the real IP routing of the first real server it is true to restore second after completing actual services switching Server real IP is routed in the LVS routing table of virtual server.
In the specific implementation process, the fault type of first real server can be further judged, if the failure classes Type for be associated with LVS business actual services in application, the actual services that the first real server is carried then are switched to second Real server runs actual services by the second real server, or the first real server of triggering is restarted automatically, this is restarted Process is usually soft start-up process;If the fault type is the fault type of dereferenced LVS, by the first real server The actual services carried are switched to the second real server, run the actual services by the second real server.
In the specific implementation process, the functions such as self-healing or manual reversion may be implemented in the server of failure, are based on Whether the faulty server of high availability cluster software detection has restored, and server here includes virtual server and true Server;
After judging that the faulty server restores, carried out according to the configuration file in high availability cluster software Service failure recovery, the automatic switchback of LVS business switched before is true to the first virtual server or by what is switched before First real server of the automatic switchback of business to after restoring;Or after judging that faulty server restores, according to height Configuration file in availability clustered software carries out standby host registration process, by the first real server or the first void after recovery Intend server as the standby host in consequent malfunction treatment mechanism.
Correspondingly, Fig. 2 also shows the system knot of the concurrent management server for being applicable in high availability cluster in the present embodiment Structure schematic diagram, the system include:
Fault detection module, the operation for being located under high availability cluster system based on high availability cluster software detection Server whether there is failure;
Type of server judgment module, for judging the runtime server type;
Service switching module, for carrying out industry according to the runtime server type judged in type of server judgment module Business switching, comprising:
Virtual service switch unit, for judge the runtime server type be the first virtual server when, then It is virtual by second by the Linux virtual server LVS service switching carried on the first virtual server to the second virtual server Server runs the LVS business, and first virtual server and the second virtual server are by under high availability cluster system Different real server carried;
Actual services switch unit, for judge the runtime server type be the first real server when, then The actual services that first real server is carried are switched to the second real server, as described in the operation of the second real server Actual services.
In specific implementation process, which is also used to judge whether first real server holds It is loaded with the first virtual server;The service switching module is judging that first real server carries the first Virtual Service The actual services that first real server is carried then are switched to the second real server by device, are transported by the second real server The row actual services, it is virtual by second by the LVS service switching carried on the first virtual server to the second virtual server Server runs the LVS business;When judging that first real server does not carry the first virtual server, then by The actual services that one real server is carried are switched to the second real server, described true by the operation of the second real server Business.
In specific implementation process, can by check business each resource whether normal operation, if there is some resource It is abnormal, then switch.And these resources are embodied in: business faults itself (such as business application failure stops), operation The system failure or hardware fault etc. can all cause business to be unable to operate normally, business only switching at this time or automatic weight Qi Liao.Can choose switching for traffic failure, perhaps business itself is restarted if it is server failure (as powered off or servicing Think highly of and open), then business must switch.In general, this failure may relate to software fault or hardware fault etc..If Operation is LVS business, then is virtual server, is otherwise real server.It can certainly be by referring in configuration file Determining type of server is virtual server, real server, mixing server (virtual server and real server share).
Further, Fig. 3 shows the system of the concurrent management server for being applicable in high availability cluster in the present embodiment Another structural schematic diagram, the system include:
Fault detection module, the operation for being located under high availability cluster system based on high availability cluster software detection Server whether there is failure;
Type of server judgment module, for judging the runtime server type;
Service switching module, for carrying out industry according to the runtime server type judged in type of server judgment module Business switching, comprising:
Virtual service switch unit, for judge the runtime server type be the first virtual server when, then It is virtual by second by the Linux virtual server LVS service switching carried on the first virtual server to the second virtual server Server runs the LVS business, and first virtual server and the second virtual server are by under high availability cluster system Different real server carried;
Actual services switch unit, for judge the runtime server type be the first real server when, then The actual services that first real server is carried are switched to the second real server, as described in the operation of the second real server Actual services.
In specific implementation process, which is also used to judge whether first real server holds It is loaded with the first virtual server;The service switching module is judging that first real server carries the first Virtual Service The actual services that first real server is carried then are switched to the second real server by device, are transported by the second real server The row actual services, it is virtual by second by the LVS service switching carried on the first virtual server to the second virtual server Server runs the LVS business;When judging that first real server does not carry the first virtual server, then by The actual services that one real server is carried are switched to the second real server, described true by the operation of the second real server Business.
In specific implementation process, which further includes a cluster LVS routing module, for judging the first real service Industry when device breaks down, in actual services handoff procedure, in high availability cluster software detection to the first real server Business is not present, and the real IP routing of the first real server is deleted from the LVS routing table of virtual server, completes true industry After business switching, restores the second real server real IP and be routed in the LVS routing table of virtual server.
In specific implementation process, the system further include:
Fault type module, for judging institute when judging the runtime server type is the first real server The fault type for stating the first real server judges that the fault type is the true of association LVS business in fault type module Industry business is in application, be then switched to the second true clothes for the actual services that the first real server is carried by service switching module Business device runs the actual services by the second real server;Or the first real server of triggering is restarted automatically, this was restarted Journey is usually soft start-up process;
When fault type module judges the fault type for the fault type of dereferenced LVS, then by service switching mould The actual services that first real server is carried are switched to the second real server by block, run institute by the second real server State actual services.
In specific implementation process, the system further include:
Fault recovery detection module, for whether extensive based on the faulty server of high availability cluster software detection Multiple, the server includes virtual server and real server;
The automatic switchback module of fault recovery, for judging that the faulty server restores in fault recovery detection module Later, service failure recovery is carried out according to the configuration file in high availability cluster software, the LVS business switched before is automatic First real server of the switchback to the first virtual server or by the automatic switchback of the actual services switched before to after restoring;
Standby host Registration Module is used for after fault recovery detection module judges that the faulty server restores, root Standby host registration process is carried out according to the configuration file in high availability cluster software, by the first real server or the after recovery One virtual server is as the standby host in consequent malfunction treatment mechanism.
Correspondingly, Fig. 4 shows the high availability cluster system concrete application schematic diagram in the embodiment of the present invention, exist first When deployment, special clustered software is installed on virtual server and real server, all nodes are as a cluster Cluster, wherein two-server is both virtual server and real server for selection, and virtual server runs LVS industry Business, real server run business required for user.
Secondly when configuration, using the backup node on virtual server as the backup shared with real server Node.The business externally provided run on real server is placed under clustered software control, the LVS run on virtual server Business is also under clustered software control.
After configuration is completed, start clustered software system.After above-mentioned configuration, LVS business and real server On business all run under the monitoring of the clustered software system, corresponding service is provided.If master virtual server is sent out Raw failure, LVS business automatically switch to backup virtual server;Certain real server breaks down, the real server Related service also automatically switch to corresponding backup real server.User passes through access VIP (Virtual IP), by User is requested assignment to real server according to load balance scheduling algorithm by LVS.
All of above step is assisted to complete jointly by LVS and cluster software systems, this concurrency management virtual server and The method of real server, only every real server does not provide load balancing, and guarantees that business is continual right Outer offer service does not thrust for business and provides higher reliability.
Based on the specific embodiment in Fig. 4 into, virtual server and real server are brought to special High Availabitity collection During group's system (High Availability cluster) manages, as a cluster management.
It selects two-server (host and standby host) as virtual server, manages LVS business, this two-shipper is Virtual Service What device and real server shared, and standby host had both been used as the standby host of virtual server, also as the standby of all real server Machine, i.e. cluster N+M mode a special case, are 1+1 mode for virtual server, are N+ for real server 1 mode.
The business Floating IP address of operation on every real server is as the RIP (Real IP) in LVS configuration.
It goes wrong on a certain real server in cluster, it can be in two kinds of situation: 1, this real service The service resources such as the service application of device or business IP (Floating IP address) go wrong;2, this real server itself is asked Topic, such as power-off, system reboot etc..When there is the 1st kind of problem in real server, business automatically switch to standby host or from Dynamic selection is restarted, this selection is arranged in system configuration file by user.When there is the 2nd kind of problem in real server, industry Business automatically switches to standby host (real server and virtual server share).
The switching of both the above situation business is restarted, and from LVS virtual server, every real server is one Directly in operation, from the angle of user, thrusting for business even more can't see.It really ensure that and continue within business 7*24 hours uninterruptedly Ground operation.
Similarly, when main virtual server (Master virtual server) breaks down, LVS business will be cut automatically Change to standby virtual server (Backup virtual server).In specific implementation process, two virtual servers here are It is shared with real server.
When faulty server (including real server and virtual server) restore after, the automatic switchback of business or Not switchback is arranged in system configuration file by user.If selecting not switchback, the server restored is as standby host.
In entire specific implementation process, by detecting virtual server and real service in high availability cluster system State on device can ensure the service switching of virtual server and real server in a failure mode.Due to the present invention Carry virtual server in embodiment by the real server in high availability cluster system, virtual server there are two or More than, it is distributed on different real server, monitors all servers in entire high availability cluster system, examining After measuring associated server failure, the type of runtime server is first determined whether out, further according to the type of runtime server It realizes active-standby switch, ensures that corresponding business will not be thrust.The present embodiment makes every real server and virtual server On business service is all provided incessantly, it is maximum to meet the needs of users.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of above-described embodiment is can It is completed with instructing relevant hardware by program, which can be stored in a computer readable storage medium, storage Medium may include: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), disk or CD etc..
In addition, being provided for the embodiments of the invention the method for being applicable in the concurrent management server of high availability cluster above And system is described in detail, it is used herein that a specific example illustrates the principle and implementation of the invention, The above description of the embodiment is only used to help understand the method for the present invention and its core ideas;Meanwhile for the one of this field As technical staff, according to the thought of the present invention, there will be changes in the specific implementation manner and application range, to sum up institute It states, the contents of this specification are not to be construed as limiting the invention.

Claims (10)

1. a kind of method for the concurrent management server for being applicable in high availability cluster, which comprises the steps of:
It is located at the runtime server under high availability cluster system with the presence or absence of failure, institute based on high availability cluster software detection When stating high availability cluster system configuration, using the backup node on virtual server as and real server share Backup node, the business externally provided run on real server are placed under clustered software control, transport on virtual server Capable LVS business is also under clustered software control;
Judge the runtime server type, when judging the runtime server type is the first virtual server, then will The Linux virtual server LVS service switching carried on first virtual server is to the second virtual server, by the second virtual clothes Business device runs the LVS business, and first virtual server and the second virtual server are by under high availability cluster system Different real server are carried;
When judging the runtime server type is the first real server, then the first real server is carried true Industry business is switched to the second real server, runs the actual services by the second real server.
2. being applicable in the method for the concurrent management server of high availability cluster as described in claim 1, which is characterized in that described When judging the runtime server type is the first real server, then the true industry that is carried the first real server Business is switched to the second real server, runs the actual services by the second real server and includes;
Judge whether first real server carries the first virtual server, first real server is held if judging It is loaded with the first virtual server, then the actual services that the first real server is carried are switched to the second real server, by Second real server runs the actual services, and the LVS service switching carried on the first virtual server is virtual to second Server runs the LVS business by the second virtual server;
If judge that first real server does not carry the first virtual server, the first real server is carried Actual services be switched to the second real server, the actual services are run by the second real server.
3. being applicable in the method for the concurrent management server of high availability cluster as described in claim 1, which is characterized in that described The actual services that first real server is carried are switched in the second real server further include:
When judging that the first real server breaks down, in actual services handoff procedure, the inspection of high availability cluster software The business measured on the first real server is not present, and deletes the first real server from the LVS routing table of virtual server Real IP routing, complete actual services switching after, restore the second real server real IP be routed to virtual server In LVS routing table.
4. the method for the concurrent management server as described in any one of claims 1 to 3 for being applicable in high availability cluster, feature It is, it is described when judging the runtime server type is the first real server, then the first real server is held The actual services of load are switched to the second real server, run the actual services by the second real server and include:
The fault type of first real server is judged, if the actual services that the fault type is association LVS business are answered The actual services that first real server is carried then are switched to the second real server by the used time, by the second real server Run the actual services;Or the first real server of triggering is restarted automatically;
If the fault type is the fault type of dereferenced LVS, actual services that the first real server is carried It is switched to the second real server, the actual services are run by the second real server.
5. being applicable in the method for the concurrent management server of high availability cluster as claimed in claim 4, which is characterized in that described Method further include:
Whether restored based on the faulty server of high availability cluster software detection, the server includes virtual server And real server;
After judging that the faulty server restores, business is carried out according to the configuration file in high availability cluster software Fault recovery, by the automatic switchback of LVS business switched before to the first virtual server or the actual services that will switch before First real server of the automatic switchback to after restoring;Or
After judging that the faulty server restores, standby host is carried out according to the configuration file in high availability cluster software Registration process, using after recovery the first real server or the first virtual server as standby in consequent malfunction treatment mechanism Machine.
6. a kind of system for the concurrent management server for being applicable in high availability cluster, which is characterized in that the high availability cluster When system configuration, using the backup node on virtual server as the backup node shared with real server, very The business externally provided run on real server is placed under clustered software control, the LVS business run on virtual server Under clustered software control, the system comprises:
Fault detection module, the operation service for being located under high availability cluster system based on high availability cluster software detection Device whether there is failure;
Type of server judgment module, for judging the runtime server type;
Service switching module is cut for carrying out business according to the runtime server type judged in type of server judgment module It changes, comprising:
Virtual service switch unit, for when judging the runtime server type is the first virtual server, then by the The Linux virtual server LVS service switching carried on one virtual server is to the second virtual server, by the second Virtual Service Device run the LVS business, first virtual server and the second virtual server by under high availability cluster system not Same real server is carried;
Actual services switch unit, for when judging the runtime server type is the first real server, then by the The actual services that one real server is carried are switched to the second real server, described true by the operation of the second real server Business.
7. being applicable in the system of the concurrent management server of high availability cluster as claimed in claim 6, which is characterized in that described Type of server judgment module is also used to judge whether first real server carries the first virtual server;
The service switching module is judging that first real server carries the first virtual server, then true by first The actual services that server is carried are switched to the second real server, run the actual services by the second real server, By the LVS service switching carried on the first virtual server to the second virtual server, as described in the operation of the second virtual server LVS business;When judging that first real server does not carry the first virtual server, then by the first real server institute The actual services of carrying are switched to the second real server, run the actual services by the second real server.
8. being applicable in the system of the concurrent management server of high availability cluster as claimed in claim 6, which is characterized in that described System further include:
Cluster LVS routing module, for when judging that the first real server breaks down, in actual services handoff procedure In, the business in high availability cluster software detection to the first real server is not present, from the LVS routing table of virtual server It is true to restore the second real server after completing actual services switching for the middle real IP routing for deleting the first real server IP is routed in the LVS routing table of virtual server.
9. such as the system of the described in any item concurrent management servers for being applicable in high availability cluster of claim 6 to 8, feature It is, the system also includes:
Fault type module, for judging described the when judging the runtime server type is the first real server The fault type of one real server judges that the fault type is the true industry for being associated with LVS business in fault type module Business is in application, be then switched to the second real service for the actual services that the first real server is carried by service switching module Device runs the actual services by the second real server;Or the first real server of triggering is restarted automatically;
It, then will by service switching module when fault type module judges the fault type for the fault type of dereferenced LVS The actual services that first real server is carried are switched to the second real server, described true by the operation of the second real server Industry business.
10. being applicable in the system of the concurrent management server of high availability cluster as claimed in claim 9, which is characterized in that institute State system further include:
Fault recovery detection module, for whether having been restored based on the faulty server of high availability cluster software detection, institute Stating server includes virtual server and real server;
The automatic switchback module of fault recovery, for judging that the faulty server restores it in fault recovery detection module Afterwards, service failure recovery is carried out according to the configuration file in high availability cluster software, the LVS business switched before is returned automatically Switch to the first virtual server or the first real server by the automatic switchback of the actual services switched before to after restoring;
Standby host Registration Module is used for after fault recovery detection module judges that the faulty server restores, according to height Configuration file in availability clustered software carries out standby host registration process, by the first real server or the first void after recovery Intend server as the standby host in consequent malfunction treatment mechanism.
CN201610395528.2A 2016-06-04 2016-06-04 A kind of method and system for the concurrent management server being applicable in high availability cluster Active CN105959145B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610395528.2A CN105959145B (en) 2016-06-04 2016-06-04 A kind of method and system for the concurrent management server being applicable in high availability cluster

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610395528.2A CN105959145B (en) 2016-06-04 2016-06-04 A kind of method and system for the concurrent management server being applicable in high availability cluster

Publications (2)

Publication Number Publication Date
CN105959145A CN105959145A (en) 2016-09-21
CN105959145B true CN105959145B (en) 2019-05-17

Family

ID=56907752

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610395528.2A Active CN105959145B (en) 2016-06-04 2016-06-04 A kind of method and system for the concurrent management server being applicable in high availability cluster

Country Status (1)

Country Link
CN (1) CN105959145B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108243030A (en) * 2016-12-23 2018-07-03 航天星图科技(北京)有限公司 A kind of backup server selects management method
CN106850759A (en) * 2016-12-31 2017-06-13 广州勤加缘科技实业有限公司 MySQL database clustering methods and its processing system
CN108965152A (en) * 2017-05-19 2018-12-07 贵州白山云科技有限公司 A kind of cloud resource mixed scheduling method and device
CN109873759A (en) * 2017-12-01 2019-06-11 北京京穗蓝盾信息安全技术有限公司 It is a kind of based on the intelligent double-machine standby technology for singly leading equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102819465A (en) * 2012-06-29 2012-12-12 华中科技大学 Failure recovery method in virtualization environment
CN103152419A (en) * 2013-03-08 2013-06-12 中标软件有限公司 High availability cluster management method for cloud computing platform
CN103559108A (en) * 2013-11-11 2014-02-05 中国科学院信息工程研究所 Method and system for carrying out automatic master and slave failure recovery on the basis of virtualization
CN103701627A (en) * 2012-09-27 2014-04-02 北京搜狐新媒体信息技术有限公司 Cloud computing platform fault detection method, cloud computing platform fault detection method, solving method and solving device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102819465A (en) * 2012-06-29 2012-12-12 华中科技大学 Failure recovery method in virtualization environment
CN103701627A (en) * 2012-09-27 2014-04-02 北京搜狐新媒体信息技术有限公司 Cloud computing platform fault detection method, cloud computing platform fault detection method, solving method and solving device
CN103152419A (en) * 2013-03-08 2013-06-12 中标软件有限公司 High availability cluster management method for cloud computing platform
CN103559108A (en) * 2013-11-11 2014-02-05 中国科学院信息工程研究所 Method and system for carrying out automatic master and slave failure recovery on the basis of virtualization

Also Published As

Publication number Publication date
CN105959145A (en) 2016-09-21

Similar Documents

Publication Publication Date Title
CN105406980B (en) A kind of multinode backup method and device
CN108270726B (en) Application instance deployment method and device
CN108200124B (en) High-availability application program architecture and construction method
CN105959145B (en) A kind of method and system for the concurrent management server being applicable in high availability cluster
CN104794028B (en) A kind of disaster tolerance processing method, device, primary data center and preliminary data center
CN109474465A (en) A kind of method and system of the high availability that can dynamically circulate based on server cluster
WO2017067484A1 (en) Virtualization data center scheduling system and method
CN111158962B (en) Remote disaster recovery method, device and system, electronic equipment and storage medium
CN105159798A (en) Dual-machine hot-standby method for virtual machines, dual-machine hot-standby management server and system
CN103152419A (en) High availability cluster management method for cloud computing platform
EP2224341B1 (en) Node system, server switching method, server device, and data transfer method
CN105554074A (en) NAS resource monitoring system and monitoring method based on RPC communication
CN112948063B (en) Cloud platform creation method and device, cloud platform and cloud platform implementation system
CN105554130A (en) Distributed storage system-based NameNode switching method and switching device
US11768724B2 (en) Data availability in a constrained deployment of a high-availability system in the presence of pending faults
JP4491482B2 (en) Failure recovery method, computer, cluster system, management computer, and failure recovery program
CN103457775A (en) High-availability virtual machine pooling management system based on roles
US10445295B1 (en) Task-based framework for synchronization of event handling between nodes in an active/active data storage system
US8015432B1 (en) Method and apparatus for providing computer failover to a virtualized environment
CN113127270A (en) Cloud computing-based 2-out-of-3 safety computer platform
CN110971662A (en) Two-node high-availability implementation method and device based on Ceph
CN116561096A (en) Database management method and system based on container platform
US7373542B2 (en) Automatic startup of a cluster system after occurrence of a recoverable error
CN111181780A (en) HA cluster-based host pool switching method, system, terminal and storage medium
CN105824571A (en) Data seamless migration method and device

Legal Events

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