I have 2 machines (linux machine run my cpp application). About application: application collect packet from NFQUEUE and log them , based on some logic. The application is simple cpp application that run in infinite loop. the application need to support bandwidth of 500MbpS. The machines dont have an ip . They are kind of not visible listener on the network (identify some business logic logging).

I want to have master slave with minimum performance impact.

I want that all packets will be send to machine A and in case application on machine A stop working (I need your advice on how is best to signal that application stop working) packets should be route to machine B. I dont want to connect the two machines and the solution cannot be single point of failure. I need something like bypass that if the device crash packets still go through it.

Is there any way to do this in hardware or in lower network layer (dosnt want to do this in layer 7).

Hardware cost (the primary/slave "switch" is limit to 1500$).

  • I will try to clear the question as much as possible. The question is kind of vague , because i dont know about alternatives. – Avihai Marchiano Jul 17 '12 at 20:30

have a switch with port mirroring that sends traffic to both machines all the time. at the same time use ucarp/keepalived/heartbeat to turn on/off your application on the active node. you WILL need some way of communication between your servers to signal who's an active node; you can let it flow via separate interface [even crossover cable between both boxes].

| improve this answer | |
  • Thank you, but 2 problems - 1. the switch is single point of failure. if it crashed packet stop from being sent. 2. I have problem to connect the 2 machines. – Avihai Marchiano Jul 18 '12 at 8:39
  • what's the source of packets? have two redundant connections both mirroring the traffic... if needed use passive tap instead of a switch. – pQd Jul 18 '12 at 8:48

Use keepalived.

That will implement a "shared" IP address. The IP will only be assigned on a single host at a time.

Going from your example, assume that host A has IP .1 and host B has IP .2. You can make the shared address .3. While A is master it will have both .1 and .3. When machine A dies then .3 will transition to B.

| improve this answer | |
  • I can voteup (sorry). I will check it tomorrow. – Avihai Marchiano Jul 17 '12 at 20:56
  • I am deeply sorry , but this machine cannot have an IP. Its a listener machine that packet go thorough it (by using bridge). – Avihai Marchiano Jul 18 '12 at 7:48

Not the answer you're looking for? Browse other questions tagged or ask your own question.