Re: load balacing in a replicated environment
Hello. You may tell the slave to replicate updates only for the certain database or table. See: http://dev.mysql.com/doc/mysql/en/Replication_Options.html Eben Goodman [EMAIL PROTECTED] 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. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.NET http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Gleb Paharenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.NET ___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
load balacing in a replicated environment
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]
Re: load balacing in a replicated environment
On Fri, Jan 21, 2005 at 09:21:18AM -0500, Eben Goodman wrote: connection layer, and based on time of day or something passes a You could use a TCP load balancer such as Balance or PEN, or you could modify the code to randomly select a server name from a list at connection time. -Jason Martin -- Are dog biscuits made from collie flour? This message is PGP/MIME signed. pgp7osbfhBB4l.pgp Description: PGP signature
Re: load balacing in a replicated environment
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]
Re: load balacing in a replicated environment
We have a mySQL clustering system in the works, which will be able to give you clustering support ( up to 32 nodes per cluster ), with full transactions support, in a write to ALL (at the same), read from LEAST BUSY architecture. In other words, all nodes will be able to serve as slaves. The least busy node will answer the next read query. There are more feautres planned, but I can't discuss it further until we launch the product (sometime in late Spring). Mark Papadakis On Fri, 21 Jan 2005 10:41:30 -0800 (PST), Atle Veka [EMAIL PROTECTED] wrote: 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] -- Mark Papadakis Head of RD Phaistos Networks, S.A -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]