I want your comments regarding a replication and high-availability setup.
This is the setup:
Load balancer
+---------------+
| Foundry |
| ServerIron |
| |
+---------------+
/ \
/ \
/ \
/ \
Server 1 Server 2
+------------+ +-------------+
| Apache | | Apache |
| Tomcat | | Tomcat |
| + | | + |
| mysql | | mysql |
| | | |
| Master | | Slave |
+------------+ +-------------+
I going to use Server I for all queries that changes the database, and
server 1 and 2 should both be used for read-only queries. I want both load
balancing and redundancy with this setup. The idea is to separate all
queries into two kinds, the ones that change the database should go to
"inserthost.mydomain" and the read ones to "localhost". This should balance
all the reads between the servers and all the inserts should go into the
master (server1). I will make a script that checks if mysqld on server1 is
sane, else /etc/hosts should be modified in order to make
inserthost.mydomain point to Server2, and a Server2 made into a new master.
Is there a smarter solution for redundancy/load balancing with MySQL. I
would love to have two MySQL servers that permitted inserts/deletes/updates
but since there is no locking implemented yet this is sure to cause problems.
The ServerIron takes care of the distribution of the load to the web pages,
and also the high-availability questions if one of the tomcat/Apache
daemons should die.
If anyone has implemented a solution similar to the one I am about to
launch I would love to hear your comments.
/Lars
---------------------------------------------------------------------
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