Thursday, October 10, 2013
High Availability Server
To configure a high availability server, we need to have the following configured:
Hearbeat - is a tool which provides cluster infrastructure. It is used to determine if a peer process fails to communicate so that its work can be done by another process.
Pacemaker - by detecting and recovering from node and service-level failures, it achieves maximum availability for your cluster services.
Apache- or Apache HTTP Server, is an open-source web server application which provides tools for web server development. It is supported on Linux, Windows and Mac.
In this exercise, the end user should not notice any failure on a particular website even there is really a failure behind the scene. There will be an active and passive server. If the active server fails, the passive server should do the job instead so that the process will continue.
Here are the steps to solve the problem:
1. First, make sure that the 3 tools are already installed on your machine. Three computers are required to perform the exercise. Two computers will be the server and the other one is the client.
2. Edit the Configuration files:
Suppose our network is 192.168.0.1
for the hosts file,
/etc/hosts should be
127.0.0.1 localhost
192.168.0.5 server1
192.168.0.6 server2
192.1168.0.24 cluster
for the authentication keys,
/etc/ha.d/authkeys should be
1 md5 'yourpassword'
other configurations
edit /etc/ha.d/ha.cf
logfacility local0
keepalive 2
deadtime 5
ping ipaddress
udpport 694
bcast eth0
node server1
node server2
auto fail_back2
change the haresources - what will be accessed by the client ( ipaddress)
edit /etc/ha.d/haresources
server1 iPaddr::192.168.0.24/24/eth0 apache2
3. Start heartbeat by running:
/etc/init.d/heartbeat start or services heartbeat start
Results:
In this exercise, I learned to configure a simple high availability server. I will now think differently everytime I access a website like Facebook. I learned how can server failures be solved using HA server.
Subscribe to:
Post Comments (Atom)



No comments:
Post a Comment