Add random jitter to watch responses
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 668
- Forks
- 135
- Avg merge
- 4d 19h
- Merged PRs (30d)
- 7
Description
When a new commit is pushed to a repository which has a lot of watchers, the watchers will be waken up at the same time, causing a load spike. We may want to add some random delay to the response so that the watchers are waken up gradually.
Currently, we have added random jitter only to watch timeouts in #222.
Some action items:
- [ ] Add a configuration property that signifies the maximum jitter value of watch responses, e.g. a watch response is sent at most 5 seconds later than actual commit.
- [ ] Make sure adding a jitter to the response still does not exceed the timeout specified by the client, e.g. When a client specified the watch timeout of 30 seconds and a new commit has been pushed at 28-second mark, the jitter should never be greater than 2 seconds.
- [ ] Add more configuration properties - watch timeout jitters and mirror schedule jitters.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or tests are named. Start by reviewing the watch-timeout jitter work in issue #222, then trace watch response handling and its configuration; done means configurable response and timeout jitter that never exceeds the client's remaining timeout, plus the requested watch and mirror schedule settings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100