tags:

views:

235

answers:

1

Hi to all,

I am developing one social-networking. For DB Load Balancing, i want to use Master-slave Replication in Mysql.

Before start working on Replication, i want to know something like

1) How can we setup that replication

2) what is the advantage & Dis-advantages of Master-slave Replication

3) when we are using "select" queries, Is that , we need to send request to Master or Slave (manually)

or Master automatically sent to slave...i want to know about this.

4) can we install Master & Slaves in one system(i.e. CPU)? is it suggestable?

Thanks in advance

+1  A: 

Firstly, read the MySQL Replication documentation. It's very useful and will answer a lot of questions you haven't even realized you will need to ask.

Handling replication in your application means you can distribute the SELECT statements. They don't need to replicate and will return the same results no matter which server they hit. However, UPDATE, INSERT and DELETE statements must occur on the master.

Remember that replication spreads the read load, but every server still has the same write load. Depending on your query read/write ratio, this might not be appropriate. (Check out LiveJournal's presentation about how they scaled. It's easy to find.)

Edit: Meant to reference LiveJournal, not Facebook. D'oh!

staticsan
thanks for your answer