Re: Balanced mysql-connections

2001-03-07 Thread Steve Ruby

Kilian Looser wrote:
 
 Hi,
 
 i've the following setup:
 
 LoadBalancer - five Webserver with Apache and mysql - Database
 
 Now i got a problem. i've user's they insert records in the database. Now the insert 
is going throu, for example, webserver1. Now i'm doing a select throu webserver2 and 
i didn't get the information inserted by webserver1. i've to wait for about two or 
three seconds, till the tupel is present in the database. Is this a cache problem?
 
 any idea?
 
 thx Kilian

If you are saying that you have 5 mysql server pointing to a single set of data files 
then
this is not good mysql is not design to work that way.. the reason you are having
this problem is that each of the fiver servers have an OS disk cache that has something
in it different that what is actually in the file, mysql itself doesn't have
a data cache, it expects the file system to do that.

You really should have 5 replicas of the database and send all updates through one
server and use all the others for reads. The scheme that you mention above
(assuming NFS or something pointing to the single data files?) works fine but
only in READ ONLY situations.

In addition to the dirty read problem you see above you will probably corrupt
yoru data in short order.

-
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




Re: Balanced mysql-connections

2001-03-07 Thread Joseph Bueno

Kilian Looser wrote:
 
 Hi,
 
 i've the following setup:
 
 LoadBalancer - five Webserver with Apache and mysql - Database
 
 Now i got a problem. i've user's they insert records in the database. Now the insert 
is going throu, for example, webserver1. Now i'm doing a select throu webserver2 and 
i didn't get the information inserted by webserver1. i've to wait for about two or 
three seconds, till the tupel is present in the database. Is this a cache problem?
 
 any idea?
 
 thx Kilian

Hi,

Are you using INSERT with either DELAYED or LOW PRIORITY options ?

Hope this helps
--
Joseph Bueno
NetClub/Trader.com

-
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