Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 06-20-2012, 12:56 AM   #1
LQ Newbie
Registered: Jun 2012
Posts: 2

Rep: Reputation: Disabled
How to handler TCP long connection failover?

I have many linux servers (cluster) to run same application.Application use C/S structure,client connect to server using TCP long connection(server is basing apache mina socket framework). my question is : When one server shutdown, how other servers can keep the socket connection established between the failure server and the clients?
so the server-down failure is transparent to client and the client need not reconnect to server?

Old 06-20-2012, 02:48 AM   #2
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
sounds like you need a load balancer in the middle there, and some sort of session mirroring on the back? How do you currently control which clients hit which servers? Generally taking over the live TCP connection is not going to happen, but with a load balancer between them, it can handle the broken connection on the server side and re-establish unknown to the real client. Totally depends if the internals of the application can actually handle this. With a connection lasting so long, it sounds like there must be a lot of connection specific data. Is it at all possible to just start sending existing data to a new server and it have a clue what's going on?
Old 06-20-2012, 03:00 AM   #3
LQ Newbie
Registered: Jun 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thanks for reply,I want to use LVS to implement cluster,but It seems it can not solve the long TCP connection keeping issue.any solution can be failover to client and application transparent?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How long before TCP ack's timeout and36y Linux - Networking 1 10-13-2010 11:53 AM
TCP tuning in Linux for non-blocking socket connection over long-path WAN mmmike123 Linux - Networking 0 04-23-2009 01:32 PM
failover with backup internet connection? enilder Linux - Networking 1 11-04-2005 07:47 PM
redundant internet connection with failover shashi_lq Linux - Networking 1 02-13-2004 11:39 AM
TCP-IP event-handler in a Linux server Zingaro2002 Linux - Networking 4 06-06-2002 10:05 AM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:24 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration