How easy would clustering be to set up if I got another server? They're just running dns, so it's not like there's a lot of data or they are under a huge load.
Main Topics
Browse All TopicsI set up two Debian boxes with mydns per the instructions at www.howtoforge.com/mydns_n
Everything is working... when I make a change on ns1 it propogates to ns2. However, if I make a change on ns2 it does not propogate to ns1.
My question is how can I set ns1 to sync with ns2 as well? I want to be able to make changes to the database on EITHER server, and have the changes propogate to the other server.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Hi,
It shares the processor load equally - so basically 2/3 of the processing that you would have if you had two servers on the go
http://www.mysql.com/produ
http://www.mysql.com/produ
If your aim is to have redundancy so if one machine fails the others can spread the load this is the best solution.
oooh, it looks like you have to purchase mysql for the clustering. That's not really an option right now. If we were going to purchase something it would probably just be a DNS appliance.
Where can I find more information on the other solution you proposed? How would I set that up? I don't know a lot about sql... :(
Actually, if you use mysql replication, you can make a circular replication.
ns1 replicate to ns2, and
ns2 replicate to ns1
And, it works with the same tables too.
However, you have to manage the possible conflicts.
Example, if there is auto_increment, make sure the number for inserted rows on the 2 servers are different.
If you make update/delete the same rows to both server before it was replicated, then conflicts occurs where the data in both servers will likely to be diferent or fail the replication.
It will not go into infinite loops. The server-id information in the binary log is used to determine which server is the source of the statements, if the statements come back to the original server that executed it, it will not be executed again.
The circular topology is quite common and you can read about it in mysql manual too. It is also known as multi-master where you can make updates to multiple master. But, conflict may occurs and may break the replication if not handled properly.
To clarify, I am looking for the simpliest solution to this problem, not the most elegant.
We don't have too many DNS records, and the only time we would be making changes on ns2 instead of ns1 is if ns1 was down for some reason. It is highly unlikely that changes would be made on both servers at the same time, especially seeing as we are only going to have two or three people ever editing the database.
Thanks for your help, guys.
Business Accounts
Answer for Membership
by: Raynard7Posted on 2006-10-22 at 14:42:48ID: 17784992
Hi,
Unfortunatley this is not 100% possbile.
If you had three servers then you could use clustering which is MySql's way of acheiving what you have proposed.
With the master and slave concept you can not have something be both the master and the slave for the same table else you would have updates cascading on for infinity.
You can have two different schemas on each box - so on
ns1 you have schema A propogating its changes to schemaA on ns2 and on ns2 you have schama B propogating onto schema B on ns1 but having the same table being updated by the other server and accepting changes can not be done without clustering (which requires an additional box.
Another (very confusing ) option would be to have Four schemas each with very similar data
ns1 has schema A which has all tables keyed with auto increment keys and is offset by 2 starting at 1
ns2 has schema A which has all tables keyed with auto increment keys and is offset by 2 starting at 2
ns1 has schema B which has the same table structure as Schema A and is the slave to ns1 schema A and ns2 schema A (which means that it should have all the requisite data
ns2 has schema B which is a slave of ns1 schema B
With this setup both schema B's have all the correct data at all times - and inserts can be sent to schema A on ns1 or ns2 and will be populated through. This requires more data in terms of both storage and network transfer and more places for error but may closer solve your problem.