Movatterモバイル変換


[0]ホーム

URL:


CN102761428A - Server system and server switching method - Google Patents

Server system and server switching method
Download PDF

Info

Publication number
CN102761428A
CN102761428ACN2011101065743ACN201110106574ACN102761428ACN 102761428 ACN102761428 ACN 102761428ACN 2011101065743 ACN2011101065743 ACN 2011101065743ACN 201110106574 ACN201110106574 ACN 201110106574ACN 102761428 ACN102761428 ACN 102761428A
Authority
CN
China
Prior art keywords
server
address
master
master server
work
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
CN2011101065743A
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.)
Hongfujin Precision Industry Shenzhen Co Ltd
Hon Hai Precision Industry Co Ltd
Original Assignee
Hongfujin Precision Industry Shenzhen Co Ltd
Hon Hai Precision Industry 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 Hongfujin Precision Industry Shenzhen Co Ltd, Hon Hai Precision Industry Co LtdfiledCriticalHongfujin Precision Industry Shenzhen Co Ltd
Priority to CN2011101065743ApriorityCriticalpatent/CN102761428A/en
Publication of CN102761428ApublicationCriticalpatent/CN102761428A/en
Pendinglegal-statusCriticalCurrent

Links

Images

Landscapes

Abstract

Translated fromChinese

本发明提供一种服务器系统及服务器切换方法。服务器系统包括主服务器及从服务器,服务器系统被配置一工作IP地址及一备份IP地址,服务器系统通过工作IP地址与客户端进行通信,该方法包括:初始化服务器系统时,主服务器配置工作IP地址,从服务器配置备份IP地址;以及从服务器在侦测到主服务器出现异常时,发送包括IP地址切换信息的封包至主服务器,请求主服务器与从服务器切换IP地址,主服务器配置备份IP地址,从服务器配置工作IP地址。在主服务器异常切换到从服务器时,主服务器与从服务器的IP地址进行交换,所以客户端仍能通过工作IP地址与从服务器进行通信。如此,主服务器异常时,客户端不会出现业务中断的情况。

Figure 201110106574

The invention provides a server system and a server switching method. The server system includes a master server and a slave server. The server system is configured with a working IP address and a backup IP address. The server system communicates with the client through the working IP address. The method includes: when initializing the server system, the master server configures the working IP address , the slave server configures the backup IP address; and when the slave server detects that the master server is abnormal, it sends a packet including IP address switching information to the master server, requests the master server and the slave server to switch IP addresses, and the master server configures the backup IP address, Configure the working IP address from the server. When the master server is abnormally switched to the slave server, the IP addresses of the master server and the slave server are exchanged, so the client can still communicate with the slave server through the working IP address. In this way, when the master server is abnormal, the client will not experience business interruption.

Figure 201110106574

Description

Translated fromChinese
服务器系统及服务器切换方法Server system and server switching method

技术领域technical field

本发明涉及一种服务器系统,特别涉及一种包括主/从服务器的服务器系统及主/从服务器切换方法。The invention relates to a server system, in particular to a server system including a master/slave server and a master/slave server switching method.

背景技术Background technique

现有的客户端-服务器系统中,主服务器、从服务器配置的IP地址不同,在主服务器出现异常,客户端接入从服务器时,因从服务器的IP地址与主服务器的IP地址不同,客户端需要进行相关的动作例如重新发送请求才能从从服务器获得服务,这在一定程度上给客户端造成了不便。In the existing client-server system, the IP addresses configured by the master server and the slave server are different. When an exception occurs on the master server, when the client accesses the slave server, the IP address of the slave server is different from that of the master server. The end needs to perform related actions such as resending the request to obtain the service from the server, which causes inconvenience to the client to a certain extent.

发明内容Contents of the invention

有鉴于此,本发明提供一种服务器系统及服务器切换方法,以解决上述技术问题。In view of this, the present invention provides a server system and a server switching method to solve the above technical problems.

所述服务器系统包括主服务器及从服务器,所述服务器系统配置一工作IP地址及一备份IP地址,所述服务器系统通过所述工作IP地址与客户端进行通信,初始化所述服务器系统时,所述主服务器配置所述工作IP地址,所述从服务器配置所述备份IP地址,所述从服务器在侦测到所述主服务器出现异常时,发送包括IP地址切换信息的封包至所述主服务器,请求所述主服务器与所述从服务器切换IP地址,所述主服务器配置所述备份IP地址,所述从服务器配置所述工作IP地址。The server system includes a master server and a slave server. The server system is configured with a working IP address and a backup IP address. The server system communicates with the client through the working IP address. When the server system is initialized, the The master server configures the working IP address, the slave server configures the backup IP address, and the slave server sends a packet including IP address switching information to the master server when detecting that the master server is abnormal , requesting the primary server and the secondary server to switch IP addresses, the primary server configuring the backup IP address, and the secondary server configuring the working IP address.

所述服务器切换方法应用于服务器系统,所述服务器系统包括主服务器及从服务器,所述服务器系统配置一工作IP地址及一备份IP地址,所述服务器系统通过所述工作IP地址与客户端进行通信,所述方法包括步骤:初始化所述服务器系统时,所述主服务器配置所述工作IP地址,所述从服务器配置所述备份IP地址;以及所述从服务器在侦测到所述主服务器出现异常时,发送包括IP地址切换信息的封包至所述主服务器,请求所述主服务器与所述从服务器切换IP地址,所述主服务器配置所述备份IP地址,所述从服务器配置所述工作IP地址。The server switching method is applied to a server system, the server system includes a master server and a slave server, the server system is configured with a working IP address and a backup IP address, and the server system communicates with the client through the working IP address Communication, the method includes the steps: when initializing the server system, the main server configures the working IP address, and the slave server configures the backup IP address; and the slave server detects that the master server When an exception occurs, send a packet including IP address switching information to the master server, request the master server and the slave server to switch IP addresses, the master server configures the backup IP address, and the slave server configures the Work IP address.

在本发明中,初始时,客户端通过工作IP地址与主服务器进行通信,在主服务器异常切换到从服务器时,主服务器与从服务器的IP地址进行交换,所以客户端仍能通过工作IP地址与从服务器进行通信。如此,在主服务器出现异常时,客户端不会出现业务中断的情况。In the present invention, initially, the client communicates with the main server through the working IP address. Communicate with the slave server. In this way, when the main server is abnormal, the client will not experience business interruption.

附图说明Description of drawings

图1为本发明一种实施方式中服务器系统的功能模块图。FIG. 1 is a functional block diagram of a server system in an embodiment of the present invention.

图2为本发明一种实施方式中服务器切换方法的流程图。Fig. 2 is a flowchart of a server switching method in an embodiment of the present invention.

主要元件符号说明Description of main component symbols

  服务器系统server system  100100  主服务器main server  1010  从服务器from the server  2020  客户端client  200200

如下具体实施方式将结合上述附图进一步说明本发明。The following specific embodiments will further illustrate the present invention in conjunction with the above-mentioned drawings.

具体实施方式Detailed ways

请参考图1,本实施方式中的服务器系统100包括通过IP网络与客户端200(未示出)连接的执行相同的服务的主服务器10及从服务器20。主服务器10及从服务器20与交换机(未示出)连接。服务器系统100配置一工作IP地址及一备份IP地址。在本实施方式中,一个或多个客户端通过工作IP地址与服务器系统100建立通信连接。初始时,主服务器10配置工作IP地址,从服务器20配置备份IP地址。在主服务器10出现异常时,从服务器20发送包含IP地址切换信息的封包至主服务器10,请求主服务器10与从服务器20切换IP地址,主服务器10配置备份IP地址,从服务器20配置工作IP地址。在主服务器10配置工作IP地址从服务器20配置备份地址后,或在从服务器20配置工作IP地址主服务器10配置备份IP地址后,配置工作IP地址的主服务器10或从服务器20发送包含工作IP地址的GARP(Generic Attribute Register Protocol,GARP)封包至网络以查询工作IP地址是否发生冲突,并更新交换机中的MAC表。Referring to FIG. 1 , theserver system 100 in this embodiment includes amaster server 10 and a slave server 20 connected to a client 200 (not shown) through an IP network and performing the same service. Themaster server 10 and the slave server 20 are connected to a switch (not shown). Theserver system 100 is configured with a working IP address and a backup IP address. In this embodiment, one or more clients establish a communication connection with theserver system 100 through the working IP address. Initially, themaster server 10 is configured with a working IP address, and the slave server 20 is configured with a backup IP address. When themaster server 10 is abnormal, the slave server 20 sends a packet containing IP address switching information to themaster server 10, requesting themaster server 10 and the slave server 20 to switch IP addresses, themaster server 10 is configured with a backup IP address, and the slave server 20 is configured with a working IP address. After themain server 10 configures the working IP address and the secondary server 20 configures the backup address, or after the secondary server 20 configures the working IP address and themain server 10 configures the backup IP address, themain server 10 or the secondary server 20 that configures the working IP address sends a message containing the working IP The GARP (Generic Attribute Register Protocol, GARP) packet of the address is sent to the network to check whether the working IP address conflicts, and to update the MAC table in the switch.

主服务器10在配置工作IP地址并在工作IP地址发生冲突时,继续发送GARP封包查询工作IP地址是否发生冲突。主服务器10在配置工作IP地址并在工作IP地址没有发生冲突时,进入工作状态,对客户端200发送的请求进行应答,同时定期发送通告包,通知配置备份IP地址的从服务器20自身工作正常。同时从服务器20进入备份状态,只接收主服务器10发送的通告包,不处理其他协议包。当从服务器20在一预定时间内没有接收到主服务器10发送的通告包时,判定主服务器10出现异常,同步客户端200向主服务器10发送的请求,发送包含IP地址切换信息的封包至主服务器10,请求主服务器10与从服务器20切换IP地址,主服务器10配置备份IP地址,从服务器20配置工作IP地址。因为从服务器20在主服务器10出现异常时同步客户端200向主服务器10发送的请求,所以从服务器20在配置工作IP地址进入工作状态后能够同步响应客户端200的请求。从服务器20在配置工作IP地址并且工作IP地址没有发生冲突时,进入工作状态,为客户端200提供服务。从服务器20在进入工作状态后定期发送通告包至主服务器10,以检测主服务器10是否恢复正常。从服务器20在连续几次接收到主服务器10发送的响应包时,判定主服务器10恢复正常,停止向客户端200提供服务。主服务器10在恢复正常后,同步客户端200向从服务器10发送的请求,发送包含IP地址切换信息的GARP封包至从服务器20,请求从服务器20与主服务器10切换IP地址,主服务器10配置工作IP地址,从服务器20配置备份IP地址。When themain server 10 configures the working IP address and when the working IP address conflicts, it continues to send GARP packets to inquire whether the working IP address conflicts. When themaster server 10 is configured with a working IP address and there is no conflict in the working IP address, it enters the working state, responds to the request sent by theclient 200, and periodically sends a notification packet to notify the slave server 20 of configuring the backup IP address to work normally . At the same time, the slave server 20 enters the backup state, and only receives the notification packet sent by themaster server 10, and does not process other protocol packets. When the slave server 20 does not receive the notification packet sent by themaster server 10 within a predetermined time, it is determined that themaster server 10 is abnormal, and the request sent by thesynchronization client 200 to themaster server 10 sends a packet containing IP address switching information to the master. Theserver 10 requests themaster server 10 and the slave server 20 to switch IP addresses, themaster server 10 is configured with a backup IP address, and the slave server 20 is configured with a working IP address. Because the slave server 20 synchronizes the request sent by theclient 200 to themaster server 10 when themaster server 10 is abnormal, the slave server 20 can synchronously respond to the request of theclient 200 after configuring the working IP address to enter the working state. When the slave server 20 is configured with a working IP address and there is no conflict in the working IP address, it enters the working state to provide services for theclient 200 . After entering the working state, the slave server 20 periodically sends notification packets to themaster server 10 to detect whether themaster server 10 returns to normal. When the slave server 20 receives the response packets sent by themaster server 10 several times in succession, it determines that themaster server 10 is back to normal, and stops providing services to theclient 200 . After themaster server 10 returns to normal, thesynchronization client 200 sends a request to theslave server 10, sends a GARP packet containing IP address switching information to the slave server 20, and requests the slave server 20 and themaster server 10 to switch the IP address, and themaster server 10 configures Work IP address, configure backup IP address from server 20.

在本实施方式中,初始时,客户端200通过工作IP地址与主服务器10进行通信,在主服务器10异常切换到从服务器20时,主服务器10与从服务器20的IP地址进行交换,所以客户端200仍能通过工作IP地址与从服务器20进行通信。如此,在主服务器10出现异常时,客户端200不会出现业务中断的情况。In this embodiment, initially, theclient 200 communicates with themaster server 10 through the working IP address, and when themaster server 10 switches to the slave server 20 abnormally, the IP addresses of themaster server 10 and the slave server 20 are exchanged, so the client Theterminal 200 can still communicate with the slave server 20 through the working IP address. In this way, when themain server 10 is abnormal, theclient 200 will not experience service interruption.

图2为本发明一种实施方式中服务器切换方法的流程图。Fig. 2 is a flowchart of a server switching method in an embodiment of the present invention.

步骤S201中,主服务器10配置工作IP地址,从服务器20配置备份IP地址。In step S201 , themaster server 10 configures a working IP address, and the slave server 20 configures a backup IP address.

步骤S202中,主服务器10在工作IP地址没有发生冲突时进入工作状态,为客户端200提供服务,从服务器20进入备份状态。In step S202, themain server 10 enters the working state when there is no conflict in the working IP address, provides services for theclient 200, and the slave server 20 enters the backup state.

步骤S203中,主服务器10在工作状态下定期发送通告包至从服务器20,通知从服务器20自身工作正常。In step S203 , themaster server 10 regularly sends a notification packet to the slave server 20 in the working state, notifying the slave server 20 that it is working normally.

步骤S204中,从服务器20在预定时间内没有接收到主服务器10发送的通告包时,判定主服务器10出现异常。In step S204, when the slave server 20 does not receive the notification packet sent by themaster server 10 within a predetermined time, it is determined that themaster server 10 is abnormal.

步骤S205中,从服务器20在判定主服务器10出现异常时,同步客户端200向主服务器10发送的请求,发送包含IP地址切换信息的封包至主服务器10,请求主服务器10与从服务器20切换IP地址,主服务器10配置备份IP地址,从服务器20配置工作IP地址,并发送包含IP地址的GARP封包更新交换机中的MAC表。In step S205, when the slave server 20 determines that themaster server 10 is abnormal, it synchronizes the request sent by theclient 200 to themaster server 10, sends a packet containing IP address switching information to themaster server 10, and requests themaster server 10 and the slave server 20 to switch IP address, themaster server 10 configures a backup IP address, and the slave server 20 configures a working IP address, and sends a GARP packet including the IP address to update the MAC table in the switch.

步骤S206中,从服务器20在工作IP地址没有发生冲突时进入工作状态,为客户端20提供服务。In step S206 , the slave server 20 enters the working state when there is no conflict in the working IP address, and provides services for the client 20 .

步骤S207中,从服务器20在工作状态下定期发送通告包至主服务器10,以检测主服务器10是否恢复到正常。In step S207, the slave server 20 regularly sends notification packets to themaster server 10 in the working state, so as to detect whether themaster server 10 is back to normal.

步骤S208中,从服务器20在连续几次接收到主服务器10发送的响应包时,判定主服务器10恢复到正常,从服务器20停止为客户端200提供服务,从工作状态进入备份状态。In step S208, when the slave server 20 receives the response packets sent by themaster server 10 several times in succession, it determines that themaster server 10 is back to normal, the slave server 20 stops providing services for theclient 200, and enters the backup state from the working state.

步骤S209中,主服务器10在恢复到正常时,同步客户端200向从服务器20发送的请求,发送包含IP地址切换信息的封包至从服务器20,请求从服务器20与主服务器20切换IP地址,主服务器10配置工作IP地址,从服务器20配置备份IP地址,并发送包含IP地址的GARP封包更新交换机中的MAC表。执行完步骤S209后,流程返回至步骤S202。In step S209, when themaster server 10 returns to normal, the request sent by thesynchronization client 200 to the slave server 20 sends a packet including IP address switching information to the slave server 20, and requests the slave server 20 and the master server 20 to switch IP addresses, Themaster server 10 configures a working IP address, and the slave server 20 configures a backup IP address, and sends a GARP packet containing the IP address to update the MAC table in the switch. After step S209 is executed, the process returns to step S202.

Claims (12)

CN2011101065743A2011-04-272011-04-27Server system and server switching methodPendingCN102761428A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN2011101065743ACN102761428A (en)2011-04-272011-04-27Server system and server switching method

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN2011101065743ACN102761428A (en)2011-04-272011-04-27Server system and server switching method

Publications (1)

Publication NumberPublication Date
CN102761428Atrue CN102761428A (en)2012-10-31

Family

ID=47055755

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN2011101065743APendingCN102761428A (en)2011-04-272011-04-27Server system and server switching method

Country Status (1)

CountryLink
CN (1)CN102761428A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN103346903A (en)*2013-06-202013-10-09北京捷成世纪科技股份有限公司Dual-machine backup method and device
CN104468221A (en)*2014-12-122015-03-25北京国双科技有限公司Server fault hot-switching method, device and system
CN106453614A (en)*2016-11-112017-02-22郑州云海信息技术有限公司Cloud operation system and access method thereof
CN107707611A (en)*2017-08-092018-02-16南方电网科学研究院有限责任公司Electric power data cloud processing method, device and system
CN108429644A (en)*2018-02-282018-08-21新华三技术有限公司network device management method, device and server
CN112882871A (en)*2021-04-292021-06-01深圳市科力锐科技有限公司Host conflict detection method, device, equipment and storage medium
CN113472900A (en)*2021-09-012021-10-01阿里云计算有限公司Message processing method, device, storage medium and computer program product

Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US6658251B1 (en)*1998-07-302003-12-02Samsung Electronics Co., Ltd.Method and apparatus for designating WAP server address for wireless communication terminal
CN1851657A (en)*2005-07-212006-10-25上海华为技术有限公司Dual-machine back-up realizing method and system
CN101873223A (en)*2010-05-272010-10-27天讯瑞达通信技术有限公司N+M service backup mechanism based on IP switching

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US6658251B1 (en)*1998-07-302003-12-02Samsung Electronics Co., Ltd.Method and apparatus for designating WAP server address for wireless communication terminal
CN1851657A (en)*2005-07-212006-10-25上海华为技术有限公司Dual-machine back-up realizing method and system
CN101873223A (en)*2010-05-272010-10-27天讯瑞达通信技术有限公司N+M service backup mechanism based on IP switching

Cited By (12)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN103346903A (en)*2013-06-202013-10-09北京捷成世纪科技股份有限公司Dual-machine backup method and device
CN103346903B (en)*2013-06-202017-02-15北京捷成世纪科技股份有限公司Dual-machine backup method and device
CN104468221A (en)*2014-12-122015-03-25北京国双科技有限公司Server fault hot-switching method, device and system
CN106453614A (en)*2016-11-112017-02-22郑州云海信息技术有限公司Cloud operation system and access method thereof
CN106453614B (en)*2016-11-112019-06-18郑州云海信息技术有限公司 A cloud operating system and its access method
CN107707611A (en)*2017-08-092018-02-16南方电网科学研究院有限责任公司Electric power data cloud processing method, device and system
CN107707611B (en)*2017-08-092020-11-03南方电网科学研究院有限责任公司 Power data cloud processing method, device and system
CN108429644A (en)*2018-02-282018-08-21新华三技术有限公司network device management method, device and server
CN108429644B (en)*2018-02-282021-08-06新华三技术有限公司Network equipment management method and device and server
CN112882871A (en)*2021-04-292021-06-01深圳市科力锐科技有限公司Host conflict detection method, device, equipment and storage medium
CN112882871B (en)*2021-04-292021-08-24深圳市科力锐科技有限公司Host conflict detection method, device, equipment and storage medium
CN113472900A (en)*2021-09-012021-10-01阿里云计算有限公司Message processing method, device, storage medium and computer program product

Similar Documents

PublicationPublication DateTitle
CN102404146B (en)Master-slave switching method, network device and DHCP server
CN102761428A (en)Server system and server switching method
CN102098201B (en)Method for realizing L2TP user access backup and network system
CN101094102B (en) Active-standby switching method of routing equipment and routing backup system
KR101591102B1 (en)Method for router of virtual router redundancy protocol and communication system therefor
CN113328894B (en) Method and device for dual-machine hot backup based on CU separation
CN105453487A (en)Extending virtual station interface discovery protocol (VDP) and VDP-like protocols for dual-homed deployments in data center environments
CN106487578A (en)Error recovery method, and Internet of things system and charging system applying same
WO2009023996A1 (en)Method for implementing network interconnect via link aggregation
EP2597821B1 (en)Method and system for auto-configuration, and network node
CN105119822A (en)Backup group management method and system based on VRRP (Virtual Router Redundancy Protocol)
WO2011147312A1 (en)Method, device and system for port backup of service access router
CN108075971A (en)A kind of main/standby switching method and device
EP2733907B1 (en)Method, local gateway, and system for local voice survivability
CN101656764A (en)Method, system and device for keeping session of DHCP user active
CN107769984B (en)Low-cost active/standby hot switching system and method based on gateway
CN102075343A (en)An out-of-band management realization method, a system for the same and an out-of-band management switch
CN101110776A (en) Backup method, backup device and backup system for data service
CN105340226A (en)Primary and secondary system handover method for dynamic route device, and apparatus thereof
CN104202204B (en)Clock synchronization control method, apparatus and system based on SNTP
CN1859423B (en) A method for synchronous switching of host and forwarding device
JP2013046176A (en)Communication system, router device, and router switchover method
JP5974911B2 (en) Communication system and network relay device
CN101453395A (en)Switching method, system and device for uplink mode
CN104935614A (en) A data transmission method and device

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
C10Entry into substantive examination
SE01Entry into force of request for substantive examination
C12Rejection of a patent application after its publication
RJ01Rejection of invention patent application after publication

Application publication date:20121031


[8]ページ先頭

©2009-2025 Movatter.jp