2 Replies Latest reply on Nov 4, 2013 4:33 PM by Keven Wang

    Most reliable way to build a hibernate search cluster

    Keven Wang Newbie



      Our project is based on EAP 6.1/Jboss AS 7.2 with multiple nodes in one cluster. My goal is to introduce a google like search function based on hibernate search (4.4?). I wonder what is the most reliable solution for backend, JMS or Jgroups. Both of them supports master/slave model, but you have to hardcode such role on the node, what will happen if the master node is down? Will the whole cluster lost the master role? I was pretty interested with auto election feature with groups, but in user manual, it says that this feature is considered as experiemental, so i give it up as this is for a commercial deployment.


      Or shall i build such a solution by myself based on database? For example, use create a timer on each node and fires every x mins, when time fire up, the node will try to lock one row in database and the node gets such lock can build index. This can make sure that only one node gets opputunity  to build index. After index ready, the node can distribute to index to other node, for example by database. This solution is possible to implement, but cost is big.


      I am looking for your suggestions, thank you very much!

        • 1. Re: Most reliable way to build a hibernate search cluster
          Sanne Grinovero Master

          If you use JMS your service - depending on your exact requirements - could appear as running fine even if the master is down.

          The master indexing node is in charge of applying updates to the index, but if it doesn't apply any write (because it's not running for example), then queries will still be available at the cost of using a slightly out-of-synch index. In most cases people will never notice even if you take down your master node every day at peak time for maintenance.. in fact I know of people doing that on purpose to disable the overhead of index updates during peak hours.


          If you configure your JMS queue to use persistence, the master node will catch up with missed updates as soon as it's restarted.


          Using JGroups is an alternative but you wouldn't have the functionality of storing messages when the master isn't ready to process them.

          • 2. Re: Most reliable way to build a hibernate search cluster
            Keven Wang Newbie

            Hi Sanne,


            Thx for reply. Maybe my question is misleading, the reliable not only refer to the slaves, but also masters, i.e i also want high availability for master. Or i can change my question like this, there is a cluster of masters in our product and all of them should have identical configuration/setup. But today, i got lock acquire timeout exception. So i have changed the exclusive_index_use to false, as the index updated is not very frequently in our system, but it is very important to maintain an identical configuration of master nodes.


            Do you know if there is any other drawback if set exclusive_index_use as false?


            Thank you very much!