> Are there any benchmark comparisons between apache::dbi and mysql
relay?

I've never heard of this "mysql relay" before.  A Google search found
this:
http://www.firstworks.com/sqlrelay.html

Is that it?  Looks interesting!

> We're planning on having four sql servers, one of them will do all of
the
> writes to the db and the other three will only be used for reads from
the db. >
> The data in the db that is doing the writing will be constantly
replicated
> across the other three machines.  Which would be better to use to
initiate a
> persistent database connection? The main concern we have is having to
have
> two different database handles open for one script, one to the machine
that
> does the writing and the other to do the reads. Can Apache::DBI detect
this?

Apache::DBI can certainly tell the difference between two database
handles.  It caches based on your connection parameters.

For raw performance, you can't beat Apache::DBI.  It simply does a hash
lookup, and uses an already open connection if there is one.  SQL Relay
appears to need at least one socket connection to be created at the
beginning of each request and torn down at the end.

SQL Relay looks like it would scale further though, in situations where
the number of open database connections becomes an issue.  This is
generally not a problem for small sites or sites running databases like
Oracle on big iron, but it could be in your situation, using MySQL.

Also, SQL Relay claims to have load balancing features between multiple
replicated databases.  With Apache::DBI, you would need to configure
your mod_perl servers to point to specific databases.

If you try this thing out, please report back to the list on how it
works for you.  I think a lot of people here might be interested.

- Perrin

Reply via email to