It's a little bit off-topic but have a look at "How to set up a load-balanced 
MySQL cluster" (http://www.howtoforge.com/loadbalanced_mysql_cluster_debian). 
If you use a load-balancing server in front of the mysql cluster you don't have 
to change your application. The HowTo uses UltraMonkey to wrap the cluster 
behind a virtual IP that you have to use in your application. It works fine.

> -----Ursprüngliche Nachricht-----
> Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> Im Auftrag von Will Glass-Husain
> Gesendet: Dienstag, 5. Dezember 2006 23:43
> An: Apache Torque Users List; [EMAIL PROTECTED]
> Betreff: Re: duplicate ID exception in cluster
> 
> 
> Hi Henning!
> 
> It's a real (Tomcat) cluster.  Two instances of Tomcat 
> talking to a single database.  (no database replication).  I 
> use Apache/mod_jk to split requests (based on session) 
> between the two Tomcats.  Allows me to run high number of 
> users with a memory-heavy application.
> 
> Thought briefly about database replication but since this is 
> write-heavy application it didn't seem to make sense.
> 
> thanks,
> WILL
> 
> On 12/5/06, Henning P. Schmiedehausen <[EMAIL PROTECTED]> wrote:
> > "Will Glass-Husain" <[EMAIL PROTECTED]> writes:
> >
> > >Hi,
> >
> > >I just set up a new 2 server cluster with two instances of Tomcat 
> > >both reading/writing from a single database.  I'm using 
> Torque 3.0, 
> > >the default ID Broker and MySQL 5. (InnoDB)
> >
> > Real cluster or just master/slave (or master/master with only one 
> > master active at a time)? The latter is just replication, 
> not a real 
> > cluster.
> >
> > >My problem... Under heavy load, I notice that most write 
> requests on 
> > >one of the servers fails with a duplicate ID error.  
> Typically, each 
> > >page request that fails does 10-20 insert statements.
> >
> > >Any tips as to how I might make this cluster work with 
> simultaneous 
> > >writes?
> >
> > a) in a master/master config, you can not write to both 
> masters at the
> >    same time. End of story. I had a summer project where we tested
> >    exactly that *very* extensively. It does not work. No 
> matter what you
> >    google on the internet or what mysql.com wants to tell 
> you. You will
> >    get the described error sooner or later. If you want to have
> >    master/master with failover, that is fine. Two active 
> masters not.
> >
> > b) you probably run into the AUTO_INCREMENT problem. Make 
> sure that you
> >    have 5.0.20 at least. See 
> http://dev.mysql.com/doc/refman/5.0/en/replication-features.html
> >    for some docs.
> >
> >
> >         Best regards
> >                 Henning
> >
> > --
> > Henning P. Schmiedehausen  -- [EMAIL PROTECTED] | J2EE, Linux,
> > 91054 Buckenhof, Germany   -- +49 9131 506540 | Apache person
> > Open Source Consulting, Development, Design | Velocity - Turbine guy
> >
> >           "Save the cheerleader. Save the world."
> >
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> 
> -- 
> Forio Business Simulations
> 
> Will Glass-Husain
> [EMAIL PROTECTED]
> www.forio.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to