Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notifier scalability #11

Open
jessepeterson opened this issue Aug 9, 2022 · 0 comments
Open

Notifier scalability #11

jessepeterson opened this issue Aug 9, 2022 · 0 comments

Comments

@jessepeterson
Copy link
Owner

The notifier needs a lot of work to make it scalable. Consider a situation where you have N enrollments assigned to a set and you update a declaration in that set. All N enrollments need to be notified. If this set is, for example, your entire fleet, N could get quite large. Right now the notifier immediately notifies the enrollments and blocks while doing so. Some improvement suggestions:

  • Send notifications asynchronously (separate go routine service)
  • Have worker threads that consume a notification channel.
  • Maintain an internal queue of notifications to be sent — perhaps an ordered map of enrollment IDs — that the worker threads can "pop" from.
  • De-dup notifications over a time frame. I.e. only send DM commands every X seconds/minutes. This allows time for potentially duplicate notifications to be subsumed in the existing queue.
  • Only send a reasonable amount of DM command enqueueing at once. 20-50 max (if using the URL-based queueing of NanoMDM, for example)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant