nextcloud / nextcloud/notify_push
Prevent high request load after notification
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 344
- Forks
- 64
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 5
Description
First and foremost, thanks for having created this project! It's greatly helping our instance's runtime.
I'd like to focus on a particularly nasty side-effect of the reaction to a notification, when there are many clients (>20) and big folders in sync:
- A client updates a file / folder;
- A push notification is sent to all connected NC clients;
- Immediately after, all clients issue a number of PROPFIND requests to get more info and decide what to do;
- The server load easily spikes to 80-95% of all available cores;
- Just a few seconds after the first push, another user changes a different file/folder;
- go to number 2.
The above is going to pile up easily and use up all the available cores when many users are working on a big share.
As a result of that, on a user perspective the clients tend to stay in "synchronizing" state for most of the time and appear very slowly responsive, even if only few small changes really happened in the shares.
A solution to highly mitigate the above side effects would be to:
- Add more information to the push notification message so that the clients don't always need to ask back additional info
- Change the NC client push notification code to make use of the additional info and avoid issuing a bunch of requests.
Hope this helps, thanks!
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
Start by tracing the push notification payload and the client reaction that triggers follow-up PROPFIND requests; the issue does not name specific files or tests. Define the additional information and update both server and client behavior so notifications avoid unnecessary requests and the resulting load spike is reduced.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api, backend, performance
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100