JP4550867B2 - TCP session switching apparatus and method, program, and recording medium - Google Patents

TCP session switching apparatus and method, program, and recording medium Download PDF

Info

Publication number
JP4550867B2
JP4550867B2 JP2007178234A JP2007178234A JP4550867B2 JP 4550867 B2 JP4550867 B2 JP 4550867B2 JP 2007178234 A JP2007178234 A JP 2007178234A JP 2007178234 A JP2007178234 A JP 2007178234A JP 4550867 B2 JP4550867 B2 JP 4550867B2
Authority
JP
Japan
Prior art keywords
unit
server
active
packet
standby
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
JP2007178234A
Other languages
Japanese (ja)
Other versions
JP2009017344A (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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2007178234A priority Critical patent/JP4550867B2/en
Publication of JP2009017344A publication Critical patent/JP2009017344A/en
Application granted granted Critical
Publication of JP4550867B2 publication Critical patent/JP4550867B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、稼動系−待機系の2重化構成での稼動系から待機系への系切替え時に、TCP(Transmission Control Protocol)セッションを救済する技術に関する。   The present invention relates to a technique for relieving a TCP (Transmission Control Protocol) session when a system is switched from an active system to a standby system in a duplex configuration of an active system and a standby system.

ネットワークサービスを提供するシステムには極めて高い信頼性、すなわち、長期間にわたって連続して稼動し続けるという性能(これを可用性とよぶ。)が要求される。具体的に説明すると、ネットワークサービスでは24時間365日連続してサービスを提供し、典型的には年間のサービス可用性が99.999%以上であることが要求される。   A system that provides a network service is required to have extremely high reliability, that is, a capability of continuously operating over a long period of time (this is called availability). More specifically, the network service is provided 24 hours a day, 365 days a year, and typically the annual service availability is required to be 99.999% or more.

このため、従来は専用システムを用いるとともに、システムを二重化するなどして、可用性を確保してきた。しかし、専用システムはコストが高く、安価にサービスの提供ができない問題があった。   For this reason, conventionally, a dedicated system has been used and availability has been secured by duplicating the system. However, the dedicated system is expensive, and there is a problem that the service cannot be provided at a low cost.

そこで、x86アーキテクチャのハードウェアやオープンソースOSであるLinux(登録商標)など、汎用のハードウェアや汎用のOSを用いたシステムが用いられるようになってきた。   Therefore, systems using general-purpose hardware and general-purpose OSs such as x86 architecture hardware and Linux (registered trademark) which is an open source OS have come to be used.

このため、汎用のハードウェアや汎用のOSを用いたシステムで上記した可用性を確保することが課題となっている。   For this reason, it is a problem to ensure the above-described availability in a system using general-purpose hardware or a general-purpose OS.

そこで、Linuxを用いたシステム(以下、Linuxシステムとよぶ。)においても、サーバをクラスタ構成して、稼動系と待機系と二重化し、一方がフェイルしても、TCP状態を引き継ぎ、切替えを意識させずに待機系で運用を継続させる技術が求められている。ここで、TCPセッションとは、TCP接続を確立してから切断するまでをいい、障害が発生した場合に、代替サーバが処理やデータを引き継ぐことをフェイルオーバという。切替えを意識させずに稼動系から待機系に運用を継続させる技術をTCPセッションフェイルオーバ技術と呼ぶ。   Therefore, even in a system using Linux (hereinafter referred to as a Linux system), the server is configured in a cluster so that the active system and the standby system are duplicated. There is a need for technology to continue operation in the standby system. Here, the TCP session refers to the period from the establishment of the TCP connection to the disconnection. When a failure occurs, the replacement server taking over processing and data is referred to as failover. A technique for continuing operation from the active system to the standby system without being aware of switching is called a TCP session failover technique.

TCP/IP通信においては、1つのIPアドレスは複数(通常は65536個)の「ポート」から構成されている。このため、接続を行う場合は必ずIPアドレスとポート番号の組を指定する必要がある。この組をソケットという。   In TCP / IP communication, one IP address is composed of a plurality (usually 65,536) “ports”. For this reason, when making a connection, it is necessary to designate a pair of an IP address and a port number. This set is called a socket.

したがって、稼動系から待機系にサービスを切り替える場合には、Linuxカーネルから稼動系のソケット情報を取り出し、待機系に引き継ぐ仕組みが必要となる。   Therefore, in order to switch the service from the active system to the standby system, a mechanism is required that takes out the socket information of the active system from the Linux kernel and takes over to the standby system.

この課題を解決する技術としては、非特許文献1に示すように、TCP Connection Passing(以下、TCPCPと呼ぶ。)技術が報告されている。   As a technique for solving this problem, as shown in Non-Patent Document 1, a TCP Connection Passing (hereinafter referred to as TCPCP) technique has been reported.

稼動系のアプリケーションがカーネルの状態をコピーし、そのコピーを待機系のアプリケーションに渡し、待機系のアプリケーションが稼動系のカーネルの状態を設定することにより、対向端末に意識させることなく、切替えを達成する。
W. Almerberger, "TCP Connection Passing", Proceedings of the Linux Symposium,p.9-22,2004
The active application copies the status of the kernel, passes the copy to the standby application, and the standby application sets the status of the active kernel. To do.
W. Almerberger, "TCP Connection Passing", Proceedings of the Linux Symposium, p.9-22,2004

TCPセッションの切替えを意識させずに待機系に継続させるためには、ソケット情報だけではなく、TCP部やIP部のバッファに蓄積されたパケットも同時に引き継がれることが必要である。しかし、バッファに蓄えられたパケットとソケット情報を取得した後にも、パケットが送信されることがある。その場合、既に送られたパケットと、切替え後にバッファから送られたパケットのシーケンス番号やタイムスタンプについて矛盾が生じる恐れがある。このような矛盾が生じた場合には正常な通信ができない。   In order to continue to the standby system without being aware of the switching of the TCP session, it is necessary to take over not only the socket information but also the packets accumulated in the buffer of the TCP part and the IP part at the same time. However, the packet may be transmitted even after acquiring the packet and socket information stored in the buffer. In that case, there is a possibility that a contradiction may occur between the sequence number and the time stamp of the packet already sent and the packet sent from the buffer after switching. When such a contradiction occurs, normal communication cannot be performed.

以上述べた、TCPCPは稼動系端末から待機系端末にソケットを引き継ぐ基本的な技術を示すとともに、シーケンス番号がTCP接続の同期を確保する重要なパラメータであることを指摘している。また、タイムスタンプが過去に飛ぶことで矛盾が生じたときは、矛盾するパケットを捨てるか、オフセットを設けることで解決できることが示唆されている。しかし、実用的な技術が確立されていないという問題があった。   As described above, TCPCP indicates a basic technique for taking over a socket from an active terminal to a standby terminal, and points out that a sequence number is an important parameter for ensuring synchronization of TCP connection. Further, it has been suggested that when a contradiction occurs due to a time stamp skipping in the past, it can be solved by discarding the conflicting packet or providing an offset. However, there has been a problem that practical technology has not been established.

本発明は上述したような従来の技術が有する問題点に鑑みてなされたものであって、稼動系から待機系への切り替えを円滑に行うとともに、パケットのシーケンス番号およびタイムスタンプの矛盾を解消する技術を提供することを目的とする。   The present invention has been made in view of the problems of the prior art as described above, and smoothly switches from the active system to the standby system, and resolves the contradiction between the sequence number of the packet and the time stamp. The purpose is to provide technology.

本発明によるTCPセッション切替装置は、制御部と、ソケット部と、TCP部と、IP部と、サービス用と制御用の複数のIPアドレスとをそれぞれ備える現在運用されている稼動系サーバと、待機系のサーバと、を具備し、稼動系および待機系のサーバの両方がスイッチを介して対向端末に接続され、、稼動系及び待機系が同一のサービス用IPアドレスを共有し、稼動系でのみ概サービス用IPアドレスを有効化するTCPセッション切替装置であって、
前記稼動系のサーバの制御部は、稼動系サーバのソケット部とTCP部とIP部からソケット情報を取得し、系切り替えの際には、稼動系サーバによる引き継ぐべきTCPセッションのパケット送受信を停止し、サービス用の引き継ぐべきIPアドレスを停止し、待機系サーバに対して系切り替えの要求を示す旨の要求信号と取得したソケット情報とを前記待機系サーバへ送信し、
前記待機系サーバの制御部は、前記要求信号とソケット情報を受信すると、受信したソケット情報を待機系サーバのソケット部、TCP部、IP部に設定し、待機系サーバによるパケット送受信を開始し、
前記ソケット情報が、パケットの、次に送信する番号を示すシーケンス番号、送信先のコンピュータから送信元のコンピュータへ送られる信号を受け取ったシーケンス番号、次に受信するシーケンス番号をそれぞれ示す第1ないし第3のシーケンス番号を含み、
稼動系および待機系サーバの制御部は、パケットを対向端末へ送信した後に、前記対向端末より、第1及び第3のシーケンス番号の通知を受信すると、直前に送信したパケットの第1及び第3のシーケンス番号を通知されたシーケンス番号に上書きして前記対向端末へ送信することを特徴とする。
A TCP session switching device according to the present invention includes a control unit, a socket unit, a TCP unit, an IP unit, a service server currently in operation and a plurality of IP addresses for service and control, and a standby And both the active and standby servers are connected to the opposite terminal via a switch, the active and standby systems share the same service IP address, and only in the active system A TCP session switching device that enables an IP address for general services,
The control unit of the active server obtains socket information from the socket unit, the TCP unit, and the IP unit of the active server, and stops the packet transmission / reception of the TCP session to be taken over by the active server at the time of system switching. , Stop the IP address to be taken over for the service, send a request signal indicating the request for system switching to the standby server and the acquired socket information to the standby server,
When the control unit of the standby server receives the request signal and socket information, it sets the received socket information in the socket unit, TCP unit, and IP unit of the standby server, and starts packet transmission / reception by the standby server,
The socket information includes a first sequence number indicating a sequence number indicating a next transmission number of the packet, a sequence number receiving a signal transmitted from the transmission destination computer to the transmission source computer, and a sequence number receiving next. 3 sequence numbers,
When the control unit of the active system and the standby system server receives the notification of the first and third sequence numbers from the opposing terminal after transmitting the packet to the opposing terminal, the first and third of the packets transmitted immediately before are received. The sequence number is overwritten on the notified sequence number and transmitted to the opposite terminal.

この場合、ソケット情報が、パケットのタイムスタンプを含み、
稼動系および待機系サーバの制御部は、パケットを対向端末へ送信した後に、前記対向端末よりタイムスタンプの通知を受信すると、直前に送信したパケットのタイムスタンプを、通知されたタイムスタンプを基準として補正して前記対向端末へ送信することとしてもよい。
In this case, the socket information includes the packet timestamp,
When the control unit of the active system and the standby system server receives the time stamp notification from the opposite terminal after transmitting the packet to the opposite terminal, the time stamp of the packet transmitted immediately before is referred to the notified time stamp as a reference. It may be corrected and transmitted to the opposite terminal.

本発明によるTCPセッション切替システムは、制御部と、ソケット部と、TCP部と、IP部とをそれぞれ備える現在運用されている稼動系サーバと、待機系のサーバと、を具備するTCPセッション切替装置と、前記TCPセッション切替装置の稼動系および待機系のサーバのいずれかとスイッチを介して接続される対向端末と、からなるTCPセッション切替システムであって、
前記稼動系のサーバの制御部は、稼動系サーバのソケット部とTCP部とIP部から、パケットの、次に送信する番号を示すシーケンス番号、送信先のコンピュータから送信元のコンピュータへ送られる信号を受け取ったシーケンス番号、次に受信するシーケンス番号をそれぞれ示す第1ないし第3のシーケンス番号を含むソケット情報を取得し、系切り替えの際には、稼動系サーバによるパケット送受信を停止し、待機系サーバに対して系切り替えの要求を示す旨の要求信号と取得したソケット情報とを前記待機系サーバへ送信し、
前記待機系サーバの制御部は、前記要求信号とソケット情報を受信すると、受信したソケット情報を待機系サーバのソケット部、TCP部、IP部に設定し、待機系サーバによるパケット送受信を開始し、
前記対向端末は、前記稼動系または待機系サーバより送られてきたパケットの第1及び第3のシーケンス番号を前回受信したパケットのものと比較し、過去のものであると判断した場合には、前回受信したパケットの各シーケンス番号に基づいた第1及び第3のシーケンス番号を前記稼動系または待機系サーバへ送信し、
稼動系または待機系サーバの制御部は、パケットを対向端末へ送信した後に、前記対向端末より、第1及び第3のシーケンス番号の通知を受信すると、直前に送信したパケットの第1及び第3のシーケンス番号を通知されたシーケンス番号に上書きして前記対向端末へ送信することを特徴とする。
A TCP session switching system according to the present invention is a TCP session switching device including a currently operating active server and a standby server each including a control unit, a socket unit, a TCP unit, and an IP unit. A TCP session switching system comprising: an opposite terminal connected via a switch to either the active system or the standby server of the TCP session switching device,
The control unit of the active server includes a sequence number indicating the next transmission number of the packet from the socket unit, the TCP unit, and the IP unit of the active server, and a signal transmitted from the transmission destination computer to the transmission source computer. Socket information including the first to third sequence numbers indicating the sequence number received next and the sequence number to be received next is acquired, and during system switching, packet transmission / reception by the active server is stopped, and the standby system is Send a request signal indicating a request for system switching to the server and the acquired socket information to the standby server,
When the control unit of the standby server receives the request signal and socket information, it sets the received socket information in the socket unit, TCP unit, and IP unit of the standby server, and starts packet transmission / reception by the standby server,
The opposite terminal compares the first and third sequence numbers of the packets sent from the active or standby server with those of the previously received packet, and determines that it is a past one. Transmitting the first and third sequence numbers based on the sequence numbers of the previously received packets to the active or standby server,
When the control unit of the active or standby server receives the notification of the first and third sequence numbers from the opposite terminal after transmitting the packet to the opposite terminal, the first and third of the packets transmitted immediately before are received. The sequence number is overwritten on the notified sequence number and transmitted to the opposite terminal.

本発明の他の形態によるTCPセッション切替システムは、制御部と、ソケット部と、TCP部と、IP部とをそれぞれ備える現在運用されている稼動系サーバと、待機系のサーバと、を具備するTCPセッション切替装置と、前記TCPセッション切替装置の稼動系および待機系のサーバのいずれかとスイッチを介して接続される対向端末と、からなるTCPセッション切替システムであって、
前記稼動系のサーバの制御部は、稼動系サーバのソケット部とTCP部とIP部から、パケットの、タイムスタンプを含むソケット情報を取得し、系切り替えの際には、稼動系サーバによるパケット送受信を停止し、待機系サーバに対して系切り替えの要求を示す旨の要求信号と取得したソケット情報とを前記待機系サーバへ送信し、
前記待機系サーバの制御部は、前記要求信号とソケット情報を受信すると、受信したソケット情報を待機系サーバのソケット部、TCP部、IP部に設定し、待機系サーバによるパケット送受信を開始し、
前記対向端末は、前記稼動系または待機系サーバより送られてきたパケットのタイムスタンプを前回受信したパケットのものと比較し、過去のものであると判断した場合には、前回受信したパケットのタイムスタンプを前記稼動系または待機系サーバへ送信し、
稼動系または待機系サーバの制御部は、パケットを対向端末へ送信した後に、前記対向端末よりタイムスタンプの通知を受信すると、直前に送信したパケットのタイムスタンプを、通知されたタイムスタンプを基準として補正して前記対向端末へ送信することを特徴とする。
A TCP session switching system according to another aspect of the present invention includes a currently operating active server and a standby server each including a control unit, a socket unit, a TCP unit, and an IP unit. A TCP session switching system comprising: a TCP session switching device; and an opposite terminal connected via a switch to any of the active and standby servers of the TCP session switching device,
The control unit of the active server acquires socket information including a time stamp of the packet from the socket unit, the TCP unit, and the IP unit of the active server, and transmits and receives packets by the active server at the time of system switching. And sends a request signal indicating the request for system switching to the standby server and the acquired socket information to the standby server,
When the control unit of the standby server receives the request signal and socket information, it sets the received socket information in the socket unit, TCP unit, and IP unit of the standby server, and starts packet transmission / reception by the standby server,
The opposite terminal compares the time stamp of the packet sent from the active or standby server with that of the packet received last time, and if it is determined that it is a past time, Send the stamp to the active or standby server,
When the control unit of the active system or standby system server receives a time stamp notification from the opposite terminal after transmitting the packet to the opposite terminal, the time stamp of the packet transmitted immediately before is used as a reference for the notified time stamp. It correct | amends and it transmits to the said opposing terminal, It is characterized by the above-mentioned.

本発明によるプログラムは、上記のTCPセッション切替装置をコンピュータシステムに実現させる。 The program according to the present invention causes the above-described TCP session switching device to be realized in a computer system.

本発明による記録媒体は上記のプログラムを格納する。   The recording medium according to the present invention stores the above program.

上記のように構成される本発明においては、稼動系のサーバから待機系のサーバヘの切り替えを行う際に、稼動系サーバによるパケット送受信を停止し、ソケット情報を稼動系サーバから待機系サーバへのコピーが終了した後に待機系サーバによるパケット送受信が開始されるため、稼動系のサーバから待機系のサーバへの切り替えを円滑に行うことができる。   In the present invention configured as described above, when switching from the active server to the standby server, packet transmission / reception by the active server is stopped, and socket information is transferred from the active server to the standby server. Since packet transmission / reception by the standby server is started after the copying is completed, switching from the active server to the standby server can be performed smoothly.

また、ソケット情報に加え、シーケンス番号やタイムスタンプの補正が行われるように構成したものにおいては、シーケンス番号およびタイムスタンプに矛盾がないため、系切替えを意識させないで稼動系から待機系に切り替えることができる効果がある。   In addition to the socket information, if the sequence number and time stamp are corrected, the sequence number and time stamp are consistent, so the system can be switched from the active system to the standby system without being aware of system switching. There is an effect that can.

次に、本発明の実施例について図面を参照して説明する。   Next, embodiments of the present invention will be described with reference to the drawings.

図1は本発明による二重化システムの構成を示すブロック図である。稼動系サーバ101と待機系サーバ201が二重化されている。対向端末301は、サーバ101またはサーバ201にスイッチ302を介して接続され、サーバ101またはサーバ201とパケットの送受信する端末である。   FIG. 1 is a block diagram showing the configuration of a duplex system according to the present invention. The active server 101 and the standby server 201 are duplicated. The opposite terminal 301 is a terminal that is connected to the server 101 or 201 via the switch 302 and transmits / receives a packet to / from the server 101 or 201.

稼動系サーバ101と待機系サーバ201はLinuxシステムである。   The active server 101 and the standby server 201 are Linux systems.

カーネル102/202には、TCP/IP通信のためのソケット部103/203、TCP部104/204、IP部105/205を含む。TCP部104/204、IP部105/205は送信バッファおよび受信バッファを備え、送信パケット、受信パケットを保持する。   The kernel 102/202 includes a socket unit 103/203, a TCP unit 104/204, and an IP unit 105/205 for TCP / IP communication. The TCP unit 104/204 and the IP unit 105/205 include a transmission buffer and a reception buffer, and hold transmission packets and reception packets.

なお、稼動系サーバ101、待機系サーバ201、および、対向端末301のいずれも、キーボード、マウス、受信装置等の入力装置、CPUなどの制御装置、ROM、RAM、HDDなどからなり、送受信パケットの記憶などを行う記憶装置、ディスプレイ、プリンタ、送信装置などの出力装置からなる一般的なコンピュータシステムにより構成されるものである。各制御装置は、ROM、RAM、HDDに格納されているプログラムに応じた処理を行うものであり、稼動系サーバ101と待機系サーバ201内の上述したカーネル102/202およびこれらの内部に構成されるソケット部103/203、TCP部104/204、IP部105/205は、コンピュータシステム内に仮想的に構築されるものである。   Note that each of the active server 101, the standby server 201, and the opposite terminal 301 includes an input device such as a keyboard, a mouse, and a receiving device, a control device such as a CPU, a ROM, a RAM, an HDD, and the like. It is configured by a general computer system including a storage device that performs storage and the like and an output device such as a display, a printer, and a transmission device. Each control device performs processing according to programs stored in the ROM, RAM, and HDD, and is configured in the above-described kernels 102/202 in the active server 101 and the standby server 201 and in these. The socket unit 103/203, the TCP unit 104/204, and the IP unit 105/205 are virtually constructed in the computer system.

また、ROM、RAM、HDD内に格納されるプログラムは、CD-ROM、DVD-ROM、フロッピーディスク、USBメモリなどの読み取り可能な記録媒体からこれらの入力装置を介して移入される形態やインターネットなどのネットワークを介して受信装置より移入される形態がある。本発明によるシステムはこれらのプログラムにより一般的なコンピュータシステム上に構築されるものであり、本発明にはこれらのプログラムや該プログラムを格納した記録媒体が含まれる。   In addition, programs stored in ROM, RAM, and HDD can be imported from a readable recording medium such as CD-ROM, DVD-ROM, floppy disk, or USB memory via these input devices, the Internet, etc. There is a form that is imported from the receiving device via the network. The system according to the present invention is constructed on a general computer system by these programs, and the present invention includes these programs and a recording medium storing the programs.

図2は、稼動系から待機系に切替える時のフローチャートである。   FIG. 2 is a flowchart when switching from the active system to the standby system.

待機系のサーバ201は、制御部206のソケット停止機能によりパケットの送受信は停止されており、パケットフィルタリングがかけられている。   In the standby server 201, packet transmission / reception is stopped by the socket stop function of the control unit 206, and packet filtering is applied.

上記のソケット停止機能とは、パケット送受信を停止する機能であり、制御部106,206からソケット停止要求を受けた場合に動作する。   The socket stop function is a function for stopping packet transmission / reception, and operates when a socket stop request is received from the control units 106 and 206.

パケットフィルタリングは、IP部のパケットの送信を停止する機能である。待機系サーバ201でソケット情報設定機能によるソケット情報設定中に、未設定のソケットに対するパケットを受信すると、TCPセッションが切断される。そこで、パケットフィルタリングにより、待機系サーバ201のソケット情報設定処理が完了するまで、IP部105のパケットの送信を停止する。   Packet filtering is a function for stopping transmission of packets in the IP unit. If the standby server 201 receives a packet for an unset socket while setting socket information by the socket information setting function, the TCP session is disconnected. Therefore, the packet filtering of the IP unit 105 is stopped until the socket information setting process of the standby server 201 is completed by packet filtering.

ステップS401では、フェイルオーバの場合を考慮して、稼動系サーバ101の制御部106が、任意のタイミングで、ソケット部103、TCP部104、IP部105から、ソケット情報を取得する(図1の(1))。   In step S401, considering the case of failover, the control unit 106 of the active server 101 acquires socket information from the socket unit 103, the TCP unit 104, and the IP unit 105 at an arbitrary timing ((( 1)).

ソケット情報取得機能は、TCPセッションの救済に必要なカーネル102/202内のソケット情報を制御部106/206へ渡す機能であり、制御部106/206からソケット情報取得要求を受けた場合に動作する。   The socket information acquisition function is a function for passing socket information in the kernel 102/202 necessary for TCP session relief to the control unit 106/206, and operates when a socket information acquisition request is received from the control unit 106/206. .

ステップS402では、稼動系サーバ101の制御部106が系切替えのトリガを発生する(図1の(2))。   In step S402, the control unit 106 of the active server 101 generates a system switching trigger ((2) in FIG. 1).

ステップS403では、稼動系サーバ101の制御部106とカーネル102の状態の不一致がないようにするため、また、対向端末301との状態不一致が起こらないようにするため、稼動系サーバ101の制御部106のソケット停止機能を用いて、TCP部104でのパケットの送受信を停止させる(図1の(3))。   In step S403, in order to prevent a mismatch between the state of the control unit 106 of the active server 101 and the kernel 102 and to prevent a state mismatch with the opposite terminal 301, the control unit of the active server 101 The packet transmission / reception in the TCP unit 104 is stopped using the socket stop function 106 ((3) in FIG. 1).

ステップS404では、カーネル102はTCPセッションを復旧するために必要な情報と、送信バッファ、受信バッファの内容をソケット情報へコピーする。   In step S404, the kernel 102 copies information necessary for recovering the TCP session and the contents of the transmission buffer and the reception buffer to the socket information.

ステップS405では、稼動系サーバ101の制御部106は、ソケット情報取得機能を用いて、ソケット情報をカーネル102から取得する(図1の(4))。   In step S405, the control unit 106 of the active server 101 acquires socket information from the kernel 102 using the socket information acquisition function ((4) in FIG. 1).

ステップS406では、稼動系サーバ101の制御部106は、IPアドレス切替えのため、パケットを送受信しないようにパケットフィルタリングを行った後、IPアドレスを削除する(図1(5))。   In step S406, the control unit 106 of the active server 101 deletes the IP address after performing packet filtering so as not to transmit / receive a packet for IP address switching (FIG. 1 (5)).

ステップS407では、稼動系サーバ101の制御部106は、ソケット情報を待機系サーバ201の制御部206に送信する。さらに、待機系サーバ201の制御部206に系切替え要求を送信する(図1(6))。   In step S <b> 407, the control unit 106 of the active server 101 transmits socket information to the control unit 206 of the standby server 201. Further, a system switching request is transmitted to the control unit 206 of the standby server 201 (FIG. 1 (6)).

ステップS408では、待機系サーバ201の制御部206はIP部205にIPアドレスを設定する(図1の(7))。   In step S408, the control unit 206 of the standby server 201 sets an IP address in the IP unit 205 ((7) in FIG. 1).

ステップS409では、待機系サーバ201の制御部206のソケット情報設定機能により、ソケット情報をカーネル202に設定する(図1の(8))。   In step S409, socket information is set in the kernel 202 by the socket information setting function of the control unit 206 of the standby server 201 ((8) in FIG. 1).

ソケット情報設定機能とは、TCP部104/204に対し、指定されたソケット情報を設定する機能である。   The socket information setting function is a function for setting designated socket information for the TCP unit 104/204.

ステップS410では、待機系サーバ201の制御部206は、ソケット開始機能を用いて、パケット送受信を開始する(図1の(9))。送信バッファに送信すべきパケットがある場合は送信する。ここで、待機系サーバ201のシーケンス番号とタイムスタンプが対向端末とずれている可能性があるため、補正処理を行う。   In step S410, the control unit 206 of the standby server 201 starts packet transmission / reception using the socket start function ((9) in FIG. 1). If there is a packet to be sent to the send buffer, send it. Here, since there is a possibility that the sequence number and the time stamp of the standby server 201 are different from those of the opposite terminal, correction processing is performed.

ソケット開始機能とは、パケット送受信を再開する機能であり、制御部206よりソケット開始要求を受けた場合に動作する。   The socket start function is a function for restarting packet transmission / reception, and operates when a socket start request is received from the control unit 206.

ステップS411では、待機系サーバ201の制御部206は、パケットフィルタリングを解除する。事実上、ここで対向端末301との通信が再開される(図1の(10))。   In step S411, the control unit 206 of the standby server 201 cancels packet filtering. In effect, communication with the opposite terminal 301 is resumed here ((10) in FIG. 1).

ステップS412では、待機系サーバ201の通信再開が確認された時点で、稼動系の制御部106は、ソケット削除機能を用いてソケットをクローズする(図1の(11))。   In step S412, when it is confirmed that the standby server 201 resumes communication, the active control unit 106 closes the socket using the socket deletion function ((11) in FIG. 1).

ソケット削除機能とは、不要になった稼動系サーバ101のソケットを削除する機能であり、制御部106よりソケット削除要求を受けた場合に動作する。   The socket deletion function is a function for deleting a socket of the active server 101 that is no longer needed, and operates when a socket deletion request is received from the control unit 106.

以上により、ソケット情報は稼動系サーバ101から待機系サーバ201にそのまま引き継がれるため、対向端末3−1は、切替えを意識することがない効果がある。   As described above, since the socket information is directly transferred from the active server 101 to the standby server 201, there is an effect that the opposite terminal 3-1 is not aware of switching.

上記では、稼動系サーバ101の制御部106が切替えのトリガを出すとしたが、フェイルオーバの場合は、稼動系サーバ101の制御部106による異常の検出、スイッチオーバ(マスタの役割をスレーブに移動する)の場合は、管理者から制御部106への切替え通知によって稼動系サーバ101の制御部106がトリガを出すとしてもよい。   In the above description, the control unit 106 of the active server 101 issues a trigger for switching. However, in the case of a failover, the control unit 106 of the active server 101 detects an abnormality and switches over (the master role is moved to the slave). ), The control unit 106 of the active server 101 may issue a trigger by a switching notification from the administrator to the control unit 106.

図3は切替えの処理を実行中にエラーが発生し、切戻すことが必要になった時の構成および動作を示す図であり、図4はその動作を詳細に示すフローチャートである。図3に示す構成は図1と基本的に同じである。   FIG. 3 is a diagram showing a configuration and an operation when an error occurs during the switching process and it is necessary to switch back, and FIG. 4 is a flowchart showing the operation in detail. The configuration shown in FIG. 3 is basically the same as FIG.

ステップS413では、待機系サーバ201の制御部206はIPアドレスを削除する。パケットフィルタリングは設定されたままとしておく(図3の(12))。   In step S413, the control unit 206 of the standby server 201 deletes the IP address. Packet filtering remains set ((12) in FIG. 3).

ステップS414では、待機系サーバ201の制御部206は、稼動系サーバ101へ再度系切替え要求を送信する(図3の(13))。   In step S414, the control unit 206 of the standby server 201 transmits a system switch request again to the active server 101 ((13) in FIG. 3).

ステップS415では、稼動系サーバ101の制御部106は、IPアドレスを設定する(図3の(14))。   In step S415, the control unit 106 of the active server 101 sets an IP address ((14) in FIG. 3).

ステップS416では、稼動系サーバ101の制御部106は、ソケット開始機能によりパケット送受信を開始する(図3の(15))。   In step S416, the control unit 106 of the active server 101 starts packet transmission / reception by the socket start function ((15) in FIG. 3).

ステップS417では、稼動系サーバ101の制御部106は、パケットフィルタリングを解除する(図3の(16))。   In step S417, the control unit 106 of the active server 101 cancels the packet filtering ((16) in FIG. 3).

ステップS418では、対向端末301との通信を再開する。   In step S418, communication with the opposite terminal 301 is resumed.

このように、本実施例においては、切替えの処理において、エラーが発生しても、直ちに切戻すことができ、対向端末301は、切替えを意識することがないという効果がある。   As described above, in this embodiment, even if an error occurs in the switching process, it is possible to immediately switch back, and there is an effect that the opposite terminal 301 is not aware of the switching.

次に、シーケンス番号、タイムスタンプの補正処理について説明する。   Next, the sequence number and time stamp correction processing will be described.

シーケンス番号とは、各パケットにユニークに設定され、セッション確立中は送信ごとにこの値を更新する。毎回送信したバイト数をシーケンス番号に足しこむことで、データストリームのどこまでを送受信したかを一意に判断することができる。   The sequence number is uniquely set for each packet, and this value is updated for each transmission during session establishment. By adding the number of bytes transmitted each time to the sequence number, it is possible to uniquely determine how far the data stream has been transmitted / received.

タイムスタンプは、パケットの中で古いパケットがあるかどうかを見つけるために使用される。タイムスタンプが時間的に前に戻っているように見える場合、対向端末301はそのパケットを破棄する。   The timestamp is used to find out if there is an old packet among the packets. If the time stamp appears to be back in time, the opposite terminal 301 discards the packet.

稼動系サーバ101でソケット情報を取得した後でも、稼動系サーバ101と対向端末301は通信を行う可能性がある。すると、既に対向端末に送信されたパケットより、系切替え後に送信されたパケットがシーケンス番号、タイムスタンプが前である可能性がある。シーケンス番号、タイムスタンプに矛盾があると、正常な送受信ができない。そこで、切替え直後に限り、シーケンス番号とタイムスタンプを補正する。   Even after the socket information is acquired by the active server 101, the active server 101 and the opposite terminal 301 may communicate with each other. Then, there is a possibility that the packet transmitted after the system switching is earlier in sequence number and time stamp than the packet already transmitted to the opposite terminal. If the sequence number and time stamp are inconsistent, normal transmission and reception cannot be performed. Therefore, the sequence number and time stamp are corrected only immediately after switching.

図5は、シーケンス番号の補正の動作を示すタイムチャートである。   FIG. 5 is a time chart showing the sequence number correction operation.

パケット送受信が行われ、稼動系サーバ101においてソケット情報が取得されたとする(時点501)。その時、ソケット情報として、稼動系サーバ101が次に送信するシーケンス番号がseq1であり、ACK(送信先のコンピュータから送信元のコンピュータへ送られる肯定的な信号)を受け取ったシーケンス番号がseq2であり、次に受信する確認応答番号(ackseq)がseq103であったとする。   Assume that packet transmission / reception is performed and socket information is acquired in the active server 101 (time 501). At that time, as the socket information, the sequence number that the active server 101 transmits next is seq1, and the sequence number that received ACK (positive signal sent from the transmission destination computer to the transmission source computer) is seq2. Assume that the next acknowledgment response number (ackseq) received is seq103.

しかし、ソケット情報取得後も、系の切替えが行われるまでに、稼動系サーバ101と対向端末301との間でパケットの送受信が行われ、対向端末301では、次に送信するシーケンス番号がseq104、ACKを受け取ったシーケンス番号がseq105、確認応答番号がseq6になっていたとする(時点502)。   However, after the socket information is acquired, before the system is switched, packets are transmitted and received between the active server 101 and the opposite terminal 301. In the opposite terminal 301, the sequence number to be transmitted next is seq104, Assume that the sequence number that received the ACK is seq 105 and the confirmation response number is seq 6 (time point 502).

この後、稼動系サーバ101から待機系サーバ201への系に切替えられると、待機系サーバ201にてソケット情報が設定され(時点503)、ソケット開始機能によりパケット送受信が開始される(時点504)。   Thereafter, when the system is switched from the active server 101 to the standby server 201, socket information is set in the standby server 201 (time 503), and packet transmission / reception is started by the socket start function (time 504). .

待機系サーバ201から対向端末301に送信されるパケットのシーケンス番号は、初期状態であるseq1、確認応答番号(ackseq)はseq3となる。対向端末301は、これらのシーケンス番号が、次に送信するシーケンス番号および確認応答番号のseq104およびseq6と異なるものであることから過去と判断する(時点505)。   The sequence number of the packet transmitted from the standby server 201 to the opposite terminal 301 is seq1 which is the initial state, and the confirmation response number (ackseq) is seq3. The opposite terminal 301 determines that the sequence number is different from the sequence numbers and seq 104 of the next response sequence number and the confirmation response number (time 505).

そこで、対向端末301からD−SACK信号(RFC 2833 - An Extension to the Selective Acknowledgment (SACK) Option for TCPで定義される)が送信され、次に送信するシーケンス番号はseq104であり、次に受信を期待するシーケンス番号がseq6であることを待機系サーバ201に通知する。これに基づき、待機系サーバ201が次に送信するシーケンス番号をseq6、ACKを受け取ったシーケンス番号をseq6、次に受信する確認応答番号(ackseq)をseq104と上書きにより補正(時点506)することにより、シーケンス番号の矛盾を解消することができる。   Therefore, a D-SACK signal (defined in RFC 2833-An Extension to the Selective Acknowledgment (SACK) Option for TCP) is transmitted from the opposite terminal 301, the sequence number to be transmitted next is seq 104, and then the reception is performed. The standby server 201 is notified that the expected sequence number is seq6. Based on this, the sequence number to be transmitted next by the standby server 201 is seq6, the sequence number that received the ACK is seq6, and the confirmation response number (ackseq) that is received next is corrected by overwriting seq104 (time point 506). , Sequence number conflicts can be resolved.

図6は、タイムスタンプの補正についてのタイムチャートの図である。   FIG. 6 is a time chart for time stamp correction.

稼動系サーバ101が対向端末301よりソケット情報を取得した時点501をtsA1とする。その後も、稼動系サーバ101と対向端末301との間でパケットの送受信が行われ、tsA1の後のtsA2の時点502まで、稼動系サーバ101はパケットを受け取っていたとする。   A time point 501 when the active server 101 acquires socket information from the opposite terminal 301 is defined as tsA1. After that, it is assumed that packets are transmitted and received between the active server 101 and the opposite terminal 301, and the active server 101 has received the packet until the time 502 of tsA2 after tsA1.

その後、稼動系サーバ101から待機系サーバ201への切替えられる。この後、時点503にてソケット情報が設定され、時点504にてソケットが開始されてパケットの送信が行われるが、このときに送られるパケットのタイムスタンプはtsA1となる。このタイムスタンtsA1は、tsA2より古いため、対向端末301はそのパケットを廃棄する(時点505)。   Thereafter, switching from the active server 101 to the standby server 201 is performed. Thereafter, the socket information is set at time 503, and the socket is started and the packet is transmitted at time 504. The time stamp of the packet sent at this time is tsA1. Since this time stamp tsA1 is older than tsA2, the opposite terminal 301 discards the packet (time 505).

その後、対向端末301は受信に成功した最新のパケットのタイムスタンプtsA2を、待機系サーバ201に送信し、待機系サーバ201はその時刻をベースに時間を計測し、パケットの時刻を補正する(時点506)。   Thereafter, the opposite terminal 301 transmits the time stamp tsA2 of the latest packet that has been successfully received to the standby server 201, and the standby server 201 measures the time based on the time and corrects the packet time (time point). 506).

これにより、タイムスタンプの矛盾を解消することができ、稼動系サーバ101から待機系サーバ201への切替えにより、パケットが廃棄されることを防ぐ効果がある。   As a result, time stamp inconsistencies can be resolved, and there is an effect of preventing packets from being discarded due to switching from the active server 101 to the standby server 201.

本発明は高い可用性が要求されるネットワークサービスを提供するシステムにおいて利用することができる。   The present invention can be used in a system that provides a network service that requires high availability.

本発明にかかる二重化システムの構成を示す図である。It is a figure which shows the structure of the duplication system concerning this invention. 稼動系から待機系に切替える時のフローチャートである。It is a flowchart at the time of switching from an active system to a standby system. 切戻すことが必要になった時の構成を示す図である。It is a figure which shows a structure when it becomes necessary to switch back. 待機系から稼動系に切戻す時のフローチャートである。It is a flowchart at the time of switching back from a standby system to an active system. シーケンス番号の補正のタイムチャートの図である。It is a figure of the time chart of correction | amendment of a sequence number. タイムスタンプの補正についてのタイムチャートである。It is a time chart about time stamp correction.

符号の説明Explanation of symbols

101 稼動系サーバ
201 待機系サーバ
102、202 カーネル
103、203 ソケット部
104、204 TCP部
105、205 IP部
106、206 制御部
301 対向端末
302 スイッチ
501〜506 タイミング
S401〜S412 稼動系から待機系に切替える時のステップ
S413〜S418 待機系から稼動系に切戻す時のステップ
101 Active server 201 Standby server 102, 202 Kernel 103, 203 Socket unit 104, 204 TCP unit 105, 205 IP unit 106, 206 Control unit 301 Opposed terminal 302 Switch 501 to 506 Timing S401 to S412 From active system to standby system Steps for switching S413 to S418 Steps for switching back from the standby system to the active system

Claims (10)

制御部と、ソケット部と、TCP部と、IP部と、サービス用と制御用の複数のIPアドレスとをそれぞれ備える現在運用されている稼動系サーバと、待機系のサーバと、を具備し、稼動系および待機系のサーバの両方がスイッチを介して対向端末に接続され稼動系及び待機系が同一のサービス用IPアドレスを共有し、稼動系でのみ概サービス用IPアドレスを有効化するTCPセッション切替装置であって、
前記稼動系のサーバの制御部は、稼動系サーバのソケット部とTCP部とIP部からソケット情報を取得し、系切り替えの際には、稼動系サーバによる引き継ぐべきTCPセッションのパケット送受信を停止し、サービス用の引き継ぐべきIPアドレスを停止し、待機系サーバに対して系切り替えの要求を示す旨の要求信号と取得したソケット情報とを前記待機系サーバへ送信し、
前記待機系サーバの制御部は、前記要求信号とソケット情報を受信すると、受信したソケット情報を待機系サーバのソケット部、TCP部、IP部に設定し、待機系サーバによるパケット送受信を開始し、
前記ソケット情報が、パケットの、次に送信する番号を示すシーケンス番号、送信先のコンピュータから送信元のコンピュータへ送られる信号を受け取ったシーケンス番号、次に受信するシーケンス番号をそれぞれ示す第1ないし第3のシーケンス番号を含み、
稼動系および待機系サーバの制御部は、パケットを対向端末へ送信した後に、前記対向端末より、第1及び第3のシーケンス番号の通知を受信すると、直前に送信したパケットの第1及び第3のシーケンス番号を通知されたシーケンス番号に上書きして前記対向端末へ送信することを特徴とするTCPセッション切替装置。
A control unit, a socket unit, a TCP unit, an IP unit, an active server currently in operation each having a plurality of IP addresses for service and control, and a standby server, TCP in which both the active and standby servers are connected to the opposite terminal via a switch , the active and standby systems share the same service IP address, and the general service IP address is enabled only on the active system A session switching device,
The control unit of the active server obtains socket information from the socket unit, the TCP unit, and the IP unit of the active server, and stops the packet transmission / reception of the TCP session to be taken over by the active server at the time of system switching. , Stop the IP address to be taken over for the service, send a request signal indicating the request for system switching to the standby server and the acquired socket information to the standby server,
When the control unit of the standby server receives the request signal and socket information, it sets the received socket information in the socket unit, TCP unit, and IP unit of the standby server, and starts packet transmission / reception by the standby server,
The socket information includes a first sequence number indicating a sequence number indicating a next transmission number of the packet, a sequence number receiving a signal transmitted from the transmission destination computer to the transmission source computer, and a sequence number receiving next. 3 sequence numbers,
When the control unit of the active system and the standby system server receives the notification of the first and third sequence numbers from the opposing terminal after transmitting the packet to the opposing terminal, the first and third of the packets transmitted immediately before are received. A TCP session switching apparatus, wherein the sequence number is overwritten on the notified sequence number and transmitted to the opposite terminal.
請求項1記載のTCPセッション切替装置において、
ソケット情報が、TCPヘッダのパケットのタイムスタンプを含み、
稼動系および待機系サーバの制御部は、パケットを対向端末へ送信した後に、前記対向端末より前記タイムスタンプの通知を受信すると、直前に送信したパケットのタイムスタンプを、通知されたタイムスタンプを基準として補正して前記対向端末へ送信することを特徴とするTCPセッション切替装置。
The TCP session switching device according to claim 1,
The socket information includes the time stamp of the TCP header packet,
The control unit of the active system and standby server, after transmitting a packet to the correspondent node, wherein the more the opposite terminal receiving a notification of the time stamp, the time stamp of the packet transmitted immediately before, based on the notified time stamp The TCP session switching apparatus, wherein the TCP session switching apparatus corrects the data as follows and transmits the corrected data to the opposite terminal.
制御部と、ソケット部と、TCP部と、IP部とをそれぞれ備える現在運用されている稼動系サーバと、待機系のサーバと、を具備するTCPセッション切替装置と、前記TCPセッション切替装置の稼動系および待機系のサーバのいずれかとスイッチを介して接続される対向端末と、からなるTCPセッション切替システムであって、
前記稼動系のサーバの制御部は、稼動系サーバのソケット部とTCP部とIP部から、パケットの、次に送信する番号を示すシーケンス番号、送信先のコンピュータから送信元のコンピュータへ送られる信号を受け取ったシーケンス番号、次に受信するシーケンス番号をそれぞれ示す第1ないし第3のシーケンス番号を含むソケット情報を取得し、系切り替えの際には、稼動系サーバによるパケット送受信を停止し、待機系サーバに対して系切り替えの要求を示す旨の要求信号と取得したソケット情報とを前記待機系サーバへ送信し、
前記待機系サーバの制御部は、前記要求信号とソケット情報を受信すると、受信したソケット情報を待機系サーバのソケット部、TCP部、IP部に設定し、待機系サーバによるパケット送受信を開始し、
前記対向端末は、前記稼動系または待機系サーバより送られてきたパケットの第1及び第3のシーケンス番号を前回受信したパケットのものと比較し、過去のものであると判断した場合には、前回受信したパケットの各シーケンス番号に基づいた第1及び第3のシーケンス番号を前記稼動系または待機系サーバへ送信し、
稼動系または待機系サーバの制御部は、パケットを対向端末へ送信した後に、前記対向端末より、第1及び第3のシーケンス番号の通知を受信すると、直前に送信したパケットの第1及び第3のシーケンス番号を通知されたシーケンス番号に上書きして前記対向端末へ送信することを特徴とするTCPセッション切替システム。
A TCP session switching device comprising a control server, a socket unit, a TCP unit, and an IP unit, each of which is currently operated and a standby server, and the operation of the TCP session switching device A TCP session switching system comprising an opposite terminal connected to either a server or a standby server via a switch,
The control unit of the active server includes a sequence number indicating the next transmission number of the packet from the socket unit, the TCP unit, and the IP unit of the active server, and a signal transmitted from the transmission destination computer to the transmission source computer. Socket information including the first to third sequence numbers indicating the sequence number received next and the sequence number to be received next is acquired, and during system switching, packet transmission / reception by the active server is stopped, and the standby system is Send a request signal indicating a request for system switching to the server and the acquired socket information to the standby server,
When the control unit of the standby server receives the request signal and socket information, it sets the received socket information in the socket unit, TCP unit, and IP unit of the standby server, and starts packet transmission / reception by the standby server,
The opposite terminal compares the first and third sequence numbers of the packets sent from the active or standby server with those of the previously received packet, and determines that it is a past one. Transmitting the first and third sequence numbers based on the sequence numbers of the previously received packets to the active or standby server,
When the control unit of the active or standby server receives the notification of the first and third sequence numbers from the opposite terminal after transmitting the packet to the opposite terminal, the first and third of the packets transmitted immediately before are received. A TCP session switching system, wherein the sequence number is overwritten on the notified sequence number and transmitted to the opposite terminal.
制御部と、ソケット部と、TCP部と、IP部とをそれぞれ備える現在運用されている稼動系サーバと、待機系のサーバと、を具備するTCPセッション切替装置と、前記TCPセッション切替装置の稼動系および待機系のサーバのいずれかとスイッチを介して接続される対向端末と、からなるTCPセッション切替システムであって、
前記稼動系のサーバの制御部は、稼動系サーバのソケット部とTCP部とIP部から、パケットの、タイムスタンプを含むソケット情報を取得し、系切り替えの際には、稼動系サーバによるパケット送受信を停止し、待機系サーバに対して系切り替えの要求を示す旨の要求信号と取得したソケット情報とを前記待機系サーバへ送信し、
前記待機系サーバの制御部は、前記要求信号とソケット情報を受信すると、受信したソケット情報を待機系サーバのソケット部、TCP部、IP部に設定し、待機系サーバによるパケット送受信を開始し、
前記対向端末は、前記稼動系または待機系サーバより送られてきたパケットのタイムスタンプを前回受信したパケットのものと比較し、過去のものであると判断した場合には、前回受信したパケットのタイムスタンプを前記稼動系または待機系サーバへ送信し、
稼動系または待機系サーバの制御部は、パケットを対向端末へ送信した後に、前記対向端末よりタイムスタンプの通知を受信すると、直前に送信したパケットのタイムスタンプを、通知されたタイムスタンプを基準として補正して前記対向端末へ送信することを特徴とするTCPセッション切替システム。
A TCP session switching device comprising a control server, a socket unit, a TCP unit, and an IP unit, each of which is currently operated and a standby server, and the operation of the TCP session switching device A TCP session switching system comprising an opposite terminal connected to either a server or a standby server via a switch,
The control unit of the active server acquires socket information including a time stamp of the packet from the socket unit, the TCP unit, and the IP unit of the active server, and transmits and receives packets by the active server at the time of system switching. And sends a request signal indicating the request for system switching to the standby server and the acquired socket information to the standby server,
When the control unit of the standby server receives the request signal and socket information, it sets the received socket information in the socket unit, TCP unit, and IP unit of the standby server, and starts packet transmission / reception by the standby server,
The opposite terminal compares the time stamp of the packet sent from the active or standby server with that of the packet received last time, and if it is determined that it is a past time, Send the stamp to the active or standby server,
When the control unit of the active system or standby system server receives a time stamp notification from the opposite terminal after transmitting the packet to the opposite terminal, the time stamp of the packet transmitted immediately before is used as a reference for the notified time stamp. A TCP session switching system, wherein the TCP session is corrected and transmitted to the opposite terminal.
制御部と、ソケット部と、TCP部と、IP部とをそれぞれ備える現在運用されている稼動系サーバと、待機系のサーバと、を具備し、稼動系および待機系のサーバのいずれかがスイッチを介して対向端末に接続されるTCPセッション切替装置で行われる切り替え方法であって、
前記稼動系のサーバの制御部が、稼動系サーバのソケット部とTCP部とIP部からソケット情報を取得し、系切り替えの際には、稼動系サーバによるパケット送受信を停止し、待機系サーバに対して系切り替えの要求を示す旨の要求信号と取得したソケット情報とを前記待機系サーバへ送信するステップと、
前記待機系サーバの制御部が、前記要求信号とソケット情報を受信すると、受信したソケット情報を待機系サーバのソケット部、TCP部、IP部に設定し、待機系サーバによるパケット送受信を開始するステップと、を有し、
ソケット情報が、パケットの、次に送信する番号を示すシーケンス番号、送信先のコンピュータから送信元のコンピュータへ送られる信号を受け取ったシーケンス番号、次に受信するシーケンス番号をそれぞれ示す第1ないし第3のシーケンス番号を含み、
稼動系および待機系サーバの制御部が、パケットを対向端末へ送信した後に、前記対向端末より、第1及び第3のシーケンス番号の通知を受信すると、直前に送信したパケットの第1及び第3のシーケンス番号を通知されたシーケンス番号に上書きして前記対向端末へ送信するステップを行うことを特徴とするTCPセッション切替方法。
A currently operating active server and a standby server each including a control unit, a socket unit, a TCP unit, and an IP unit, and either the active or standby server is switched A switching method performed by a TCP session switching device connected to the opposite terminal via
The control unit of the active server obtains socket information from the socket unit, the TCP unit, and the IP unit of the active server, and stops the packet transmission / reception by the active server and switches to the standby server when the system is switched. Transmitting a request signal indicating a request for system switching to the standby server and the acquired socket information;
When the control unit of the standby server receives the request signal and socket information, the received socket information is set in the socket unit, TCP unit, and IP unit of the standby server, and packet transmission / reception by the standby server is started. And having
The first to third socket information includes a sequence number indicating the next transmission number of the packet, a sequence number receiving a signal sent from the transmission destination computer to the transmission source computer, and a next reception sequence number. Sequence number of
After the control unit of the active system and the standby system server transmits the packet to the opposite terminal and receives the notification of the first and third sequence numbers from the opposite terminal, the first and third of the packets transmitted immediately before are received. A TCP session switching method, comprising: overwriting the notified sequence number with the notified sequence number and transmitting the sequence number to the opposite terminal.
請求項5に記載のTCPセッション切替方法において、
ソケット情報が、TCPヘッダのパケットのタイムスタンプを含み、
稼動系および待機系サーバの制御部が、パケットを対向端末へ送信した後に、前記対向端末より前記タイムスタンプの通知を受信すると、直前に送信したパケットのタイムスタンプを、通知されたタイムスタンプを基準として補正して前記対向端末へ送信するステップを行うことを特徴とするTCPセッション切替方法。
The TCP session switching method according to claim 5 ,
The socket information includes the time stamp of the TCP header packet,
The control unit of the active system and standby server, after transmitting a packet to the correspondent node, wherein the more the opposite terminal receiving a notification of the time stamp, based on the timestamp of the packet transmitted immediately before the notified time stamp And a step of transmitting to the opposite terminal after correcting as a TCP session switching method.
制御部と、ソケット部と、TCP部と、IP部とをそれぞれ備える現在運用されている稼動系サーバと、待機系のサーバと、を具備するTCPセッション切替装置と、前記TCPセッション切替装置の稼動系および待機系のサーバのいずれかとスイッチを介して接続される対向端末と、からなるTCPセッション切替システムで行われる切り替え方法であって、
前記稼動系のサーバの制御部が、稼動系サーバのソケット部とTCP部とIP部から、パケットの、次に送信する番号を示すシーケンス番号、送信先のコンピュータから送信元のコンピュータへ送られる信号を受け取ったシーケンス番号、次に受信するシーケンス番号をそれぞれ示す第1ないし第3のシーケンス番号を含むソケット情報を取得し、系切り替えの際には、稼動系サーバによるパケット送受信を停止し、待機系サーバに対して系切り替えの要求を示す旨の要求信号と取得したソケット情報とを前記待機系サーバへ送信するステップと、
前記待機系サーバの制御部が、前記要求信号とソケット情報を受信すると、受信したソケット情報を待機系サーバのソケット部、TCP部、IP部に設定し、待機系サーバによるパケット送受信を開始するステップと、
前記対向端末が、前記稼動系または待機系サーバより送られてきたパケットの第1及び第3のシーケンス番号を前回受信したパケットのものと比較し、過去のものであると判断した場合には、前回受信したパケットの各シーケンス番号に基づいた第1及び第3のシーケンス番号を前記稼動系または待機系サーバへ送信するステップと、
稼動系または待機系サーバの制御部が、パケットを対向端末へ送信した後に、前記対向端末より、第1及び第3のシーケンス番号の通知を受信すると、直前に送信したパケットの第1及び第3のシーケンス番号を通知されたシーケンス番号に上書きして前記対向端末へ送信するステップと、を有することを特徴とするTCPセッション切替方法。
A TCP session switching device comprising a control server, a socket unit, a TCP unit, and an IP unit, each of which is currently operated and a standby server, and the operation of the TCP session switching device A switching method that is performed in a TCP session switching system including an opposite terminal connected to either of a server and a standby server via a switch,
The control unit of the active server sends a sequence number indicating the next transmission number of the packet from the socket unit, the TCP unit, and the IP unit of the active server, and a signal sent from the transmission destination computer to the transmission source computer Socket information including the first to third sequence numbers indicating the sequence number received next and the sequence number to be received next is acquired, and during system switching, packet transmission / reception by the active server is stopped, and the standby system is Transmitting a request signal indicating a request for system switching to the server and the acquired socket information to the standby server;
When the control unit of the standby server receives the request signal and socket information, the received socket information is set in the socket unit, TCP unit, and IP unit of the standby server, and packet transmission / reception by the standby server is started. When,
When the opposite terminal compares the first and third sequence numbers of the packets sent from the active or standby server with those of the previously received packet and determines that it is a past one, Transmitting first and third sequence numbers based on each sequence number of the previously received packet to the active system or standby system server;
When the control unit of the active or standby server transmits a packet to the opposite terminal and then receives a notification of the first and third sequence numbers from the opposite terminal, the first and third of the packets transmitted immediately before And a step of overwriting the notified sequence number over the notified sequence number and transmitting it to the opposite terminal.
制御部と、ソケット部と、TCP部と、IP部とをそれぞれ備える現在運用されている稼動系サーバと、待機系のサーバと、を具備するTCPセッション切替装置と、前記TCPセッション切替装置の稼動系および待機系のサーバのいずれかとスイッチを介して接続される対向端末と、からなるTCPセッション切替システムで行われる切り替え方法であって、
前記稼動系のサーバの制御部が、稼動系サーバのソケット部とTCP部とIP部から、パケットの、タイムスタンプを含むソケット情報を取得し、系切り替えの際には、稼動系サーバによるパケット送受信を停止し、待機系サーバに対して系切り替えの要求を示す旨の要求信号と取得したソケット情報とを前記待機系サーバへ送信するステップと、
前記待機系サーバの制御部が、前記要求信号とソケット情報を受信すると、受信したソケット情報を待機系サーバのソケット部、TCP部、IP部に設定し、待機系サーバによるパケット送受信を開始するステップと、
前記対向端末が、前記稼動系または待機系サーバより送られてきたパケットのタイムスタンプを前回受信したパケットのものと比較し、過去のものであると判断した場合には、前回受信したパケットのタイムスタンプを前記稼動系または待機系サーバへ送信するステップと、
稼動系または待機系サーバの制御部が、パケットを対向端末へ送信した後に、前記対向端末よりタイムスタンプの通知を受信すると、直前に送信したパケットのタイムスタンプを、通知されたタイムスタンプを基準として補正して前記対向端末へ送信するステップと、を有することを特徴とするTCPセッション切替方法。
A TCP session switching device comprising a control server, a socket unit, a TCP unit, and an IP unit, each of which is currently operated and a standby server, and the operation of the TCP session switching device A switching method that is performed in a TCP session switching system including an opposite terminal connected to either of a server and a standby server via a switch,
The control unit of the active server acquires the socket information including the time stamp of the packet from the socket unit, the TCP unit, and the IP unit of the active server, and at the time of system switching, packet transmission / reception by the active server Transmitting a request signal indicating a request for system switching to the standby server and the acquired socket information to the standby server;
When the control unit of the standby server receives the request signal and socket information, the received socket information is set in the socket unit, TCP unit, and IP unit of the standby server, and packet transmission / reception by the standby server is started. When,
When the opposite terminal compares the time stamp of the packet sent from the active or standby server with that of the packet received last time and determines that it is a past time, the time of the packet received last time Sending a stamp to the active or standby server;
When the control unit of the active or standby server receives a time stamp notification from the opposite terminal after transmitting the packet to the opposite terminal, the time stamp of the packet transmitted immediately before is used as a reference for the notified time stamp. And a step of correcting and transmitting to the opposite terminal.
請求項1または請求項2に記載の装置をコンピュータシステムに実現させるプログラム。 The program which makes a computer system implement | achieve the apparatus of Claim 1 or Claim 2. 請求項9に記載のプログラムを格納した記録媒体。 A recording medium storing the program according to claim 9 .
JP2007178234A 2007-07-06 2007-07-06 TCP session switching apparatus and method, program, and recording medium Active JP4550867B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007178234A JP4550867B2 (en) 2007-07-06 2007-07-06 TCP session switching apparatus and method, program, and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007178234A JP4550867B2 (en) 2007-07-06 2007-07-06 TCP session switching apparatus and method, program, and recording medium

Publications (2)

Publication Number Publication Date
JP2009017344A JP2009017344A (en) 2009-01-22
JP4550867B2 true JP4550867B2 (en) 2010-09-22

Family

ID=40357655

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007178234A Active JP4550867B2 (en) 2007-07-06 2007-07-06 TCP session switching apparatus and method, program, and recording medium

Country Status (1)

Country Link
JP (1) JP4550867B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4862065B2 (en) * 2009-06-02 2012-01-25 株式会社日立製作所 LAC device and failover method
JP5634919B2 (en) * 2011-03-14 2014-12-03 沖電気工業株式会社 Communication apparatus and communication program
JP5655661B2 (en) * 2011-03-28 2015-01-21 富士通株式会社 Communication duplexer and communication duplex method
JP6149430B2 (en) * 2013-03-06 2017-06-21 日本電気株式会社 Multiplexed communication device, communication method, and communication program
CN105790985B (en) * 2014-12-23 2020-06-16 中兴通讯股份有限公司 Data switching method, first device, second device and system

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0637910A (en) * 1992-07-15 1994-02-10 Nec Corp Preliminary switching system for no7 signal link controller
JPH10327457A (en) * 1997-05-22 1998-12-08 Nec Corp Mobile communication system and channel switching method used for the same
JPH1185716A (en) * 1997-09-01 1999-03-30 Hitachi Ltd Parallel processor
JP2004120375A (en) * 2002-09-26 2004-04-15 Nec Saitama Ltd System and method for non-interrupt switching of asynchronous transfer mode switch
JP2004171370A (en) * 2002-11-21 2004-06-17 Nec Corp Address control system and method between client/server in redundant constitution
JP2004336726A (en) * 2003-04-15 2004-11-25 Matsushita Electric Ind Co Ltd Routing control method, router unit, and terminal device
JP2005057461A (en) * 2003-08-04 2005-03-03 Nippon Telegr & Teleph Corp <Ntt> Method for switching redundant system
JP2006215635A (en) * 2005-02-01 2006-08-17 Fujitsu Ltd Relay program, relay method and relay device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0637910A (en) * 1992-07-15 1994-02-10 Nec Corp Preliminary switching system for no7 signal link controller
JPH10327457A (en) * 1997-05-22 1998-12-08 Nec Corp Mobile communication system and channel switching method used for the same
JPH1185716A (en) * 1997-09-01 1999-03-30 Hitachi Ltd Parallel processor
JP2004120375A (en) * 2002-09-26 2004-04-15 Nec Saitama Ltd System and method for non-interrupt switching of asynchronous transfer mode switch
JP2004171370A (en) * 2002-11-21 2004-06-17 Nec Corp Address control system and method between client/server in redundant constitution
JP2004336726A (en) * 2003-04-15 2004-11-25 Matsushita Electric Ind Co Ltd Routing control method, router unit, and terminal device
JP2005057461A (en) * 2003-08-04 2005-03-03 Nippon Telegr & Teleph Corp <Ntt> Method for switching redundant system
JP2006215635A (en) * 2005-02-01 2006-08-17 Fujitsu Ltd Relay program, relay method and relay device

Also Published As

Publication number Publication date
JP2009017344A (en) 2009-01-22

Similar Documents

Publication Publication Date Title
US9424325B2 (en) Recording medium, distribution controlling method, and information processing device
US8462767B2 (en) Internet protocol compliant private branch electronic exchange and a method for redundantly configuring terminal interfaces
JP4411222B2 (en) Network, network terminal device, IP address management method used therefor, and program thereof
JP4550867B2 (en) TCP session switching apparatus and method, program, and recording medium
US9992058B2 (en) Redundant storage solution
US20180359118A1 (en) Flow synchronization
TW200920027A (en) Intelligent failover in a load-balanced networking environment
CN111259072A (en) Data synchronization method and device, electronic equipment and computer readable storage medium
WO2020057445A1 (en) Communication system, method, and device
KR20050002865A (en) A method for providing redundancy for channel adapter failure
JP7305882B2 (en) Slot negotiation methods and devices
KR20180099143A (en) Apparatus and method for recovering tcp-session
CN112653610B (en) Multilayer virtual switch upgrading method and device, electronic equipment and storage medium
WO2016177211A1 (en) Address resolution protocol (arp) table entry synchronization method and device
WO2020083271A1 (en) Aggregated link convergence method and apparatus, and storage medium
CN113765783B (en) Communication method and device
JP2004157753A (en) Firmware download system
JP5613142B2 (en) Distribution router, multicast distribution system, and multicast distribution method
JP6248018B2 (en) LAC device and failover method
JP4869144B2 (en) Communication device
WO2022083503A1 (en) Data processing method and device
JP2009278436A (en) Communication system and redundant configuration management method
CN111182014B (en) Data synchronization method and device
CN107332885A (en) The method and apparatus that a kind of IPSec VPN realize two-node cluster hot backup
EP2594051A1 (en) Systems and methods recovering from the failure of a server load balancer

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100122

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100203

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100325

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20100616

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20100708

R150 Certificate of patent or registration of utility model

Ref document number: 4550867

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130716

Year of fee payment: 3

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350