replication?

0 views
Skip to first unread message

5hundy

unread,
Sep 1, 2008, 5:46:17 PM9/1/08
to erlyweb
The backend of my project is very read-heavy and in it's current
implementation (Rails), we have been very successful with using
replication. To achieve this we keep a mysql connection manager object
that checks if a given statement is a write or a read and switches
between the master and the replicated slave as needed. Has anyone done
something like this with erlydb? If so, how?

Yariv Sadan

unread,
Sep 1, 2008, 7:00:01 PM9/1/08
to erl...@googlegroups.com
Do you only read from the slave or round robin reads between master
and slave? I don't know of such setup used with ErlyDB but it would be
pretty cool to implement it. At code generation time, you could tell
ErlyDB which db pools to use for reading and which for writing and
ErlyDB would make the generated functions use the different pools
depending on their functions.

Yariv

5hundy

unread,
Sep 1, 2008, 7:41:33 PM9/1/08
to erlyweb
We currently perform all reads from the local slave. Your suggestion
sounds excellent - I'm really new to erlyweb so any more specific
instructions would be greatly appreciated. I haven't tried using more
than one DB connection yet - still working on the basics of the
application.
Reply all
Reply to author
Forward
0 new messages