<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1170" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>In order to have load sharing and 
redundancy in Mnesia and following the tips that I recolected, I decided to 
implement a solution with three nodes (one per machine) and fragment the tables 
in X (X multiple of three) fragments distributed between the three nodes as 
follows:</FONT></DIV>
<DIV><FONT face=Arial size=2>Node A - fragments 'ai' and 'bi'</FONT></DIV>
<DIV><FONT face=Arial size=2>Node B - fragments 'bi' and 'ci'</FONT></DIV>
<DIV><FONT face=Arial size=2>Node C - fragments 'ci' and 'ai'</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>With i between 1 and X (this to avoid huge 
fragments)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I am just to put this mess in service. </FONT><FONT 
face=Arial size=2>Does anyone have expirience with an arquitecture like this 
running stable in field? My laboratory tests were all right, but it is not the 
same at client side.</FONT></DIV>
<DIV><FONT face=Arial size=2>
<DIV><FONT face=Arial size=2>Any recomendations before doing that?</FONT></DIV>
<DIV> </DIV></FONT></DIV>
<DIV><FONT face=Arial size=2>A solution with fragments like the one above, 
assures me load sharing between Mnesia nodes?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thanks a lot, Carlos.-</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV>Carlos> Hi, I want to implement load sharing without loosing 
redundancy.<BR>Carlos> <BR>Carlos> Can anyone give me an example on how to 
fragment and replicate a<BR>Carlos> Mnesia database to have this 
implemented?  I mean referencing, how<BR>Carlos> many nodes, machines 
and fragments. And the distribution of them.<BR>Carlos> <BR>Carlos> For 
example I figure that  this could be a good solution, isn't 
it?<BR>Carlos> <BR>Carlos> Two nodes in one machine and two other nodes in 
another machine. Nodes<BR>Carlos> A and B in machine M1, nodes C and D in 
machine M2.<BR>Carlos> <BR>Carlos> All DB tables fragmented in two 
fragments one fragment resident at<BR>Carlos> node A, and one fragment at 
node C (then we use M1 and M2 machines to<BR>Carlos> have load 
sharing).<BR>Carlos> <BR>Carlos> This implementation replicated as 
follows: fragments at node A<BR>Carlos> replicated at node D, and fragments 
at node C replicated at node B<BR>Carlos> (then we have cross replicas - M1 
fragments with M2 ones).  See<BR>Carlos> attachment for 
representation.<BR>Carlos> <BR>Carlos> I would apreciate your answer very 
much, to have my DB implemented as<BR>Carlos> soon as possible.<BR>Carlos> 
<BR>Carlos> Thanks, Carlos E. Silva.-<BR><BR>In order to keep things simple, 
I would suggest that you:<BR><BR>- Only have one node per machine. Why have you 
choosen to have two<BR>  nodes per machine?<BR><BR>- Avoid addition of new 
fragments to existing tables while system is<BR>  in full operation. 
Addition of new fragments is quite expensive as<BR>  it will imply existing 
records to be rehashed and moved between<BR>  fragments. A plain move of a 
fragment is cheaper.<BR><BR>- Avoid huge fragments. If you expect large data 
volumes you should<BR>  distribute it over more fragments than you would do 
for small data<BR>  volumes. This would give you a better precision in your 
load<BR>  balancing and lesser disturbance when you move fragments 
between<BR>  nodes.<BR><BR>- Try to estimate the maximum number of nodes 
(machines) that you<BR>  that you ever will use in your system. The number 
of initial<BR>  fragments should always be more than the maximum number of 
nodes,<BR>  perhaps a factor 5 or 10 more.<BR><BR>- Take a look at the 
mnesia/examples/bench example.<BR><BR>/Håkan<BR><BR>PS.<BR>  If your 
maximum configuration only is two nodes there are no point<BR>  in using 
fragmented tables at all, for the purpose of load balancing.<BR><BR>---<BR>Håkan 
Mattsson<BR>Ericsson<BR>High Availability Software, DBMS Internals<BR><A 
href="http://www.erlang.org/~hakan/">http://www.erlang.org/~hakan/</A><BR></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV></BODY></HTML>