Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
hi.
I've two server in order to build a little mysql-cluster.
What's the mean difference between "master-master" and "master-slave" model?
Which is better, if my first goal is redundancy?
I guess master-master, as master-slave you can only use the master. The slave is there to have a copy of the master and can only be used for reading, but not writing, but thats only me.
You can maybe do a failover cluster, but this way you always use only one server.
I guess master-master, as master-slave you can only use the master. The slave is there to have a copy of the master and can only be used for reading, but not writing, but thats only me.
You can maybe do a failover cluster, but this way you always use only one server.
Hi robertjinx, thank you for your reply.
How can I manage the ip address issue? For my web applications, webmail, and CMS, I've to specify an unique ip address of course.
Should I use thirdy party solution for balacing? Or there is another way (without "external" tools)?
Exactly don't know, but if you want to have both master then you'll need to HAE setup and a shared ip address. Never did this myself, only the master-slave idea, so you'll need to search on google.
Exactly don't know, but if you want to have both master then you'll need to HAE setup and a shared ip address. Never did this myself, only the master-slave idea, so you'll need to search on google.
Hi, ok, just one last question: how do you split write/read task on your two mysql server?
Do you use only such application with native mysql-cluster support? Or "by hand" (for eg. on some application you put x.x.x.x address and on other y.y.y.y)?
If you are going to use a "master-master" setup (circular replication) then you must make sure that the application you are writing/using will work correctly. Auto-incremented values are the main problem, you will need to ensure that you change the auto-increment from 1 to n, where n is the number of servers you have.
If you want to use "master-master" or "master-slave" for load balancing then you'll need to ensure that your application also supports this correctly, especially if you are writing critical data. For example, if you are storing financial data you will need to ensure that after you write data that this change is accurately reflected across all the servers. MySQL replication is rather loosely coupled, writes are stored in a log and it is up to the other servers to read from this log and update themselves apropriately. So if you're using two servers and write to server A you need to then ensure that you read server B and if necessary you may have to wait to get back the data you have just written.
As for doing the actual load splitting, you can either have your application do the balancing based on rough criteria such as if the last octet of the client IP is odd then use server A, if it's even then use server B. Alternatively you could use a load balancing appliance (for example a Citrix NetScaler) in-front of your servers.
For basic web applications unless you're doing silly amounts of page views or transactions then a well specified server should be able to cope with loads while using a replication target for backup.
As an example, my personal websites does around 1.4 million page views off a single MySQL server with master-slave replication but no need to load balance.
Can I just point out that Clustering and Replication are 2 completely separate methodologies.
You need to start by deciding which one you want.
(Master-Master Replication is not the same as Clustering, although superficially it looks similar)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.