recommendations for writing a simple & scalable notification system?
i'm working on a blog/forum site & about to start on a simple notification system that sends out notifications to followers when an author publishes a post
i was thinking of just creating a little temporary store in my database, creating a notification document with a unique in it, & then appending the id of that document into a follower's notifications list
in code i guess it would look something like
as stated in the comment above updateMany, i've been thinking about writing a queue to schedule these notifications in batches so that my endpoint doesn't bottleneck & kill the server
but as i think about it, if the amount of users dramatically scales up, would the only other option be to use a dedicated server/service for notifications?
there are just a lot of questions floating around in my head when it comes to scaling the system for potentially hundreds of thousands of users
if you guys have any recommendations or experience, please let me know asap 🙏
0 Replies