Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
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.
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)