0

I have two servers, each with a physical IP address on a physical network interface:

Server A: 192.168.0.1 (eth0) - PRIMARY
Server B: 192.168.0.2 (eth0) - BACKUP

I want to run an application on server A as primary, and the same application on server B as standby. The application is stateless, so I don't need to sync data between the two. The system that sends requests to the application expects to send them to a single IP address. So I need to configure a third IP address:

192.168.0.3 (eth0:1)

...that will be bound to Server A. In the event of a fault with the application on Server A, an alarm will be raised, and in response to this I want to execute ifdown eth0:1 on Server A, and ifup eth0:1 on Server B, shifting the virtual IP over to the other server, so that it will begin to process requests without having to reconfigure the systems that send the requests.

My question is, how do I configure this on RHEL 4? It's tricky to search for info about this on Google as I'm not entirely sure what this type of config would be called, and "Virtual IP RHEL" just gives a very wide range of topics.

BG100
  • 169
  • 1
  • 14

1 Answers1

1

Linux HA will do exactly this; it's one of its core functions. You will not need to create the virtual interface manually, only put in the haresources file

primary.example.com 192.168.0.3/24/eth0

Configuring HA to treat the failure of the application as the failure of the cluster node might be tricky. Since you say you have an alarm process already, I'd be inclined to add to the alarm logic so that it executed an hb_standby (or modern crm shell equivalent) on the primary, which will automatically bring up the interface on the secondary.

MadHatter
  • 79,770
  • 20
  • 184
  • 232
  • I can configure the alarm reaction script to run anything I want on the server, so I don't think that will be a problem. Thanks for the link... I'll read up on this and work out if it'll do what I need. – BG100 Sep 01 '11 at 14:20