Lanka Developers Community

    Lanka Developers

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Shop

    What is 🛢Database Replication?

    Blogs
    database server setup backend development
    5
    9
    1530
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • b6
      b6 last edited by

      Database Replication is a mechanism whereby data is available in more than one location. It means, Having more than one database server and replicating all the data in all available database servers.

      replication


      Why Database Replication 🙄🙄 ?

      The Data-Centers or Large Scale Application Systems are handling millions of queries per second. This kind of continuous huge requests can create very very huge traffic and collision over the network. So there are many possibilities for Server Brake Down or Down Time 😥😥😥 .

      To avoid this, If one database server fail, We need to provide data from another server until the failed server up again. And also we can reduce a load of a server by having more database instances âš– .

      For that we need no sync data from a main server to other servers. This syncing process can be synchronous or Asynchronous. But it will happen continuously..

      So this process Syncing data between database servers to increase availability called Replication.

      replication


      Master - Slave Architecture

      In Database Replication, Most Engineers go with a very efficient architecture called Master - Slave.

      In this architecture there will be database server called Master which has permission to Read and Write Data in Database.

      Other side, There will be few database servers called Slaves which has permission only for Read the data.

      Master servers can be one or more... But Slaves will be more than masters,
      (Depends on the purpose and data size)
      master slave

      Master

      This master database can Read and Write data in Database, But mostly used to write data.

      When application wants to write the data, The query or request will be forwarded to one of the master server.

      And also masters will sync the data to their slaves.

      Slaves

      Slaves are only able to read the data from database. So when application want to read a data, The query or request will be forwarded to one of the slave.

      When slaves down, and there are no slaves to handle, The master will handle and read data.

      Slaves are fetching chances from master databases to keep them up to date.

      master slave


      Conclusion

      Master - Slave is a way to increase the database availability and provide Zero Down time. But it will cost more data storage. Because, When we replicate 5GB of data over 3 servers, It will be 3 x 5 = 15GB.

      Current Databases are much faster than before. So it is not compulsory to implement replication for smaller level projects.

      But when you want more scalability and availability, Then go with Replication

      Cheers....... 💪💪💪💪

      1 Reply Last reply Reply Quote 3
      • dev_lak
        dev_lak last edited by

        thanks brother,, this is very usefull

        b6 1 Reply Last reply Reply Quote 1
        • Nubelle
          Nubelle Web Development last edited by

          Thanks b6 very useful

          b6 1 Reply Last reply Reply Quote 1
          • b6
            b6 @dev_lak last edited by

            @dev_lak thanks bro

            1 Reply Last reply Reply Quote 0
            • b6
              b6 @Nubelle last edited by

              @Malith thx bro

              1 Reply Last reply Reply Quote 0
              • rachitha
                rachitha last edited by

                Nice article
                Thanks brother

                b6 1 Reply Last reply Reply Quote 1
                • b6
                  b6 @rachitha last edited by

                  @rachitha Thx bro

                  1 Reply Last reply Reply Quote 0
                  • root
                    root Linux Help last edited by

                    Good article bro, awesome b6

                    b6 1 Reply Last reply Reply Quote 1
                    • b6
                      b6 @root last edited by

                      @root Thx dude

                      1 Reply Last reply Reply Quote 0
                      • 1 / 1
                      • First post
                        Last post

                      3
                      Online

                      3.6k
                      Users

                      1.3k
                      Topics

                      5.3k
                      Posts

                      • Privacy
                      • Terms & Conditions
                      • Donate

                      © Copyrights and All right reserved Lanka Developers Community

                      Powered by Axis Technologies (PVT) Ltd

                      Made with in Sri Lanka

                      | |