Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
135186: server: decrease nodes_ui response size r=kyle-a-wong a=kyle-a-wong The /_status/nodes_ui grpc API is used by many db-console pages to show node data relevant information. This API is extremely heavy and includes all node and node store related metrics. To give some perspective, the current drt-scale cluster's nodes_ui API call has a payload of size of ~8.4MB. As a result, this request is taking ~2.75s to complete in db-console. As a partial remedy to this, this patch will filter down the node and node store metrics to only return metrics needed by db-console. This list of metrics was determined by the `MetricsConstants` variable defined here: https://github.com/cockroachdb/cockroach/blob/d5f328ea6f3efd8fbe631c97d59f7b74307d22f9/pkg/ui/workspaces/db-console/src/util/proto.ts#L55 This patch does not include any changes to the underlying data in KV, meaning the full NodeStatus objects (which includes the metrics) are still fetched from KV and unmarshalled. That being said, this patch reduces the cost of the full metrics payload back into a serverpb.NodeResponse protobuf, sending it over the wire, and decoding it into json. Testing locally with a demo tpcc cluster with 20 nodes, the payload of nodes_ui on a new cluster was around 530kb before this change, and 8kb after. Epic: None Release note (performance improvement): the /_status/nodes_ui API no longer returns unnecessary metrics in its response. This decreases the payload size of the API and improves the load time of various db-console pages and components. Co-authored-by: Kyle Wong <[email protected]>
- Loading branch information