3

Web hosting HA setup

I have 5 servers:

Server-1:     Webhosting Controlpanel (192.168.1.1)
Server-2:     Load balancer [Haproxy] (Public IP:192.168.1.2 and 
              Virtual IP:192.168.1.3)
Server-3 & 4: Data Servers Mounted data from NFS so data is same on 
              each server i.e /home (192.168.1.4, 192.168.1.5)
Server-5 :    NFS Server (192.168.1.6) shared directory /home

My problem is I'm not able to mount /home from virtual IP of "load balancer". I don't know how to configure HAproxy to access shared folders from servers.

I can access the mounted directories /home from servers directly but I want to mount the /home by load balancer so that I have some HA setup.

NOTE

Load balancer is working for Apache I can see the Apache default page loading from virtual IP of the load balancer.

Here is a model image of setup:

          ss of image

slm
  • 363,520
  • 117
  • 767
  • 871
Yousaf
  • 133
  • 1
  • 3
  • Are you trying to `exportfs` the `/home` share from the HAProxy server? – slm May 25 '13 at 22:02
  • FYI, I do not think you can re-export NFS using just regular kernel NFS. – slm May 25 '13 at 22:11
  • well i have mounted /home from nfs-server in server-3 and server-4 now just leave for a second and think they are normal directories... now i want to share home directory of server-3 and server-4 again with nfs... i shared them and i can access them individually but i want to access them under a load balancer i.e haproxy or some other program – Yousaf May 26 '13 at 11:36

1 Answers1

2

I'm not sure I full understand your question so if I'm incorrect please let me know. I think you'd be better off setting up a active/passive architecture for NFS vs. fronting NFS with HAProxy. There is a pretty detailed tutorial that walks you through setting up 2 NFS servers and using DRBD to have the 2 server monitor each other, and failing over as needed.

http://www.howtoforge.com/high_availability_nfs_drbd_heartbeat

I'd also point you to this thread that discusses in more detail the cons with trying to front NFS with HAProxy vs. the active/passive approach.

http://comments.gmane.org/gmane.comp.web.haproxy/5098

slm
  • 363,520
  • 117
  • 767
  • 871
  • it looks intresting let me check and i'd let you know if it works :) btw thanks for answering – Yousaf May 26 '13 at 11:36
  • @slm this link is broken http://comments.gmane.org/gmane.comp.web.haproxy/5098 Are you able to provide a different location for the content? – MariusPontmercy Jan 30 '17 at 11:05
  • @MariusPontmercy - from what I can tell gmane was discontinued as a service last year: https://developers.slashdot.org/story/16/07/28/2059249/the-end-of-gmane. I'd assume this is a widespread issue on SE sites given it was a giant cache for many mailing lists. In looking around I cannot find the exact thread that was referenced above. I'll continue looking for an alternative. – slm Jan 30 '17 at 18:50
  • 1
    @slm Thanks for the hint. Last September Lars Ingebrigtsen [wrote](https://lars.ingebrigtsen.no/2016/09/06/gmane-alive/) that he handed Gmane over to Yomura Corp. but it looks like the new owners are not putting a lot of effort on bringing it back online... So sad :( – MariusPontmercy Feb 03 '17 at 16:00