Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show load balancer state in master web interface #646

Closed
spolitov opened this issue Dec 10, 2018 · 6 comments
Closed

Show load balancer state in master web interface #646

spolitov opened this issue Dec 10, 2018 · 6 comments
Assignees
Labels
kind/enhancement This is an enhancement of an existing feature

Comments

@spolitov
Copy link
Contributor

Periodically we face issue when tablet leaders are not well balanced between tservers.
That would be handy to show load balancer state in this case, so that could simplify issue investigation.

@spolitov spolitov added the kind/enhancement This is an enhancement of an existing feature label Dec 10, 2018
@bmatican bmatican assigned rajukumaryb and unassigned Arnav15 May 29, 2019
@bmatican
Copy link
Contributor

Once we do #1336, we can also use the revamped API to highlight this somewhere in the master UI, perhaps on the /tablet-servers page, or even in the main page! cc @rajukumaryb @rahuldesirazu

@bmatican
Copy link
Contributor

I think we can probably take care of this as part of #1834.

@nspiegelberg maybe on top of just having this info in the report there, we can also just put one front and center green vs red note somewhere in the main master page?

@bmatican bmatican assigned nspiegelberg and unassigned rajukumaryb Jul 26, 2019
@rahuldesirazu
Copy link
Contributor

@nspiegelberg A lot of the load balancer state is tracked in cluster_balance.h

  // Circular buffer of load balancer activity.
  boost::circular_buffer<ActivityInfo> cbuf_activities_;

  // Summary of circular buffer of load balancer activity.
  int num_idle_runs_ = 0;
  std::atomic<bool> is_idle_ {true};

is_idle_ is the metric you probably want to expose as the green/red note in the master main page. For more detailed metrics, ActivityInfo is contains metadata about whether the pending task is a tserver, table, or master task.

To actually expose the metrics, you can modify master-path-handlers.h/cc.

Hope this helps!

@nspiegelberg
Copy link
Contributor

image
image

@nspiegelberg
Copy link
Contributor

@yb-andrew : for observing my puny X and trying to make it big and red

@nspiegelberg
Copy link
Contributor

image

BIG RED X!!! Success still looks boring

nspiegelberg added a commit that referenced this issue Sep 5, 2019
Summary: Trivial column to display whether the load balancer is idle when debugging a YB master.

Test Plan:
Manual UI Testing
https://user-images.githubusercontent.com/53198280/64302104-a9796680-cf36-11e9-9831-fd7ab780b8a8.png
https://user-images.githubusercontent.com/53198280/64304342-5dcbba80-cf40-11e9-8599-24405044353e.png

Reviewers: sergei, rahuldesirazu, andrew, bogdan

Reviewed By: bogdan

Subscribers: ybase

Differential Revision: https://phabricator.dev.yugabyte.com/D7162
d-uspenskiy pushed a commit to d-uspenskiy/yugabyte-db that referenced this issue Sep 5, 2019
Summary: Trivial column to display whether the load balancer is idle when debugging a YB master.

Test Plan:
Manual UI Testing
https://user-images.githubusercontent.com/53198280/64302104-a9796680-cf36-11e9-9831-fd7ab780b8a8.png
https://user-images.githubusercontent.com/53198280/64304342-5dcbba80-cf40-11e9-8599-24405044353e.png

Reviewers: sergei, rahuldesirazu, andrew, bogdan

Reviewed By: bogdan

Subscribers: ybase

Differential Revision: https://phabricator.dev.yugabyte.com/D7162
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement This is an enhancement of an existing feature
Projects
None yet
Development

No branches or pull requests

6 participants