OpenVZ Forum


Home » General » Support » Failover active/active Questions
icon10.gif  Failover active/active Questions [message #22018] Thu, 18 October 2007 15:47 Go to next message
plokko is currently offline  plokko
Messages: 5
Registered: October 2007
Junior Member
Hi,
i'm planning to create a cluster of 2 nodes with 2 gigabyte ethernet cards:
Eth0 = primary cards connected to local gigabyte switch(then to firewall,router and internet...)
Eth1 = with a crossover cable for heartbeat and DRBD.

How can i create an active/active failover configuration(i'm thinking if paravirtualization will help me)?
the server should run sql+php+apache and it must be as stable as performant.


i'm planning to use debian for all the virtual and phisical machine.

thanks to anyone who try to help me!


P.S.:a sample image is attacched,i hope you'll understand it!
  • Attachment: prog1333.jpg
    (Size: 86.43KB, Downloaded 462 times)
Re: Failover active/active Questions [message #22029 is a reply to message #22018] Fri, 19 October 2007 00:33 Go to previous messageGo to next message
bogomolov
Messages: 9
Registered: July 2007
Junior Member
Hi

Im working in a similar project just now Smile

For a active/active scenario, you nid heartbeat working _inside_ VPS's. Configure each pair of VPS's like a normal pair of hosts.

Remember - you need load necessary modules (like drbd) on HN and export/enable access to necessary devices (/dev/somedevicehere) in your VPS config

Good luk Wink
Re: Failover active/active Questions [message #22080 is a reply to message #22029] Fri, 19 October 2007 14:18 Go to previous messageGo to next message
plokko is currently offline  plokko
Messages: 5
Registered: October 2007
Junior Member
so i need 3 gigabyte ethernet cards(one for heartbeat+drbd,1 for primary server and one for the secondary)for each server?

Mysql(or postgressql) apache and php cannot be runned on two server,ho i should configure it?
i know how to configure a failover and active/active configuration but i don't know how to separate the processes between machines with load balancing.

what distro should i use to install OpenVz(domain0)?
Re: Failover active/active Questions [message #22112 is a reply to message #22080] Sat, 20 October 2007 14:58 Go to previous messageGo to next message
bogomolov
Messages: 9
Registered: July 2007
Junior Member
I think 02 Gbit ethernet cards are fine - but if u really have so much traffic between HNs, u can use 03 cards and make a bond with 2 of them.

Load Balance in a High Availability scope, i think to put services in both HNs, each inside of VPSs, in alternate state - like this:

         HN01                    HN02
[vps01-apache-active]---[vps01-apache-standby]  
[vps02-mysql-standby]---[vps02-mysql-active]
[vps03-proftp-active]---[vps03-proftp-standby]
.
.
.


But if u want load balance in a application scope, maybe this will help u - http://www.linuxvirtualserver.org/

About distro, some facts: OpenVZ manual and general instructions are driven for RH distros (RHEL, CentOS, Fedora) ,but i think this is like soccer teams - your team is better than your friend's team Wink

icon5.gif  Re: Failover active/active Questions [message #22113 is a reply to message #22112] Sat, 20 October 2007 20:21 Go to previous messageGo to next message
plokko is currently offline  plokko
Messages: 5
Registered: October 2007
Junior Member
...i think who debian is the best on stability for domain0.

If i readed the article well i must place a load balancer(with it's backup with failover)to balance the request over the two servers.
index.php?t=getfile&id=436&private=0
It can be a simple way to do it but i must buy another 2 machines and the packet should pass first on the load balancer and then they can be elaborated in one of the two clusters.
index.php?t=getfile&id=434&private=0
I think it's a good way if i use central storage but i want use drdb because if i use a central storage i must use failover on that and it's too expansive and i can loose on performance.

The second option is to develop a paravirtualized machine with 3 indipendent virtual machine.
The configuration is very clear and simple but i must divide the process on the 3 servers so when i request a php page with mysql from server0,server0 ask server 1 for the datas and elaborate it so i should create 3 line:
eth0 - connect the server to the switch(and internet)
eht1 - used for heartbeat and drbd
eth2 - used for the connections between server0 and server1
index.php?t=getfile&id=435&private=0


what do you think?
what is the best solution for security,performance and easy installation?

Thanks and i'm sorry if i think too much that necessary! Very Happy
  • Attachment: EX1.jpg
    (Size: 111.09KB, Downloaded 2682 times)
  • Attachment: Vcluster.jpg
    (Size: 115.51KB, Downloaded 2695 times)
  • Attachment: FAILOVER2.jpg
    (Size: 90.68KB, Downloaded 2484 times)
Re: Failover active/active Questions [message #22114 is a reply to message #22113] Sat, 20 October 2007 20:55 Go to previous messageGo to next message
bogomolov
Messages: 9
Registered: July 2007
Junior Member
I prefer the second option (its similar to my scenario).

For load balance, u can use DNS CNAME/A entrys ( http://www.cctec.com/maillists/nanog/historical/9806/msg0017 9.html) , Iptables rules (http://linuxgazette.net/108/odonovan.html), Apache/Squid proxy cache for static data (w/o bookmarks - google it!) and for MySQL, see this (http://en.wikipedia.org/wiki/MySQL_Cluster) and this (http://www.howtoforge.com/loadbalanced_mysql_cluster_debian).


PS; Im using Debian too Smile

Re: Failover active/active Questions [message #22115 is a reply to message #22114] Sat, 20 October 2007 22:31 Go to previous messageGo to next message
plokko is currently offline  plokko
Messages: 5
Registered: October 2007
Junior Member
...i like option2 too because is simple and cheaper Very Happy !

so i must do this things to run the server:
1)install debian with OpenVz as domain0
2)install 3 debian domu
3)insall on each domu heartbeat+drbd and the services for each v.machine
4)repeat the same passages for the second server
5)configuring the domu as active or passive(and ips)
6)set as default server php0.

Now when a user connect to the cluster,he connect to php0,php0 start a query over eth2 to sql1 and return all to the client.
file0 shoulden't be configured because if i must use a link to a big file in file0 i'll simply link in the html created with php0 directly.

Now i have some question about drbd and partitions,each server(or virtual server)must have it's own configuration but they share the datas.
Now i must create a partition for the o.s. and files and one other for files to copy with drdb or it's automatic specifing the directory?

also how should i configure the domu's ips?

Thanks for all!

P.S.:see the precedent images

P.P.S:yes debian is the king of the servers and rocks also in desktop! Very Happy
Re: Failover active/active Questions [message #22130 is a reply to message #22115] Mon, 22 October 2007 00:19 Go to previous messageGo to next message
bogomolov
Messages: 9
Registered: July 2007
Junior Member
Clue:

domain0 -> HN
domainU -> VE/VPS

Ur steps are right, but (with me at least) dont working - see
http://forum.openvz.org/index.php?t=tree&goto=22129& #msg_22129
for more info.
Re: Failover active/active Questions [message #22133 is a reply to message #22018] Mon, 22 October 2007 07:22 Go to previous message
plokko is currently offline  plokko
Messages: 5
Registered: October 2007
Junior Member
i need to install DRBD on each machine or only in the domain0?
how work?with folders or partitions?


now i can't test it(i haven't the hardware!)!
Previous Topic: PS on HN shows all process--even those in the VE
Next Topic: Handle ip from inside VE
Goto Forum:
  


Current Time: Fri Aug 29 15:29:04 GMT 2025

Total time taken to generate the page: 0.07305 seconds