It would go in your model file -- the same place where you would normally define the db connection. Anthony
On Thursday, July 21, 2011 2:29:45 PM UTC-4, Nils Olofsson wrote: > Hi Massimo, > > I'm testing amazon's RDS and EC2 , 1 master many slaves. > > I could not find out where exactly I am suppose to be putting this > code. > > Regards, > > Nils > > > On Jul 21, 6:48 pm, Massimo Di Pierro <massimo....@gmail.com> > wrote: > > You would only use this if you have a replicated database. I.e. you > > are running many database servers synced with each other. For example: > http://en.wikipedia.org/wiki/Multi-master_replication > > > > On Jul 21, 12:44 pm, Nils Olofsson <nils.o...@gmail.com> wrote: > > > > > > > > > > > > > > > > > Hi, > > > > > I see this in the Documentation: > > > > > if request.action in read_only_actions: > > > db = DAL(shuffle(['mysql://...1','mysql://...2','mysql://...3'])) > > > else: > > > db = DAL(shuffle(['mysql://...3','mysql://...4','mysql://...5'])) > > > > > I'm not sure where exactly I should be using this ? > > > > > And does anyone have some sample code as to how it should be used ? > > > > > Nils