The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register. October 14, 2019, 06:05:10 PM

Login with username, password and session length


Pages: [1]
  Print  
Author Topic: master master. first time replication... errrr will it every catch up?  (Read 2235 times)
nutballs
Administrator
Lifer
*****
Offline Offline

Posts: 5627


Back in my day we had 9 planets


View Profile
« on: August 03, 2009, 09:26:27 AM »

holy smokes.
Seconds_Behind_Master: 89068
thats over a day behind.
It seems to be going down at the rate of 25 seconds per 10 seconds.

so.... at that rate, it will catch up in....

59 hours... hahahah and thats assuming no big database churns in the meantime.

ugh.




Logged

I could eat a bowl of Alphabet Soup and shit a better argument than that.
vsloathe
vim ftw!
Global Moderator
Lifer
*****
Offline Offline

Posts: 1669



View Profile
« Reply #1 on: August 03, 2009, 09:34:45 AM »

Uh, did you LOAD DATA FROM MASTER?

Also, did you grant proper permissions between masters and slaves?

Also, MySQL master-master replication is a hacky workaround, you have to setup master->slave both ways, so in essence both machines are a master and a slave. Is that what you did?
Logged

hai
nutballs
Administrator
Lifer
*****
Offline Offline

Posts: 5627


Back in my day we had 9 planets


View Profile
« Reply #2 on: August 03, 2009, 10:25:36 AM »

actually i did not do LOAD DATA FROM MASTER since its no longer the "correct" way to do it and not even sure if its supported in my current version of mysql.

I set up my new slave.
Dumped the database, which took half a day.
then imported from the dump, which took over half a day.
and turned on replication and it all started doing its thing, with records copying.

I can see my big ass database updating, growing in size.
It just is REALLY busy, and REALLY big.

And yes its master->slave slave<-master
But thats no longer "hacky" as its now actually the standard way to do 2 servers, and most recommend it in 3 servers even. cluster is for more it seems.

I used this walk through:
http://www.howtoforge.com/mysql5_master_master_replication_debian_etch

Logged

I could eat a bowl of Alphabet Soup and shit a better argument than that.
nutballs
Administrator
Lifer
*****
Offline Offline

Posts: 5627


Back in my day we had 9 planets


View Profile
« Reply #3 on: August 03, 2009, 12:39:07 PM »

62K seconds behind. woot!
go baby go! 17 hours left. youcandoit.
Logged

I could eat a bowl of Alphabet Soup and shit a better argument than that.
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #4 on: August 03, 2009, 05:09:42 PM »

How long did you go between mirroring the server and starting the slave? That's a nasty amount of transactions that were not moved... or is it huge blobs that need to move?
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
nutballs
Administrator
Lifer
*****
Offline Offline

Posts: 5627


Back in my day we had 9 planets


View Profile
« Reply #5 on: August 03, 2009, 06:25:59 PM »

it was about 28 hours from me locking the master tables to dump until finishing the import of the dump into the slave.

That means about 5.8million queried based on my stats if i do the math. LOL
206k/hour
OUCH.

but i assume that only table changing queries affect the replication of course, so...
it looks like about 3.5 million table altering trans.
again. OUCH.
Logged

I could eat a bowl of Alphabet Soup and shit a better argument than that.
nutballs
Administrator
Lifer
*****
Offline Offline

Posts: 5627


Back in my day we had 9 planets


View Profile
« Reply #6 on: August 03, 2009, 09:11:22 PM »

Woot! live and kicking. So... now to add a chunk of code and viola, ghetto round robin.

Code:
function roundrobinhost()
{
$hosts=array('data1','data2');
return $hosts[array_rand($hosts)];
}

working great Smiley
Logged

I could eat a bowl of Alphabet Soup and shit a better argument than that.
Pages: [1]
  Print  
 
Jump to:  

Perkiset's Place Home   Best of The Cache   phpMyIDE: MySQL Stored Procedures, Functions & Triggers
Politics @ Perkiset's   Pinkhat's Perspective   
cache
mart
coder
programmers
ajax
php
javascript
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS!