Druid 0.12.0: Overlord/Coordinator in Leader/StandBy configuration: Submitting tasks

Hi,

in our cluster we have Overlord and Coordinator running both on two differnet nodes. So we have Leader and StandBy nodes.

The basic scenario is like following (which normally does not change)
HOST1: Coordinator/Overlord in Leader Mode
HOST2: Coordinator/Overlord in StandBy Mode

From time to time we changing config, restarting nodes, etc. and HOST2 may become the leader.
Calling the console (web-ui) for Coordinator or Overlord with fixed links to HOST1 is not a problem,
because there is a redirect to the Leader-Node HOST2.

But, we also have scripts that submit daily tasks by cron job, where we use HOST1 (hardcoded) and then there

is no redirect. The only thing which happens is NOTHING :wink:

My questions are:

  • Is this really the way how it should work, and we have to check HOSTx:8090/druid/indexer/v1/isLeader in our scripts tho get the leader?

  • Is there a reason why there is no redirect to leader when submitting task-specs?

  • What do you think about implementing such a redirect?

Regards, Alex

Hi Alex,

There should still be a redirect: are you sure your HTTP client is configured to follow it? Some ignore redirects in their out of the box config. And some don’t support following redirects at all.

If you don’t want to deal with redirects, you could also set up a load balancer with the isLeader endpoint as its health check. Then only one server (the leader) will be “healthy” and the load balancer will take you to that one.

Hi Gian,
thanks for your answer. You told me that there should still be a redirect, so I tried to find out what we are doing wrong and I
think I found it =)
We are using CURL to send task-specs to overlord and there is a ‘-L’ switch (== Follow redirects)
curl -L -X POST -H ‘Content-Type: application/json’ -d @supervisor-spec.json http://HOST2:8090/druid/
indexer/v1/supervisor

With the -L switch, sending task-spec to HOST2 which is in stand by WORKS and task-spec is (re)deployed. Problem solved!

Regards, Alex