query routing, master & slaves

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

query routing, master & slaves

Post by Benjamin »

Do any of you have any experience with applications such as MySQL Proxy?

In large applications what is the best way to determine what server to route the queries to?
User avatar
nathanr
Forum Contributor
Posts: 200
Joined: Wed Jun 07, 2006 5:46 pm

Post by nathanr »

how many servers?
if its master slave.. do all selects on slave, all inserts/updates/deletes on master.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Post by Benjamin »

Well there are issues in that if you run a select that depends on an insert/update/replace/ or stored procedure that happened right before it, it won't be in the slave servers yet. For the sake of example, let's say there are 4 slaves. I'm really just looking for general answers though.
User avatar
nathanr
Forum Contributor
Posts: 200
Joined: Wed Jun 07, 2006 5:46 pm

Post by nathanr »

okay, I'm goign to bail out of this thread now - only recommendation would be to move up to mysql cluster and let it do the working out :)
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Just use master-master replication if you can. It saves so many headaches like this.
Post Reply