ChainSafe / ChainSafe/lodestar
High outliers for some REST API responses
- Dominant language
- TypeScript
- Stars
- 1.4k
- Forks
- 483
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 150
Description
Based on the metrics, it looks like some REST API responses have pretty high outliers while the average responses times are quite low.
## Requests pulling data from network
Might be related to the API pulling (or pushing) data from the network
### [getPeers](https://github.com/ChainSafe/lodestar/blob/05fe0ac00d9de61dc6e85225ef2d1c5e27ab714d/packages/beacon-node/src/api/impl/node/index.ts#L25)
_(needs more buckets between 100ms-1s)_

### [prepareBeaconCommitteeSubnet](https://github.com/ChainSafe/lodestar/blob/05fe0ac00d9de61dc6e85225ef2d1c5e27ab714d/packages/beacon-node/src/api/impl/validator/index.ts#L1200)
_(needs more buckets between 100ms-1s)_

## Requests pulling data from state
While other APIs that involve just pulling data from head state don't have this issue
### [getStateFinalityCheckpoints](https://github.com/ChainSafe/lodestar/blob/05fe0ac00d9de61dc6e85225ef2d1c5e27ab714d/packages/beacon-node/src/api/impl/beacon/state/index.ts#L70)

### [getStateValidators](https://github.com/ChainSafe/lodestar/blob/05fe0ac00d9de61dc6e85225ef2d1c5e27ab714d/packages/beacon-node/src/api/impl/beacon/state/index.ts#L83)
_(querying for low validator count)_

Contributor guide
Research direction
Start by inspecting the linked implementations in packages/beacon-node/src/api/impl/node/index.ts at getPeers, packages/beacon-node/src/api/impl/validator/index.ts at prepareBeaconCommitteeSubnet, and the state API entries in packages/beacon-node/src/api/impl/beacon/state/index.ts. Compare their response-time metrics and bucket coverage, then verify that the high outliers are explained or corrected and that the resulting distributions are observable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, observability-sre, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100