I recently started experimenting with a way to setup MySQL to be 
load-balanced. I installed 2 servers with MySQL, NFS mounted the /mysql/var 
directory, then moved the grant tables to /mysql/grant, and created a 
symbolic link from /mysql/var/mysql to /mysql/grant. This appeared to work 
correctly, however, my tables soon began to show corruptions, and sometimes 
when an insert was made, and then immediately following a select statement 
was made against that data, it would not be found. I figured this was due 
to memory cache not being flushed to disk before the select statement. So 
the other server would have no record of the data. I adjusted the server 
settings so that data was always written to disk. This solved that problem 
99.99% of  the time. However, I was wondering if perhaps the server doesn't 
always try and select from the table on disk, but rather the table in 
memory. So that if server 1 inserts data into the table and writes it to 
disk, then server 2 selects data but only from the table it has loaded into 
memory it won't be able to select the new data?
Has anyone ever tried something like this?
Also, I want to try setting up replication such as A -> B -> A. I want to 
be able to put both system behind a load-balancing switch. If an insert is 
done on server A, then server B is updated, then server B sends an update 
to server A, will server A know to ignore it since it originated from server A?

Thanks,
Shon Stephens


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to