Skip to content

Add support to show leader coordinator in Services web console view #10329

@FrankChen021

Description

@FrankChen021

Description

Add support to show leader coordinator in Services web console view

Motivation

As we know, compared with standby coordinators, leader of coordinators does a lot of tasks such as checking whether to launch compaction tasks. To check whether these tasks are being processed correctly when debugging or solving problems, the first thing is to determine which coordinator right now is the leader.

Currently, there's no way to know which coordinator is the leader from the web console ui. One has to use /druid/indexer/v1/leader RESTful API to send request to any coordinator nodes to get the information of leader. It's not a intuitive way for users.

So, this proposal aims to simplify this by indicating which coordinator is leader on the web console.

There's two ways achieve this:

Alternative 1

When switching to the Services view on web console, the frontend calls the /druid/indexer/v1/leader API to get the leader and then show the result in the Tier column of corresponding row in that view.

This is like the way current web console ui uses to show the last task status of middle manager in Services view

The Pros

No backend changes are involved.

The Cons

/druid/indexer/v1/leader must be sent to the coordinator, but the frontend can't sent this request util it gets services list from router through SQL query to know where coordinators locate. It's a little bit complex for the frontend.

Alternative 2

When processing query on sys.servers table, broker calls /druid/indexer/v1/leader to get the leader and mark the leader coordinator in tier field. The frontend ui will automatically show the leader once there's value in tier property.

The Pros

No changes are involved in frontend but backend services.

Any discussion would be appreciated.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions