Jason Williard wrote:
I am trying to understand exactly how replication works. So far, I see that
changes made on a master server are replicated to the slave server(s).
However, if a change is made on a slave server, is that replicated back to
the master as well as all other slaves?
It can be if you enable circular replication (A-->B-->A) . However,
keep in mind that there is no way to prevent simultaneous updates (i.e.,
locking a table on A for update won't apply a lock to B..)
I am asking this question as I try to develop a plan for more efficient web
servers. Here is what I am planning. Please let me know if this sounds
smart, or like a bad idea.
Server 1: Redhat MySQL Master
Servers 2 & 3: Load-Balanced Redhat Apache web servers w/MySQL Slaves
Servers 2 & 3 will be serving the same content and will need access to the
same data from the MySQL server(s). I am hoping that running MySQL on each
of the web servers will help to reduce the overall load on the servers.
Are there update operations occuring on servers 2 and 3? What's the
bulk of your operations - selects or updates? There are a couple of
ways to go with this. You can use clustering - in which case you can
apply changes to the cluster and everything should stay in "sync", or
(the more straightfoward way) you can simply have all write operations
performed on the master - use the slave servers for lookup only.
If you use the second option (this assumes that the bulk of your
operations are 'select' statements) you might be able to squeeze out
some more performance by having the replica servers use a MyISAM table
type (Assuming you use InnoDB on the master).
If needed you can design a circular replication scheme - and have one of
the slaves switch to a "master" role when the master is unavailable.
--
Chander Ganesan
Open Technology Group, Inc.
One Copley Parkway, Suite 210
Morrisville, NC 27560
http://www.otg-nc.com
Phone: 877-258-8987/919-463-0999
Fax: 919-386-0158
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]