3 Databases, Best Replication Setup?MySQL high availability, failover and replication with LatencyMySQL...

Using 14 ga on part of a 20A circuit?

How long will my money last at roulette?

How can guns be countered by melee combat without raw-ability or exceptional explanations?

Is it possible to detect 100% of SQLi with a simple regex?

Why is Shelob considered evil?

Why is ra lower than re while la is higher than le?

Microphone on Mars

How should I ship cards?

Why is Bernie Sanders maximum accepted donation on actblue $5600?

Can I legally make a website about boycotting a certain company?

I hate taking lectures, can I still survive in academia?

What is the source for this Leonardo Da Vinci quote?

Automated testing of chained Queueable jobs in Salesforce

Rudeness by being polite

A semicolon (';') is not needed after a function declaration. C++

How does the income of your target audience matter for logo design?

Boiling meatballs, how long?

Coworker is trying to get me to sign his petition to run for office. How to decline politely?

Why is quixotic not Quixotic (a proper adjective)?

Have any astronauts or cosmonauts died in space?

How do I add a strong "onion flavor" to the biryani (in restaurant style)?

What is the correct interpretation of the Gambling Results table in Xanathar's Guide to Everything?

What are Holorydmachines?

Why don't reads from /dev/zero count as I/O?



3 Databases, Best Replication Setup?


MySQL high availability, failover and replication with LatencyMySQL Replication : 1 Slave / Multiple MastersMySQL replication between datacentersMySQL High Availability for InnoDBMySQL Cluster Replication MergeMaster-Master Replication in MySQLScaling Percona datacenters: setup and replicationHow to copy a table during replication in MySQL?Design for active/passive Master-Master mysql SetupMySQL 5.6: explicit_defaults_for_timestampDatabase structure setupRestoring MySQL Master-Master ReplicationDoubts on Setting up Master-Master replication (Percona)Can PostgreSQL slave server act as master for a new database?High disk IO with MySQL master-master replication













2















We have 3 DB servers, two of them i.e. db1, db2, are located in the same data center. The other one i.e. drdb, is located in a different site. Currently, the replication setup for these servers is of the master/multiple-slaves kind i.e. db1 as the master, and db2 and drdb as the slaves. drdb is activated only when both db1 and db2 are down i.e. disaster recovery, business cont. sort of thing. Our application also has a rudimentary failover 'feature' in which it automatically connects to the next available db server in case the default active db server i.e. db1-to-db2-drdb, is inaccessible.



I am currently considering the idea of applying a master-master replication between db1 and db2, and making drdb as a slave of db1. In this setup, I'l make db1 as the default active db server (performs all writes and read operations) and db2 the passive one (backup db server). When db1 goes down, db2 becomes the active db server, and dynamically change the master-host of drdb to db2. And so on.



Is this a good idea? What is a better replication setup for this kind of environment? Please give some suggestions.



UPDATE 1:



I also would like to add that these databases are already existent, and I've read somewhere the possibility of key-collisions/error in this kind of setup, what modifications in our current tables/databases configuration should we made before we setup this kind of replication?



Thank you very much!










share|improve this question

























  • I also would like to add that these databases are already existent, and I've read somewhere the possibility of key-collisions/error in this kind of setup... Would using GUIDs instead of integer IDs help with this - that should prevent key collisions?

    – Suman
    Apr 26 '12 at 19:14


















2















We have 3 DB servers, two of them i.e. db1, db2, are located in the same data center. The other one i.e. drdb, is located in a different site. Currently, the replication setup for these servers is of the master/multiple-slaves kind i.e. db1 as the master, and db2 and drdb as the slaves. drdb is activated only when both db1 and db2 are down i.e. disaster recovery, business cont. sort of thing. Our application also has a rudimentary failover 'feature' in which it automatically connects to the next available db server in case the default active db server i.e. db1-to-db2-drdb, is inaccessible.



I am currently considering the idea of applying a master-master replication between db1 and db2, and making drdb as a slave of db1. In this setup, I'l make db1 as the default active db server (performs all writes and read operations) and db2 the passive one (backup db server). When db1 goes down, db2 becomes the active db server, and dynamically change the master-host of drdb to db2. And so on.



Is this a good idea? What is a better replication setup for this kind of environment? Please give some suggestions.



UPDATE 1:



I also would like to add that these databases are already existent, and I've read somewhere the possibility of key-collisions/error in this kind of setup, what modifications in our current tables/databases configuration should we made before we setup this kind of replication?



Thank you very much!










share|improve this question

























  • I also would like to add that these databases are already existent, and I've read somewhere the possibility of key-collisions/error in this kind of setup... Would using GUIDs instead of integer IDs help with this - that should prevent key collisions?

    – Suman
    Apr 26 '12 at 19:14
















2












2








2








We have 3 DB servers, two of them i.e. db1, db2, are located in the same data center. The other one i.e. drdb, is located in a different site. Currently, the replication setup for these servers is of the master/multiple-slaves kind i.e. db1 as the master, and db2 and drdb as the slaves. drdb is activated only when both db1 and db2 are down i.e. disaster recovery, business cont. sort of thing. Our application also has a rudimentary failover 'feature' in which it automatically connects to the next available db server in case the default active db server i.e. db1-to-db2-drdb, is inaccessible.



I am currently considering the idea of applying a master-master replication between db1 and db2, and making drdb as a slave of db1. In this setup, I'l make db1 as the default active db server (performs all writes and read operations) and db2 the passive one (backup db server). When db1 goes down, db2 becomes the active db server, and dynamically change the master-host of drdb to db2. And so on.



Is this a good idea? What is a better replication setup for this kind of environment? Please give some suggestions.



UPDATE 1:



I also would like to add that these databases are already existent, and I've read somewhere the possibility of key-collisions/error in this kind of setup, what modifications in our current tables/databases configuration should we made before we setup this kind of replication?



Thank you very much!










share|improve this question
















We have 3 DB servers, two of them i.e. db1, db2, are located in the same data center. The other one i.e. drdb, is located in a different site. Currently, the replication setup for these servers is of the master/multiple-slaves kind i.e. db1 as the master, and db2 and drdb as the slaves. drdb is activated only when both db1 and db2 are down i.e. disaster recovery, business cont. sort of thing. Our application also has a rudimentary failover 'feature' in which it automatically connects to the next available db server in case the default active db server i.e. db1-to-db2-drdb, is inaccessible.



I am currently considering the idea of applying a master-master replication between db1 and db2, and making drdb as a slave of db1. In this setup, I'l make db1 as the default active db server (performs all writes and read operations) and db2 the passive one (backup db server). When db1 goes down, db2 becomes the active db server, and dynamically change the master-host of drdb to db2. And so on.



Is this a good idea? What is a better replication setup for this kind of environment? Please give some suggestions.



UPDATE 1:



I also would like to add that these databases are already existent, and I've read somewhere the possibility of key-collisions/error in this kind of setup, what modifications in our current tables/databases configuration should we made before we setup this kind of replication?



Thank you very much!







mysql replication






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 27 '12 at 6:42







ultrajohn

















asked Mar 26 '12 at 14:26









ultrajohnultrajohn

16115




16115













  • I also would like to add that these databases are already existent, and I've read somewhere the possibility of key-collisions/error in this kind of setup... Would using GUIDs instead of integer IDs help with this - that should prevent key collisions?

    – Suman
    Apr 26 '12 at 19:14





















  • I also would like to add that these databases are already existent, and I've read somewhere the possibility of key-collisions/error in this kind of setup... Would using GUIDs instead of integer IDs help with this - that should prevent key collisions?

    – Suman
    Apr 26 '12 at 19:14



















I also would like to add that these databases are already existent, and I've read somewhere the possibility of key-collisions/error in this kind of setup... Would using GUIDs instead of integer IDs help with this - that should prevent key collisions?

– Suman
Apr 26 '12 at 19:14







I also would like to add that these databases are already existent, and I've read somewhere the possibility of key-collisions/error in this kind of setup... Would using GUIDs instead of integer IDs help with this - that should prevent key collisions?

– Suman
Apr 26 '12 at 19:14












2 Answers
2






active

oldest

votes


















1














I wrote up an interesting layout last year which features DRBD pairs in two data centers (DC1,DC2) with as follows




  • DRBD Pair in DC1 (db1 and db2)

  • DBVIP for Primary of DRBD Pair1 is 10.1.2.30

  • DRBD Pair in DC2 (db3 and db4)

  • DBVIP for Primary of DRBD Pair2 is 10.1.2.40

  • Have MySQL Circular Replication Between DRBD Primaries

  • Have the 10.1.2.40 as Master_Host for DBRD Pair 1

  • Have the 10.1.2.30 as Master_Host for DBRD Pair 2


MySQL high availability, failover and replication with Latency



MySQL Replication : 1 Slave / Multiple Masters



Here is why I suggested this: Using two data centers, you setup automatic failover for DRBD Pair in one data center. Let the other DRBD Pair in the second data center be for DB disaser site with it own local redundancy and failover. Should you ever loses one data center, the other data center is fully read with it own local failover setup. Your app would just have to use the DBVIP of the other database center in such a catastrophic case.



Please keep in mind that using DRBD in conjunction with MySQL is only beneficial if all of your data uses the InnoDB Storage Engine. Hard failovers in DRBD could easily result in crashed MyISAM tables.



Here is another setup to consider:



As with DRBD setups, any DRBD Secondary would provide just a Disk-Level copy of your MySQL Folder. It is available as a warm standby. MySQL is not being run on the DRBD Secondary. If you want the third DB server to become hot standby, ditch DRBD altogether and use pure MySQL Replication. With three DB servers, using db3 at a remote site, simply setup the following:



+--> db1 --> db2 --> db3 -->+
^ |
| V
+<--------------------------+


Using your rudimentary failover, now you have two hot standby servers. You just have to make sure each DB server has a unique server_id value. I also recommend using MySQL 5.5 because it uses SemiSync Replication which is more sensitive to communication failures and stop Replication better. You will have to setup the appropriate heartbeats and timeouts.






share|improve this answer


























  • I don't know, but I feel that the name we have for the 3rd database in the DR site i.e. drdb, brought out some form of confusion.(?). We are not currently using a DRBD technology, and I don't think we are going to, because as you said in your answer, not all of our tables are InnoDB. And yeah, about the idea of upgrading to MySQL 5.5 from a previous version, how easy do you think is it? Is a downtime necessary and for how long? Thank you very much Rolando!

    – ultrajohn
    Mar 27 '12 at 5:29













  • Sorry, I'm asking a lot of questions. So, what are differences between the setup I was considering(in the post) to the second one you suggested. I mean, wouldn't it be a good idea to apply master-master replication between db1 and db2, so db1 would just replicate from db2 in case it goes down, as compare to replicating from db3 (in your 2nd setup), considering they are on a different data center i.e. latency, etc. ?

    – ultrajohn
    Mar 27 '12 at 5:45



















0














What is the database technology you plan to use? If its MySQL for instance, i would recommend creating a 3 node cluster with parallel replication where you can read and write to all the nodes in the cluster. For MySQL clustering, you can choose between Percona XtraDB cluster, MariaDB + galera, or the new InnoDB Cluster. All should be fine, its pretty much upto preference (with a few technical differences).



Now coming to the architectural design, since two of the servers are in the same location, while the other is in a different location, i would use a load balance e.g., consul or proxysql, to maybe only read and write to two of the servers in the same location, and use the other server just as a voter (arbitrator) in split brain situations. You can also use the other server for reads only, especially reads that do not require real time data e.g., reports, cron jobs etc.



The cluster design would give you High Availability, but also help with performance handling load since two (or all three depending on your use) servers can be used for writing and reading.





share








New contributor




user172927 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "182"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f15573%2f3-databases-best-replication-setup%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    I wrote up an interesting layout last year which features DRBD pairs in two data centers (DC1,DC2) with as follows




    • DRBD Pair in DC1 (db1 and db2)

    • DBVIP for Primary of DRBD Pair1 is 10.1.2.30

    • DRBD Pair in DC2 (db3 and db4)

    • DBVIP for Primary of DRBD Pair2 is 10.1.2.40

    • Have MySQL Circular Replication Between DRBD Primaries

    • Have the 10.1.2.40 as Master_Host for DBRD Pair 1

    • Have the 10.1.2.30 as Master_Host for DBRD Pair 2


    MySQL high availability, failover and replication with Latency



    MySQL Replication : 1 Slave / Multiple Masters



    Here is why I suggested this: Using two data centers, you setup automatic failover for DRBD Pair in one data center. Let the other DRBD Pair in the second data center be for DB disaser site with it own local redundancy and failover. Should you ever loses one data center, the other data center is fully read with it own local failover setup. Your app would just have to use the DBVIP of the other database center in such a catastrophic case.



    Please keep in mind that using DRBD in conjunction with MySQL is only beneficial if all of your data uses the InnoDB Storage Engine. Hard failovers in DRBD could easily result in crashed MyISAM tables.



    Here is another setup to consider:



    As with DRBD setups, any DRBD Secondary would provide just a Disk-Level copy of your MySQL Folder. It is available as a warm standby. MySQL is not being run on the DRBD Secondary. If you want the third DB server to become hot standby, ditch DRBD altogether and use pure MySQL Replication. With three DB servers, using db3 at a remote site, simply setup the following:



    +--> db1 --> db2 --> db3 -->+
    ^ |
    | V
    +<--------------------------+


    Using your rudimentary failover, now you have two hot standby servers. You just have to make sure each DB server has a unique server_id value. I also recommend using MySQL 5.5 because it uses SemiSync Replication which is more sensitive to communication failures and stop Replication better. You will have to setup the appropriate heartbeats and timeouts.






    share|improve this answer


























    • I don't know, but I feel that the name we have for the 3rd database in the DR site i.e. drdb, brought out some form of confusion.(?). We are not currently using a DRBD technology, and I don't think we are going to, because as you said in your answer, not all of our tables are InnoDB. And yeah, about the idea of upgrading to MySQL 5.5 from a previous version, how easy do you think is it? Is a downtime necessary and for how long? Thank you very much Rolando!

      – ultrajohn
      Mar 27 '12 at 5:29













    • Sorry, I'm asking a lot of questions. So, what are differences between the setup I was considering(in the post) to the second one you suggested. I mean, wouldn't it be a good idea to apply master-master replication between db1 and db2, so db1 would just replicate from db2 in case it goes down, as compare to replicating from db3 (in your 2nd setup), considering they are on a different data center i.e. latency, etc. ?

      – ultrajohn
      Mar 27 '12 at 5:45
















    1














    I wrote up an interesting layout last year which features DRBD pairs in two data centers (DC1,DC2) with as follows




    • DRBD Pair in DC1 (db1 and db2)

    • DBVIP for Primary of DRBD Pair1 is 10.1.2.30

    • DRBD Pair in DC2 (db3 and db4)

    • DBVIP for Primary of DRBD Pair2 is 10.1.2.40

    • Have MySQL Circular Replication Between DRBD Primaries

    • Have the 10.1.2.40 as Master_Host for DBRD Pair 1

    • Have the 10.1.2.30 as Master_Host for DBRD Pair 2


    MySQL high availability, failover and replication with Latency



    MySQL Replication : 1 Slave / Multiple Masters



    Here is why I suggested this: Using two data centers, you setup automatic failover for DRBD Pair in one data center. Let the other DRBD Pair in the second data center be for DB disaser site with it own local redundancy and failover. Should you ever loses one data center, the other data center is fully read with it own local failover setup. Your app would just have to use the DBVIP of the other database center in such a catastrophic case.



    Please keep in mind that using DRBD in conjunction with MySQL is only beneficial if all of your data uses the InnoDB Storage Engine. Hard failovers in DRBD could easily result in crashed MyISAM tables.



    Here is another setup to consider:



    As with DRBD setups, any DRBD Secondary would provide just a Disk-Level copy of your MySQL Folder. It is available as a warm standby. MySQL is not being run on the DRBD Secondary. If you want the third DB server to become hot standby, ditch DRBD altogether and use pure MySQL Replication. With three DB servers, using db3 at a remote site, simply setup the following:



    +--> db1 --> db2 --> db3 -->+
    ^ |
    | V
    +<--------------------------+


    Using your rudimentary failover, now you have two hot standby servers. You just have to make sure each DB server has a unique server_id value. I also recommend using MySQL 5.5 because it uses SemiSync Replication which is more sensitive to communication failures and stop Replication better. You will have to setup the appropriate heartbeats and timeouts.






    share|improve this answer


























    • I don't know, but I feel that the name we have for the 3rd database in the DR site i.e. drdb, brought out some form of confusion.(?). We are not currently using a DRBD technology, and I don't think we are going to, because as you said in your answer, not all of our tables are InnoDB. And yeah, about the idea of upgrading to MySQL 5.5 from a previous version, how easy do you think is it? Is a downtime necessary and for how long? Thank you very much Rolando!

      – ultrajohn
      Mar 27 '12 at 5:29













    • Sorry, I'm asking a lot of questions. So, what are differences between the setup I was considering(in the post) to the second one you suggested. I mean, wouldn't it be a good idea to apply master-master replication between db1 and db2, so db1 would just replicate from db2 in case it goes down, as compare to replicating from db3 (in your 2nd setup), considering they are on a different data center i.e. latency, etc. ?

      – ultrajohn
      Mar 27 '12 at 5:45














    1












    1








    1







    I wrote up an interesting layout last year which features DRBD pairs in two data centers (DC1,DC2) with as follows




    • DRBD Pair in DC1 (db1 and db2)

    • DBVIP for Primary of DRBD Pair1 is 10.1.2.30

    • DRBD Pair in DC2 (db3 and db4)

    • DBVIP for Primary of DRBD Pair2 is 10.1.2.40

    • Have MySQL Circular Replication Between DRBD Primaries

    • Have the 10.1.2.40 as Master_Host for DBRD Pair 1

    • Have the 10.1.2.30 as Master_Host for DBRD Pair 2


    MySQL high availability, failover and replication with Latency



    MySQL Replication : 1 Slave / Multiple Masters



    Here is why I suggested this: Using two data centers, you setup automatic failover for DRBD Pair in one data center. Let the other DRBD Pair in the second data center be for DB disaser site with it own local redundancy and failover. Should you ever loses one data center, the other data center is fully read with it own local failover setup. Your app would just have to use the DBVIP of the other database center in such a catastrophic case.



    Please keep in mind that using DRBD in conjunction with MySQL is only beneficial if all of your data uses the InnoDB Storage Engine. Hard failovers in DRBD could easily result in crashed MyISAM tables.



    Here is another setup to consider:



    As with DRBD setups, any DRBD Secondary would provide just a Disk-Level copy of your MySQL Folder. It is available as a warm standby. MySQL is not being run on the DRBD Secondary. If you want the third DB server to become hot standby, ditch DRBD altogether and use pure MySQL Replication. With three DB servers, using db3 at a remote site, simply setup the following:



    +--> db1 --> db2 --> db3 -->+
    ^ |
    | V
    +<--------------------------+


    Using your rudimentary failover, now you have two hot standby servers. You just have to make sure each DB server has a unique server_id value. I also recommend using MySQL 5.5 because it uses SemiSync Replication which is more sensitive to communication failures and stop Replication better. You will have to setup the appropriate heartbeats and timeouts.






    share|improve this answer















    I wrote up an interesting layout last year which features DRBD pairs in two data centers (DC1,DC2) with as follows




    • DRBD Pair in DC1 (db1 and db2)

    • DBVIP for Primary of DRBD Pair1 is 10.1.2.30

    • DRBD Pair in DC2 (db3 and db4)

    • DBVIP for Primary of DRBD Pair2 is 10.1.2.40

    • Have MySQL Circular Replication Between DRBD Primaries

    • Have the 10.1.2.40 as Master_Host for DBRD Pair 1

    • Have the 10.1.2.30 as Master_Host for DBRD Pair 2


    MySQL high availability, failover and replication with Latency



    MySQL Replication : 1 Slave / Multiple Masters



    Here is why I suggested this: Using two data centers, you setup automatic failover for DRBD Pair in one data center. Let the other DRBD Pair in the second data center be for DB disaser site with it own local redundancy and failover. Should you ever loses one data center, the other data center is fully read with it own local failover setup. Your app would just have to use the DBVIP of the other database center in such a catastrophic case.



    Please keep in mind that using DRBD in conjunction with MySQL is only beneficial if all of your data uses the InnoDB Storage Engine. Hard failovers in DRBD could easily result in crashed MyISAM tables.



    Here is another setup to consider:



    As with DRBD setups, any DRBD Secondary would provide just a Disk-Level copy of your MySQL Folder. It is available as a warm standby. MySQL is not being run on the DRBD Secondary. If you want the third DB server to become hot standby, ditch DRBD altogether and use pure MySQL Replication. With three DB servers, using db3 at a remote site, simply setup the following:



    +--> db1 --> db2 --> db3 -->+
    ^ |
    | V
    +<--------------------------+


    Using your rudimentary failover, now you have two hot standby servers. You just have to make sure each DB server has a unique server_id value. I also recommend using MySQL 5.5 because it uses SemiSync Replication which is more sensitive to communication failures and stop Replication better. You will have to setup the appropriate heartbeats and timeouts.







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Apr 13 '17 at 12:42









    Community

    1




    1










    answered Mar 26 '12 at 14:56









    RolandoMySQLDBARolandoMySQLDBA

    142k24223379




    142k24223379













    • I don't know, but I feel that the name we have for the 3rd database in the DR site i.e. drdb, brought out some form of confusion.(?). We are not currently using a DRBD technology, and I don't think we are going to, because as you said in your answer, not all of our tables are InnoDB. And yeah, about the idea of upgrading to MySQL 5.5 from a previous version, how easy do you think is it? Is a downtime necessary and for how long? Thank you very much Rolando!

      – ultrajohn
      Mar 27 '12 at 5:29













    • Sorry, I'm asking a lot of questions. So, what are differences between the setup I was considering(in the post) to the second one you suggested. I mean, wouldn't it be a good idea to apply master-master replication between db1 and db2, so db1 would just replicate from db2 in case it goes down, as compare to replicating from db3 (in your 2nd setup), considering they are on a different data center i.e. latency, etc. ?

      – ultrajohn
      Mar 27 '12 at 5:45



















    • I don't know, but I feel that the name we have for the 3rd database in the DR site i.e. drdb, brought out some form of confusion.(?). We are not currently using a DRBD technology, and I don't think we are going to, because as you said in your answer, not all of our tables are InnoDB. And yeah, about the idea of upgrading to MySQL 5.5 from a previous version, how easy do you think is it? Is a downtime necessary and for how long? Thank you very much Rolando!

      – ultrajohn
      Mar 27 '12 at 5:29













    • Sorry, I'm asking a lot of questions. So, what are differences between the setup I was considering(in the post) to the second one you suggested. I mean, wouldn't it be a good idea to apply master-master replication between db1 and db2, so db1 would just replicate from db2 in case it goes down, as compare to replicating from db3 (in your 2nd setup), considering they are on a different data center i.e. latency, etc. ?

      – ultrajohn
      Mar 27 '12 at 5:45

















    I don't know, but I feel that the name we have for the 3rd database in the DR site i.e. drdb, brought out some form of confusion.(?). We are not currently using a DRBD technology, and I don't think we are going to, because as you said in your answer, not all of our tables are InnoDB. And yeah, about the idea of upgrading to MySQL 5.5 from a previous version, how easy do you think is it? Is a downtime necessary and for how long? Thank you very much Rolando!

    – ultrajohn
    Mar 27 '12 at 5:29







    I don't know, but I feel that the name we have for the 3rd database in the DR site i.e. drdb, brought out some form of confusion.(?). We are not currently using a DRBD technology, and I don't think we are going to, because as you said in your answer, not all of our tables are InnoDB. And yeah, about the idea of upgrading to MySQL 5.5 from a previous version, how easy do you think is it? Is a downtime necessary and for how long? Thank you very much Rolando!

    – ultrajohn
    Mar 27 '12 at 5:29















    Sorry, I'm asking a lot of questions. So, what are differences between the setup I was considering(in the post) to the second one you suggested. I mean, wouldn't it be a good idea to apply master-master replication between db1 and db2, so db1 would just replicate from db2 in case it goes down, as compare to replicating from db3 (in your 2nd setup), considering they are on a different data center i.e. latency, etc. ?

    – ultrajohn
    Mar 27 '12 at 5:45





    Sorry, I'm asking a lot of questions. So, what are differences between the setup I was considering(in the post) to the second one you suggested. I mean, wouldn't it be a good idea to apply master-master replication between db1 and db2, so db1 would just replicate from db2 in case it goes down, as compare to replicating from db3 (in your 2nd setup), considering they are on a different data center i.e. latency, etc. ?

    – ultrajohn
    Mar 27 '12 at 5:45













    0














    What is the database technology you plan to use? If its MySQL for instance, i would recommend creating a 3 node cluster with parallel replication where you can read and write to all the nodes in the cluster. For MySQL clustering, you can choose between Percona XtraDB cluster, MariaDB + galera, or the new InnoDB Cluster. All should be fine, its pretty much upto preference (with a few technical differences).



    Now coming to the architectural design, since two of the servers are in the same location, while the other is in a different location, i would use a load balance e.g., consul or proxysql, to maybe only read and write to two of the servers in the same location, and use the other server just as a voter (arbitrator) in split brain situations. You can also use the other server for reads only, especially reads that do not require real time data e.g., reports, cron jobs etc.



    The cluster design would give you High Availability, but also help with performance handling load since two (or all three depending on your use) servers can be used for writing and reading.





    share








    New contributor




    user172927 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.

























      0














      What is the database technology you plan to use? If its MySQL for instance, i would recommend creating a 3 node cluster with parallel replication where you can read and write to all the nodes in the cluster. For MySQL clustering, you can choose between Percona XtraDB cluster, MariaDB + galera, or the new InnoDB Cluster. All should be fine, its pretty much upto preference (with a few technical differences).



      Now coming to the architectural design, since two of the servers are in the same location, while the other is in a different location, i would use a load balance e.g., consul or proxysql, to maybe only read and write to two of the servers in the same location, and use the other server just as a voter (arbitrator) in split brain situations. You can also use the other server for reads only, especially reads that do not require real time data e.g., reports, cron jobs etc.



      The cluster design would give you High Availability, but also help with performance handling load since two (or all three depending on your use) servers can be used for writing and reading.





      share








      New contributor




      user172927 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.























        0












        0








        0







        What is the database technology you plan to use? If its MySQL for instance, i would recommend creating a 3 node cluster with parallel replication where you can read and write to all the nodes in the cluster. For MySQL clustering, you can choose between Percona XtraDB cluster, MariaDB + galera, or the new InnoDB Cluster. All should be fine, its pretty much upto preference (with a few technical differences).



        Now coming to the architectural design, since two of the servers are in the same location, while the other is in a different location, i would use a load balance e.g., consul or proxysql, to maybe only read and write to two of the servers in the same location, and use the other server just as a voter (arbitrator) in split brain situations. You can also use the other server for reads only, especially reads that do not require real time data e.g., reports, cron jobs etc.



        The cluster design would give you High Availability, but also help with performance handling load since two (or all three depending on your use) servers can be used for writing and reading.





        share








        New contributor




        user172927 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.










        What is the database technology you plan to use? If its MySQL for instance, i would recommend creating a 3 node cluster with parallel replication where you can read and write to all the nodes in the cluster. For MySQL clustering, you can choose between Percona XtraDB cluster, MariaDB + galera, or the new InnoDB Cluster. All should be fine, its pretty much upto preference (with a few technical differences).



        Now coming to the architectural design, since two of the servers are in the same location, while the other is in a different location, i would use a load balance e.g., consul or proxysql, to maybe only read and write to two of the servers in the same location, and use the other server just as a voter (arbitrator) in split brain situations. You can also use the other server for reads only, especially reads that do not require real time data e.g., reports, cron jobs etc.



        The cluster design would give you High Availability, but also help with performance handling load since two (or all three depending on your use) servers can be used for writing and reading.






        share








        New contributor




        user172927 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.








        share


        share






        New contributor




        user172927 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        answered 7 mins ago









        user172927user172927

        1




        1




        New contributor




        user172927 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.





        New contributor





        user172927 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.






        user172927 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Database Administrators Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f15573%2f3-databases-best-replication-setup%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Anexo:Material bélico de la Fuerza Aérea de Chile Índice Aeronaves Defensa...

            Always On Availability groups resolving state after failover - Remote harden of transaction...

            update json value to null Announcing the arrival of Valued Associate #679: Cesar Manara ...