Add realtime health stats to vtctld /api/keyspace/ks/tablets API#6569
Merged
deepthi merged 5 commits intovitessio:masterfrom Aug 17, 2020
Merged
Conversation
f3362b7 to
baa37e1
Compare
Signed-off-by: Tim Vaillancourt <timvaillancourt@github.com>
Signed-off-by: Tim Vaillancourt <timvaillancourt@github.com>
Signed-off-by: Tim Vaillancourt <timvaillancourt@github.com>
4bef9cd to
2670240
Compare
Signed-off-by: Tim Vaillancourt <timvaillancourt@github.com>
deepthi
reviewed
Aug 17, 2020
Collaborator
deepthi
left a comment
There was a problem hiding this comment.
Nice work! A couple of nitpicks.
Signed-off-by: Tim Vaillancourt <timvaillancourt@github.com>
Contributor
Author
@deepthi thanks for the review 🙇 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(A continuation of #6524, abandoned due to
git rebaseissues 🤞)This PR adds realtime health stats to the vtctld
/api/keyspace/<ks>/tablets/<shard>HTTP API endpoint. This extends the PR @shlomi-noach made in #4232The tablet health metrics are needed for
github.com/github/frenoto understand if avttabletis ready for probes for replication lag. In today's implementation that looks for any tablet-type ==REPLICAit is possible for an unhealthyvttablet(replication isSTOP SLAVE'd, mysqld crashed, etc) to continue to be probed by Freno because it is unable to detect tablet health from the current API endpointThis PR also adds a
cellandcells(CSV list) query parameter for filtering the output by Vitess Cell. Let me know if you'd prefer this to be part of the URL path vs a query param. This is useful when you're only interested in grabbing specific cellsExample
GETcalls:GET /api/keyspace/<ks>/tablets/?cell=cell1GET /api/keyspace/<ks>/tablets/?cells=cell1,cell2GET /api/keyspace/<ks>/tablets/<shard>?cell=cell1GET /api/keyspace/<ks>/tablets/<shard>?cells=cell1,cell2Lastly, this PR adds unit tests for
GET /api/keyspace/<ks>/tablets/I've made this a work in progress PR for @sougou / @shlomi-noach / @deepthi to review. After we agree on the approach I can complete the unit testing, add suggestions, etccc @sougou / @shlomi-noach / @deepthi / @tomkrouper / @drogart