0

I've been playing around with high-availability solutions for a few days and so far I find UCARP very useful for IP fail-overing.
It's dead simple and does the job.

I was thinking about taking it a step further:
If the router which connects the two nodes sharing the same IP would send ALL packets to both nodes (at all times), then I could achieve much greater load balancing.
It's like a "master-master" solution instead of "master-backup".

Source IPs are dividable.
The group of redundancy, let's say two such nodes, share one ("virtual") IP, as said.
While they are both up they would simply divide the source IP (its plain number) of the client and know how to react.

For example, Node1 takes IPs which are divided by 2.
Node2 takes the rest.
A client initiates a TCP/IP connection (through the shared IP).
The router that connects both nodes send this request to both.
If the client's IP perfectly divides by 2 then Node1 answers.
At this point Node2 ignores, because it knows about Node1.

If one node fails, for example Node1, the other (Node2) detects it - normally, as UCARP does anyway!
At that point Node2 would start serving the rest of the clients.

When Node1 comes back Node2 will stop answering SYN requests (first steps of TCP/IP connection initiation) coming from an IP dividable by 2, letting Node1 continue serving.

A possible issue might rise from the router's direction: It needs to send each incoming packet to X nodes in the group of redundancy. High(er) internal network load.

Another possible issue is that each node practically gets many many packets, even those it doesn't "want".

With today's routers/networkd-cards I see this as a very small price compared to the benefit of very high availability.
Not to mention that in such case I'd utilize 100% of my resource (in a good way) instead of having one or more "stand-by" servers which do nothing more than "standing-by".

My exact question is:
1) Is there already such a solution? (open-source, freeware, linux-based).
2) Can a router support such thing? What standards should it support? What would I ask a DS/VPS provider regarding this ability?

Anyway this is some of my reflections regarding this subject. I'd be happy to get a concise answer supported by links and a few words. More than that is obviously welcome :)

Poni
  • 305
  • 3
  • 13
  • Why not just run two failover IPs, and load balance between them? There is something similar to what you're looking for, Cisco's GLBP, but only load balances for different nodes on the same layer 2 network, due to how ARP works (your "selective answering" idea is completely impossible). – Shane Madden Nov 28 '11 at 01:43
  • I'm not sure why my "selective answering" idea is impossible, after all the servers are in the same farm/LAN. It doesn't rely on IP, thus it is possible. I'm sure that in the hardware domain this idea is already implemented - some specialized equipment (from Cisco etc'). – Poni Nov 28 '11 at 17:58
  • You're ignoring everything about how ethernet and IP are designed. TCP doesn't just ignore connections that it doesn't know about that are being sent to an address the computer owns; it sends a reset packet. Every aspect of the network is built to assume that a unicast address is owned by one system. To build this, you'd need the craziest pvlan/mirror port/static ARP configuration under the sun, then you'd need to take a machete to the Linux TCP stack to twist it to your bidding. Don't reinvent the wheel, just use a second failover address and load balance between them. – Shane Madden Nov 28 '11 at 18:24
  • Shane, you couldn't be clearer! I'll let this question be for a while in the hope that someone will "surprise" with another answer, but thank you, really! Maybe even write an answer for selection. Thank you TomTom as well but Shane's answer did it :) – Poni Nov 28 '11 at 21:37

1 Answers1

1

I do not think this is possible / feasible. It definitely does not exist because it is of very limited use compared starndard aproaches.

The main issue i see is tracking every ip packet in and out and syncing the state of the IP stack on both computers in a way that is fully transparent for the application. How do you "simulate" an application on node 1 doing the work but not answering, or magically picking up the stae of a node 2? It can not just continue the tcp communication of a nocde 1 application without... special programming.

TomTom
  • 50,857
  • 7
  • 52
  • 134
  • No no Tom, you got me wrong. Let's put it this way: An application have no idea about the balancing/fail-overing. It just accepts connections and serves. In the lower level, there's something like a "filter" which will either accept or ignore TCP connection initiations. If an incoming SYN (TCP connection initiation) request is coming, the lower level of the solution will take it or leave it based on its "responsibility of IPs" (IP range, based on division of IP number). – Poni Nov 27 '11 at 20:49
  • When a TCP connection is accepted it will be served normally from the same node accepted it, EVEN when the failed node (let's say it was supposed to be served by another node but that node has failed) has came back. Thus, you do not need any syncing/tracking of IP stack in any special form. It's all running normally. The ONLY EXCEPTION is whether the connection is being accepted or not, again. A node does NOT need to keep records of other nodes' connections. Hope I've made it clear... let me know. – Poni Nov 27 '11 at 20:52