The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register. September 21, 2019, 02:46:52 AM

Login with username, password and session length


Pages: [1]
  Print  
Author Topic: multiple master mysql  (Read 3350 times)
nutballs
Administrator
Lifer
*****
Offline Offline

Posts: 5627


Back in my day we had 9 planets


View Profile
« on: June 14, 2009, 05:54:42 PM »

Im not sure wtf to do at this point. I want more database power.
moar=gofast

multiple master?
mysql cluster?

downsides?

what happens in a failure under multiple master?

is there a really easy way to do this?
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 #1 on: June 14, 2009, 06:43:08 PM »

The only way that multiple master will increase speed is if you have websites load balanced on multiple servers, then multi-master the database between them. It's bad enough to master twice, you go much beyond that and I'd wager the potential fubar factor would be off the charts.

Personally, if I needed way more speed I'd go with several web machines connected to a single DB instance via a fibre 10G or even 100G connection, and the DB running on SSDs or RAM drives.

In lieu of spending all that though, I'd go with a read-preferenced array like Google: I'd have several web servers that are all slaves to the DB master, then I'd never write to the local, only to the master and let the renderers get slaved updates. Make writing heavier than reading. And any non-time critical writes can be done to a local DB, then flushed out on a schedule to the master - rather than trying to make everything real time, which will be a charlie foxtrot.
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 #2 on: June 14, 2009, 07:19:56 PM »

thats what I am thinking as well. just needed a gut check and that did it.

Im gonna have 1 write box and many read boxes.

This will be an upgrade to your database class, to do the round robin reads, and write to master.

realistically my master can be read also, or could be a lighter box since the writes are not that heavy.
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 #3 on: June 14, 2009, 08:02:13 PM »

OOOOOHHHH.... I like it! Hadn't thought about modifying the class to  read (here) write (there) ... Like to work with you on that. Not tough but pretty cool.

MySQL slaving is pretty damn strong and near real time, so I think that is a flat out excellent notion. Except if you want to do local writes and upload on a schedule, which would keep the total turnaround time to a minimum.
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 #4 on: July 02, 2009, 02:23:39 PM »

and... I just discovered this is in process at Mysql.
http://dev.mysql.com/downloads/mysql-proxy/index.html

mysql proxy. its in alpha, so no joy yet, but its a load balancer (among other things).
So. 1 ip, many machines to deliver results.
Logged

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

Posts: 666


Thats craigs list for ya


View Profile
« Reply #5 on: July 04, 2009, 12:31:19 PM »

and... I just discovered this is in process at Mysql.
http://dev.mysql.com/downloads/mysql-proxy/index.html

mysql proxy. its in alpha, so no joy yet, but its a load balancer (among other things).
So. 1 ip, many machines to deliver results.

balls awesome.

... its about time.

Logged

The watched pot, never boils... But if you walk away from it , the soup burns.  What gives?
nutballs
Administrator
Lifer
*****
Offline Offline

Posts: 5627


Back in my day we had 9 planets


View Profile
« Reply #6 on: July 04, 2009, 02:18:48 PM »

kind of like a breakout of the "proxy" part of the Cluster package i think.
So, technically, i could install this on the web box, all web apps can access localhost.

BUT all the actual DB is on other machines. multiples actually. all set up in master-slave or master-master.

I wonder if you can set it up to know which machine is the master for writes, and which are slaves for reads?

I am still considering mysqlCluster though.
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 #7 on: July 04, 2009, 04:15:22 PM »

And I will still Popcorn while you work through it. Definitely interested in your findings.
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 #8 on: July 04, 2009, 08:54:38 PM »

the only downside to mysql cluster is that you need 1 authority really. Or at least is should.
So in my case I could see my webbox being the auth, and the two DB machines being the workhorses.

with proxy though you can set master master. so my webbox would be proxy, and I would have 2 masters. downside is, no auth.

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!