CN103731290A - Server failure switching method - Google Patents

Server failure switching method Download PDF

Info

Publication number
CN103731290A
CN103731290A CN201210393053.5A CN201210393053A CN103731290A CN 103731290 A CN103731290 A CN 103731290A CN 201210393053 A CN201210393053 A CN 201210393053A CN 103731290 A CN103731290 A CN 103731290A
Authority
CN
China
Prior art keywords
server
pond
client
pools
name
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
CN201210393053.5A
Other languages
Chinese (zh)
Inventor
张焰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
WUXI YUNJIE TECHNOLOGY Co Ltd
Original Assignee
WUXI YUNJIE 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 WUXI YUNJIE TECHNOLOGY Co Ltd filed Critical WUXI YUNJIE TECHNOLOGY Co Ltd
Priority to CN201210393053.5A priority Critical patent/CN103731290A/en
Publication of CN103731290A publication Critical patent/CN103731290A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Computer And Data Communications (AREA)

Abstract

The invention provides a server failure switching method. The method comprises the steps that a client side accesses a server pool through a pool name, pool name analysis is conducted in the server pool, and after receiving a pool name analyzing request sent by the client side, a pooled device can search in a server list stored by the pooled devcie, selects an effective and normally-running server according to a pre-determined strategy, and then sends the IP address of the server to the client side sending the analysis request; after finishing the pool name analysis, the client side accesses the server directly and conducts data exchange according to IP address, of the server, obtained through analysis; if the server fails in the data exchange, the client side obtains a mistake message from a transmission layer, thus, the client side can obtain that the server fails, at the moment, the client side enters a failure switching mode, conducts pool name analysis again in the pooled device to obtain the IP address of a next normally-running server and then establishes connection with the new server directly, so that server switching is realized.

Description

A kind of server failure changing method
[technical field]
The invention relates to web server computer field, particularly about the technical field of webserver failover.
[background technology]
Under typical server-client pattern, server is determined its position by DNS domain name, and client application system must be resolved its domain name by using DNS to serve before access services device, thereby obtains the IP address of this server.After client-server connects, just can carry out information exchange; If this server breaks down, client application system has two kinds of possible selections: 1. interrupt communication; 2. select another server to continue.
Under this pattern, whether client application system must detect in the following manner server and interrupt:
(1) not response (time out) of server;
(2) server response error message;
(3) receive transport layer error message;
In order to allow client applications have the possibility of selecting other server after detecting server and breaking down, a server list must be clearly provided in its application program, indicate: first server, second server, the 3rd ... etc.When first server interrupts, trial and second server connect, moreover the 3rd, the rest may be inferred.
That is to say, this failover process is realized by the interference of user program, has larger limitation:
One, server list are static, must have user to specialize;
Two, the selection of alternative server has larger blindness, cannot guarantee that whether selected server is normal and effective, can not select flexibly because of the loading condition of server;
Three, taking over is to realize by application program, lacks the transparency;
Four, passive interruption RM;
Five,, for meeting the assurance of reliability, application development amount is larger.
Because necessary, prior art is improved.
[summary of the invention]
The object of the invention is to the deficiency for traditional fail-over mode, proposition realizes the fail-over mode of all-transparent under server pools framework, user is without any intervention, only need to after server failure occurs, carry out a pond name analysis and just can obtain new normal server, and re-start connection, and from the convenient and swift process that completes failover.
For reaching aforementioned object, a kind of server failure changing method of the present invention, it comprises:
Client is by name access services device pond, pond, first at device place, pond, carry out pond name analysis, pond device is received after the pond name analysis request that client sends, in the server list that can preserve at self, search, and according to server effectively normally moving of predetermined policy selection, then the IP address of this server is sent to the client of sending analysis request;
Client completes after the name analysis of pond, the server ip address then obtaining according to parsing, and direct access services device, and carry out data interaction;
If this server breaks down in exchanges data, client obtains an error message from transport layer, client can know that server end breaks down thus, at this moment, client enters fail-over mode, and client is done pond name analysis one time at device place, pond again, obtains the server ip address of next normal operation, then direct and new server connects, and completes failover process.
According to one embodiment of present invention, server pools system of the present invention is comprised of following three parts:
Server pools: server pools has identical function by one group, and be unified the server composition that management is got up, each server pools is all used unique pond name as sign;
Pond device: be the management equipment of server pools, be responsible for multiple servers to form a virtual server pools, and the running status of each station server is monitored in real time and gathered; Provide pond name analysis function, to can allow user facilitate accessing server simultaneously;
Client: the client computer in access services device pond.
According to one embodiment of present invention, described server pools adopts enrollment mechanism, require server when starting, to need initiatively at device place, pond, to register, in the device of pond, after startup of server, first by sending registration message to pond device, register arbitrarily, wherein in this registration message, include self relevant information of service, comprising: pond name, unique service identifier, server ip address, serve port, service agreement, service detection.
According to one embodiment of present invention, described server pools adopts fault detection mechanism: in server pools system, the register information of pond device server is responsible for server to carry out periodic health-and-status check, once discovery server fault, pond device is deleted this server at once from server pools.
According to one embodiment of present invention, described server pools adopts pond device information synchronization mechanism: pond device finds that certain server breaks down, can in own server list of preserving, this server be deleted at once, by other all ponds these servers of device of server update message informing, break down simultaneously, after other pond devices are notified, also at once this server is deleted from the server list of its preservation, guaranteed like this in server list it is all the server of normal operation, and the consistency of all ponds device information.
According to one embodiment of present invention,: described server pools adopts Hua Qi pond, pond name analysis mechanism: client-access server pools, first at device place, pond, do pond name analysis, the analysis request that pond device is submitted to according to client, in the server list of oneself, inquire about, conventionally each pond name corresponding a plurality of servers, pond device is according to the selection strategy determining in advance, for this user selects a best server ip, and this result is fed back to client to resolve the form of receiveing the response.
The advantage of this failure switching method of the present invention is simple transparent, without in server list of client maintenance, only needs at Chi Huaqi, to do pond name analysis simply at any time.Server increases minimizing or changes all and do any change without notice client simultaneously.User has been realized to transparence completely.
[accompanying drawing explanation]
Fig. 1 is the structural representation of server pools system of the present invention.
Fig. 2 is registration message form schematic diagram of the present invention.
Fig. 3 is name parameter format schematic diagram in pond in registration message form of the present invention.
Fig. 4 is server parameter form schematic diagram in registration message form of the present invention.
Fig. 5 is the registration of the present invention form schematic diagram of receiveing the response.
Fig. 6 is continuously active message format schematic diagram of the present invention.
Fig. 7 is the form schematic diagram of system parameters in continuously active message format of the present invention.
Fig. 8 is continuously active acknowledge message form schematic diagram of the present invention.
Fig. 9 is server update message format schematic diagram of the present invention.
Figure 10 is server switching method flow chart of the present invention.
[embodiment]
Alleged " embodiment " or " embodiment " refers to special characteristic, structure or the characteristic that can be contained at least one implementation of the present invention herein.Different local in this manual " in one embodiment " that occur not all refer to same embodiment, neither be independent or the embodiment mutually exclusive with other embodiment optionally.
Under existing server-client pattern, server is determined its position by DNS domain name, and client application system must be resolved its domain name by using DNS to serve before access services device, thereby obtains the IP address of this server.After client-server connects, just can carry out information exchange.The method of failover of the present invention must be based upon under server pools framework can bring into play its function, the core concept of server pools is to allow a certain service be provided by a plurality of redundant servers simultaneously, and the set of all these servers is called as a server pools.That is to say: service is that the integral body by a server pools provides, and server is distributed, all has IP address separately.When one of them server can not continue to provide service because of fault, can in being present in server pools, continue to provide by another normal server moving.Shown in its system schematic Fig. 1, server pools system of the present invention is comprised of following three parts:
Server pools: server pools has identical function by one group, and be unified the server composition that management is got up, each server pools is all used unique pond name as sign;
Pond device: be the management equipment of server pools, be responsible for multiple servers to form a virtual server pools, and the running status of each station server is monitored in real time and gathered; Provide pond name analysis function, to can allow user facilitate accessing server simultaneously;
Client: the client computer in access services device pond.
Wherein server pools system of the present invention adopts several working mechanisms below:
The enrollment mechanism of server pools: require server to need initiatively to register at device place, pond when starting, refer to shown in Fig. 2, Fig. 3 and Fig. 4, it shows respectively registration (registration) message format in one embodiment of the invention, pond name parameter format, server parameter form.In the device of pond, after startup of server, first by sending registration message registration to pond device, register arbitrarily, the relevant information that wherein includes service self in this registration message, comprise: pond name, unique service identifier, server ip address (can be a plurality of, depending on the network interface card quantity of server), serve port, service agreement (tcp, udp, ftp, http etc.).
Pond device is received after registration message, to register the registration_response of receiveing the response, reply at once, and information is wherein sorted out and is kept in server list, this information content is sent to other pond devices by server update message Server_Update simultaneously, can guarantee that so all Chi Huaqi have identical a server list.Refer to shown in Fig. 5, it shows that in one embodiment of the present of invention, (registration_response) message format is responded in registration.
Server, after completing first registration, will be thought highly of recurrence with regular time interval afterwards and give this registration message to pond.Pond device is received registration message at every turn, all will upgrade the server list (Server List) of oneself preserving, and passes through server update message Server_Update to other pond device generation lastest imformations simultaneously.
The fault detection mechanism of pond device: in server pools system, the register information of pond device server is responsible for server to carry out periodic health-and-status check, once discovery server fault, pond device is deleted this server at once from server pools, and this mechanism of Chi Huaqi can guarantee that in server pools, Servers-all is all effective, available.
Concrete process is: pond device every one regular time interval to this server, send continuously active message Keep_Alive.Refer to shown in Fig. 6 and Fig. 7, it shows respectively and in one embodiment of the present of invention, keeps the form of alive messages and keep the form that in alive messages, system parameters is described.
Server is received after continuously active message Keep_Alive, replies to Chi Huaqi at once with continuously active acknowledge message Keep_Alive_Ack.Refer to shown in Fig. 8, it shows the form of continuously active acknowledge message of the present invention.In continuously active acknowledge message Keep_Alive_Ack, server has attached the correlation behavior information (such as CPU usage, network usage, memory usage, hard disk utilization rate etc.) of self.Pond device can be known the real-time system situation of server like this, and can be with reference to the situation as according to judgement server.In some cases, although server operation is all normal, but because resource is close to approach exhaustion, such as CPU usage, network usage, memory usage, hard disk utilization rate etc., surpass predetermined value, continue operation and may cause larger problem, this situation, pond device can be predicted in advance, can be failed server by this Servers installed.
If the continuously active message Keep_Alive that pond device sends, in setting-up time (timeout), do not receive continuously active acknowledge message Keep_Alive_Ack, send continuously rapidly several continuously active message Keep_Alive, if still do not receive continuously active acknowledge message Keep_Alive_Ack, can determining server break down, this fault may have multiple may: server delay machine, software fault, network failure etc., in a word in this case, user is the service that cannot use this server certainly.
Pond device information is synchronous: pond device finds that certain server breaks down, can in own server list of preserving, this server be deleted at once, by server update message (Server_Update), notify other all ponds these servers of device to break down simultaneously, after other pond devices are notified, also at once this server is deleted from the server list of its preservation.Guaranteed like this in server list it is all the server of normal operation, and the consistency of all ponds device information.Refer to shown in Fig. 9, it shows the form of server update message in one embodiment of the present of invention, wherein in this server update message wherein more new element (Update Action) be defined as follows:
Update Action=0x1 increases service;
Update Action=0x2 deletes service.
Hua Qi pond, pond name analysis mechanism: client-access server pools, first at device place, pond, do pond name analysis, the analysis request that pond device is submitted to according to client, in the server list of oneself, inquire about, conventionally each pond name corresponding a plurality of servers, pond device, according to the selection strategy determining in advance, for this user selects a best server ip, and feeds back to client by this result to resolve the form of receiveing the response.
Characteristic based on this server pools, can realize a kind of method that completely transparent effective server failure switches, and refers to shown in Figure 10, and its concrete steps are as follows:
Step S1: certain user is by name access services device pond, pond, need first at device place, pond, to carry out pond name analysis, pond device is received after the pond name analysis request that user's (client) sends, in the server list that can preserve at self, search, and according to server effectively normally moving of predetermined policy selection, then the IP address of this server is sent to the user who sends analysis request.Because the information between the device of all ponds is real-time synchronization, so no matter user resolves on which platform pond device, can obtain same analysis result.
Step S2: client completes after the name analysis of pond, the server ip address then obtaining according to parsing, direct access services device, and carry out data interaction.
Step S3: if this server breaks down in exchanges data, client obtains an error message from transport layer (Transport Layer), client can know that server end breaks down thus, at this moment, client enters fail-over mode, client only needs again at device place, pond, to do pond name analysis one time, just can obtain the server ip address of next normal operation, then direct and new server connects, and so simple and quick failover process has just completed.
The advantage of this failure switching method is simple transparent, without in server list of client maintenance, only needs at Chi Huaqi, to do pond name analysis simply at any time.
Server increases minimizing or changes all and do any change without notice client simultaneously.User has been realized to transparence completely.
Above-mentioned explanation has fully disclosed the specific embodiment of the present invention.It is pointed out that being familiar with any change that person skilled in art does the specific embodiment of the present invention does not all depart from the scope of claims of the present invention.Correspondingly, the scope of claim of the present invention is also not limited only to previous embodiment.

Claims (6)

1. a server failure changing method, it comprises:
Client is by name access services device pond, pond, first at device place, pond, carry out pond name analysis, pond device is received after the pond name analysis request that client sends, in the server list that can preserve at self, search, and according to server effectively normally moving of predetermined policy selection, then the IP address of this server is sent to the client of sending analysis request;
Client completes after the name analysis of pond, the server ip address then obtaining according to parsing, and direct access services device, and carry out data interaction;
If this server breaks down in exchanges data, client obtains an error message from transport layer, client can know that server end breaks down thus, at this moment, client enters fail-over mode, and client is done pond name analysis one time at device place, pond again, obtains the server ip address of next normal operation, then direct and new server connects, and completes failover process.
2. the method for claim 1, is characterized in that: server pools system of the present invention is comprised of following three parts:
Server pools: server pools has identical function by one group, and be unified the server composition that management is got up, each server pools is all used unique pond name as sign;
Pond device: be the management equipment of server pools, be responsible for multiple servers to form a virtual server pools, and the running status of each station server is monitored in real time and gathered; Provide pond name analysis function, to can allow user facilitate accessing server simultaneously;
Client: the client computer in access services device pond.
3. the method for claim 1, it is characterized in that: described server pools adopts enrollment mechanism, require server when starting, to need initiatively at device place, pond, to register, in the device of pond, after startup of server, first by sending registration message to pond device, register arbitrarily, wherein in this registration message, include self relevant information of service, comprising: pond name, unique service identifier, server ip address, serve port, service agreement, service detection.
4. the method for claim 1, it is characterized in that: described server pools adopts fault detection mechanism: in server pools system, the register information of pond device server is responsible for server to carry out periodic health-and-status check, once discovery server fault, pond device is deleted this server at once from server pools.
5. the method for claim 1, it is characterized in that: described server pools adopts pond device information synchronization mechanism: pond device finds that certain server breaks down, can in own server list of preserving, this server be deleted at once, by other all ponds these servers of device of server update message informing, break down simultaneously, after other pond devices are notified, also at once this server is deleted from the server list of its preservation, guaranteed like this in server list it is all the server of normal operation, and the consistency of all ponds device information.
6. the method for claim 1, it is characterized in that: described server pools adopts Hua Qi pond, pond name analysis mechanism: client-access server pools, first at device place, pond, do pond name analysis, the analysis request that pond device is submitted to according to client, in the server list of oneself, inquire about, conventionally each pond name corresponding a plurality of servers, pond device is according to the selection strategy determining in advance, for this user selects a best server ip, and this result is fed back to client to resolve the form of receiveing the response.
CN201210393053.5A 2012-10-16 2012-10-16 Server failure switching method Pending CN103731290A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210393053.5A CN103731290A (en) 2012-10-16 2012-10-16 Server failure switching method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210393053.5A CN103731290A (en) 2012-10-16 2012-10-16 Server failure switching method

Publications (1)

Publication Number Publication Date
CN103731290A true CN103731290A (en) 2014-04-16

Family

ID=50455225

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210393053.5A Pending CN103731290A (en) 2012-10-16 2012-10-16 Server failure switching method

Country Status (1)

Country Link
CN (1) CN103731290A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104363201A (en) * 2014-10-11 2015-02-18 中国农业银行股份有限公司 Server operation alteration method and server operation alteration system
CN104836689A (en) * 2015-05-21 2015-08-12 武汉新芯集成电路制造有限公司 Server fault transfer method and system
CN106953736A (en) * 2016-01-07 2017-07-14 阿里巴巴集团控股有限公司 Failure switching method and device
CN109766192A (en) * 2019-01-25 2019-05-17 郑州云海信息技术有限公司 A kind of dispatching method and scheduling system of virtualized server
CN110086893A (en) * 2019-04-04 2019-08-02 平安科技(深圳)有限公司 Domain name analytic method, device and computer readable storage medium
CN110289940A (en) * 2019-06-12 2019-09-27 四川商通实业有限公司 Orient the method that payment client terminal automatically switches server
CN116708459A (en) * 2023-07-20 2023-09-05 广州东瑞科技有限公司 Service access automatic switching method, system, computer equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090157419A1 (en) * 2007-09-28 2009-06-18 Great-Circle Technologies, Inc. Contextual execution of automated workflows
CN102437933A (en) * 2012-01-04 2012-05-02 无锡云捷科技有限公司 Fault tolerance system and method of server
CN102638396A (en) * 2012-03-21 2012-08-15 华为技术有限公司 Load balancing method and device
CN102685782A (en) * 2011-03-14 2012-09-19 中国移动通信集团公司 Distributed type base station system and load balancing method thereof

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090157419A1 (en) * 2007-09-28 2009-06-18 Great-Circle Technologies, Inc. Contextual execution of automated workflows
CN102685782A (en) * 2011-03-14 2012-09-19 中国移动通信集团公司 Distributed type base station system and load balancing method thereof
CN102437933A (en) * 2012-01-04 2012-05-02 无锡云捷科技有限公司 Fault tolerance system and method of server
CN102638396A (en) * 2012-03-21 2012-08-15 华为技术有限公司 Load balancing method and device

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104363201A (en) * 2014-10-11 2015-02-18 中国农业银行股份有限公司 Server operation alteration method and server operation alteration system
CN104363201B (en) * 2014-10-11 2017-10-20 中国农业银行股份有限公司 A kind of server operation variation and system
CN104836689A (en) * 2015-05-21 2015-08-12 武汉新芯集成电路制造有限公司 Server fault transfer method and system
CN106953736A (en) * 2016-01-07 2017-07-14 阿里巴巴集团控股有限公司 Failure switching method and device
CN106953736B (en) * 2016-01-07 2020-02-18 阿里巴巴集团控股有限公司 Fault switching method and device
CN109766192A (en) * 2019-01-25 2019-05-17 郑州云海信息技术有限公司 A kind of dispatching method and scheduling system of virtualized server
CN110086893A (en) * 2019-04-04 2019-08-02 平安科技(深圳)有限公司 Domain name analytic method, device and computer readable storage medium
CN110289940A (en) * 2019-06-12 2019-09-27 四川商通实业有限公司 Orient the method that payment client terminal automatically switches server
CN116708459A (en) * 2023-07-20 2023-09-05 广州东瑞科技有限公司 Service access automatic switching method, system, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN103731290A (en) Server failure switching method
US11677860B2 (en) Decentralization processing method, communication proxy, host, and storage medium
US8909758B2 (en) Physical server discovery and correlation
US9116749B2 (en) Method for dynamic on demand startup of a process or resource
CN106302565B (en) Scheduling method and system of service server
CN106790758B (en) Method and device for accessing network object in NAT network
TWI736657B (en) Method and device for switching virtual internet protocol address
US20130007253A1 (en) Method, system and corresponding device for load balancing
EP3806395B1 (en) Virtual network function (vnf) deployment method and apparatus
CN112015544A (en) Load balancing method, device and equipment of k8s cluster and storage medium
CN103581276A (en) Cluster management device and system, service client side and corresponding method
CN113489691B (en) Network access method, network access device, computer readable medium and electronic equipment
CN102437933A (en) Fault tolerance system and method of server
CN103731287A (en) Method for selecting server to take over fault server
CN100461719C (en) System and method for detecting service healthiness
US20170293537A1 (en) Management system for virtual machine failure detection and recovery
CN103731289A (en) Method for automatic expansion of network server
CN112256498A (en) Fault processing method and device
CN103731291A (en) Data transmission structure and program development method of network server pool system
CN105306566A (en) Method and system for electing master control node in cloud storage system
CN103731315A (en) Server failure detecting method
CN106464541B (en) Fault handling method and equipment based on network function virtualization
CN103731365A (en) Bottleneck-free load balancing network server system and establishment method thereof
CN104144064A (en) Server fault detection and switchover method
CN103731460A (en) Pooling device for establishing network server pool

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20140416

WD01 Invention patent application deemed withdrawn after publication