# load balancing & redundancy



## rafalj (Jun 16, 2010)

Hi,

I got technical question:
I got two machines both got two interfaces (bce0 and bce1)
bce0 got external IP, bce1 internal IP.

Is it possible to do it with two machines? What you propose to use? CARP maybe or something?

2x FreeBSD 8, apache 2.2, mysql 5, php5, disk array


----------



## phoenix (Jun 16, 2010)

HAST (hastctl()) with CARP (carp(4)).

HAST to "mirror" the storage between the two servers.  CARP to create a single virtual IP for both systems, so that clients don't know about the two separate servers.

And some devd magic to make it all work together.

If you add some extra NICs and switches, you can also use lagg(4) to create fail-over links between multiple switches, but that's probably overkill.


----------



## rafalj (Jun 17, 2010)

Thanks, I try to do it


----------



## phoenix (Jun 17, 2010)

If you search the archives for the freebsd-fs mailing list, I posted some scripts and devd.conf settings to allow CARP and HAST to work together.  It's not perfect, but it's a good start.


----------



## johnpupu (Jul 26, 2010)

http://lists.freebsd.org/pipermail/freebsd-fs/2010-March/007914.html
this topic ?


----------



## SirDice (Jul 26, 2010)

I'd set up (two way) replication between the two mysql servers. Use rsync to sync the website(s). Use CARP to get a common IP address for clients to connect to.


----------

