# cluster failover with 2 nodes



## nORKy (Oct 13, 2010)

HI,

A friend want to build an Apache failover cluster with only 2 nodes (Linux IPVS + heartbeat + apache on each node).

Me, I think  4 nodes is better (2 nodes openBSD loadbalancer/cluster (CARP) + 2 nodes apaches)


```
(ipvs+heartbeat+apache) ---- (ipvs+heartbeat+apache)
```
VS

```
openBSD--openBSD
  |    \/    |
  |    /\    |
Apache   Apache
```


What do you think ?


----------



## da1 (Oct 13, 2010)

I would say it depends on load/budget. If you got the budget (machines,electricity,etc) go ahead with the 4x scheme.

But 1 question: how do you plan on setting up the apache cluster ? AFAIK, FreeBSD has no failover cluster software (thinking of something hacmp-like)


----------



## nORKy (Oct 13, 2010)

da1 said:
			
		

> I would say it depends on load/budget. If you got the budget (machines,electricity,etc) go ahead with the 4x scheme.
> 
> But 1 question: how do you plan on setting up the apache cluster ? AFAIK, FreeBSD has no failover cluster software (thinking of something hacmp-like)



I know the response only for the 4 nodes solution.

Look at this:

```
openBSD--openBSD
  |   \/    |
  |   /\    |
Apache   Apache
```

The 2 openBSD have 3 link (2 apache + 1 with the other openBSD)
The 2 openBSD use CARP protocol to have a virtual IP adresse, it's the High availabilty Part.
The 2 openBSD use relayed to load balance at "level 7" between 2 Apache, it's the cluster part.

The 2 Apache (FreeBSD) don't need cluster software.
Perhaps we can use HAST, that's all.

The 2 openBSD can be virtual, it's only 500Mo hard drive, no ports to install (relayd + pf are on base system).


----------



## nORKy (Oct 13, 2010)

da1 said:
			
		

> I would say it depends on load/budget. If you got the budget (machines,electricity,etc) go ahead with the 4x scheme.



Ok, but, what is, technicaly, the difference? Why 4 schemes is better than 2 schemes?
I don't known what is IPVS, and I'm not a Linux User (I'm a BSD user). I just read some things about HAProxy or VRRP, nothing about IPVS.


----------



## biru (Oct 14, 2010)

HAproxy and VRRP is good idea. My suggestion why not try to use varnish ?


----------

