1

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$).

Avihai Marchiano
  • 612
  • 3
  • 16
  • 32

2 Answers2

1

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.

bahamat
  • 6,263
  • 24
  • 28
1

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].

pQd
  • 29,981
  • 6
  • 66
  • 109
  • 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 08: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 08:48