Similar to the article posted here:
http://fusionsecurity.blogspot.com/2013/07/ive-talked-about-subject-of-long-lived.html
I am wondering if there's an open source software that can do the same. If a server is down, the traffic is forwarded to the other server without the client ever knowing it. If a server is back online, it can intelligently rebalance the active TCP connections.
Additionally, is there a way to insert a custom messaging protocol between the load balancer and the servers? For example, a client is in the middle of transfering data, and you need to do a blue-green deploy, thus shutting down some of the servers and keeping the others online. To prevent the data from being truncated, the LB can inform the servers that are about to be shutdown some sort of message to indicate that it needs to complete whatever requests it's currently doing. Then once the servers are done sending messages, it informs the LB back, and the LB then shuts them down. All new and existing connections are forwarded to the other servers.
Then once the deploy is completed, it does the same for the other set of servers.
This sounds like I would need a custom load balancer, but I want to make sure that I am not going to rewrite things that's been done. It sounds like a common problem.