3 Replies Latest reply: Feb 24, 2014 12:03 PM by TimK RSS

Avoid Search Failures during baseline update when dgraphs are down

Shreyas Ram R Newbie
Currently Being Moderated

Hi Friends,

 

In our production environments,we are seeing lot of search failure errors during baseline update when dgraphs are bounced.

We have 4 instances of load balanced dgraphs running in production,we have also added some buffer time between shut down of every dgraphs.

 

Could you please suggest/recommend any approaches so that we shouldn't see any search failures when dgraphs are down during baseline.

 

Regards,

Shreyas

  • 1. Re: Avoid Search Failures during baseline update when dgraphs are down
    TimK Explorer
    Currently Being Moderated

    Hi Shreyas,

     

    Check the deployment guide for the dgraph definitions - there is a pre-shutdown-script and a post-startup-script that you can hook into and run things like tell the LB that this dgraph is going down then back up after.

     

    Here's an example:

    <dgraph id="Dgraph1" host-id="MDEXHost1" port="${endeca.mdex.dgraph1.port}"

              pre-shutdown-script="DgraphPreShutdownScript" post-startup-script="DgraphPostStartupScript"

     

    Then:

    <script id="DgraphPreShutdownScript">

        <bean-shell-script>

          <![CDATA[

            void switchLBOff( String script, String loadBalancerHost1, String loadBalancerHost2, String username, String password, String workingDir, String serverFarmPrefix) {

    ... our logic removed, you would put here curls or scripts that would communicate to your LB

            }

            switchLBOff ("${loadbalancer.script}", "${loadbalancer.url1}", "${loadbalancer.url2}", "${loadbalancer.username}", "${loadbalancer.password}", "${loadbalancer.responsefilepath}", "${loadbalancer.serverfarmprefix}");

          ]]>

        </bean-shell-script>

      </script>

     

    Same for the post-startup.

  • 2. Re: Avoid Search Failures during baseline update when dgraphs are down
    Shreyas Ram R Newbie
    Currently Being Moderated

    Thanks for the response Tim,is it something like removing the particular dgraph from load balancer itself before stopping any dgraph and add it back after starting?

     

    Regards,

    Shreyaas

  • 3. Re: Avoid Search Failures during baseline update when dgraphs are down
    TimK Explorer
    Currently Being Moderated

    Yes, that sounds right.  Your load balancer should have some scripts or admin ports that allow this kind of manipulation.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points