The easiest way, which does not need any code changes, is to set up DNS round robin. Every time the application resolves the database domain name it gets a "random" (I believe the nameserver just circulates the list) IP back.
Atle - Flying Crocodile Inc, Unix Systems Administrator On Fri, 21 Jan 2005, Eben Goodman wrote: > I am considering setting up replication for a loaded database that has > to perform thousands of heavy selects every day. I want to have a > master with one way replication to multiple slaves. But I also want to > be able to load balance connections across the multiple slaves. What > options exist to enable a web server (apache) and or a web application > (php/perl) to do load balancing so not all queries are sent to the same > slave server, but distributed across all available slaves? One quick > and dirty idea would be to have a script that manages the database > connection layer, and based on time of day or something passes a > different server address through... but there must be sexier ways to > handle this sort of thing? > > any advice is appreciated. > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]