Optimizing Event Notifications in a Scalable Application

27 Views Asked by At

I am developing an application where admin can create events with specific start and end dates, for example, from 6 am to 7 am. Additionally, they have the flexibility to choose whether to run these events every day, just once, or on specific days of the week. On the scheduled event day, users who subscribe to the event receive both push and regular notifications at the event's start time. Users can subscribe to multiple events, and the app may have hundreds of events with different timings and date.

Currently, the backend of the application is built using Node.js, and I'm considering utilizing cron jobs. However, I am hesitant about this approach due to the necessity of running a cron job every minute to check the database for events starting at that particular time. This continuous polling could strain system resources. What are the other best scalable options available for implementing this type of scenario effectively?

0

There are 0 best solutions below