2 Replies Latest reply on May 25, 2016 2:53 AM by sreekanth.munarai

    JBoss Database repointing

    sreekanth.munarai

      Hi All,

       

      Infra:

      Apache2.2

      Jboss7.1.1

      MS-SQL

       

      I have a new requirement in my environment i.e clustering at database level. Whenever, if the database which is hosted is not reachable/down, JBoss should point to other database.

      For instance, if we have two DB's namely DB1 and DB2.

      If my app server is using DB1 and if the DB1 goes down accidentally,  my application should re point to new DB2 automatically. Please assist me how to achieve the mentioned scenario. What/where the configuration changes would take place.

       

      Thanks,

      Sreekanth

        • 1. Re: JBoss Database repointing
          amostech

          Hello Sreekanth.

           

          This is more like an infra-structure problem than JBoss AS related. Let me tell you why I understand it this way.

           

          What I think you really need here is a Database Cluster with Replication. Think of it this way. Imagine instead of two servers you wanted to have a whole farm of Database Servers, let's say 50.

           

          Would you really want to set up your JBoss AS 7 to know every database server? I don't think this is the best choice. What we usually do here is to set up a replication cluster. There are several topologies for that: Master-Slave (Selects are split and Inserts only to master), Master-Master (Selects and Inserts are split but you have a huge problem with duplicate IDs for different data beware!) and an algorithm which is my personal choice which is called GaleraDB where all your nodes can act as a master and replicate changes safely to other nodes. In this case, all you have to do is set up a Load Balancer node using either Apache, HAProxy, even a hardware balancer or switch to point the connections to the node you want to redirect. This way your JBoss installation will only know ONE ip address or hostname, the address of your database balancer.

           

          osu_rsu1.png

           

          I am not sure whether this GaleraDB cluster will work for MS-SQL but you sure can refer to this technet link to see whether you can build the same topology around your servers.

           

          SQL Server: Top Tips for SQL Server Clustering

           

          Regards,

          Arthur

          • 2. Re: JBoss Database repointing
            sreekanth.munarai

            Hi Arthur,

             

            Thanks for your inputs/suggestions.

            I have no idea about SQL/databases level. So please advice me how to proceed further.

            Even though i have distributed load thru Apache load-balancer/hardware balancer, it would be using/pointing multiple nodes of Application servers but at the back-end would be pointing to single DB(Please correct me if am wrong).

            So advice me what would be better way to achieve to avoid any downtime(database level and application level as well)

             

            Thanks,

            Sreekanth