How to notify 1000s of users efficiently?

My app keeps hitting capacity every time I send notifications to 1000s of people. My current workflow is to run a recursive workflow that runs a backend notification workflow that does the following:

  1. Push notification
  2. Create dynamic link
  3. Create a Notification data type
  4. Sends email through Postmark
  5. Changes user’s unreadNotifications field to yes
  6. Schedules for the next user

Is there a way to do this more efficiently? I am on the $129 Professional Plan and will definitely upgrade capacity soon since we are about to 2-4x our active user base in a couple weeks. For now, I’m scared of notifications being too inefficient for scale right now. Anyone have ideas?

I have a very similar situation and the same concerns. I guess you have this in a backend API already? For mine I use Schedule API on a list where you can set the seconds interval between each item in the list to spread out the workload

Yeah I do it in the backend and in a recursive workflow since I don’t ever schedule on a list for anything more than 10 records. It’s tough to figure out a balance now of notifying users and bringing them back into the app vs. app capacity. There must be some trick that apps like LinkedIn, Discord, Slack, etc. use.

You can sent batches of 500 personalised emails to Postmark. So potentially turn your 1000 backend workflow into 2.

When should I use Postmark Transaction and when should I use Postmark Batch emails?

Transactional is good when you have 1-50 recipients and you want them to receive identical emails. Or send 1 customised email.

Batch is good when you want to send 1-500 recipients individually customised emails. There are two actions to send batches in this plugin - one where the values you’d expect to be the same for all the emails in the batch are single values - and one where everything can be customised per email - including the template. (just for convenience)

Also read this https://postmarkapp.com/blog/bulk-vs-transactional

Thanks was thinking of using Broadcasts with Postmark for things like “New Posts”. That only solves 1/5 of my workflow though for now. Have you found other ways to optimize notifications workflows in your app?

Hey!
If I were you I would just run this function on an external backend, which I think for 1000s users would take 5-10 seconds.
I have a post about Xano that I recommend: Xano: a powerful external backend and database for Bubble

1 Like

Yup might finally be time for me to make use of something like Xano. Will check that out. Thanks!

1 Like

With postmark batch (not the same as broadcast) you can send one instruction to send multiple customised emails . i.e you create a json object of your up to 500 emails, and 1 template . Let postmark do the work.

Then consider conflating your workflows of create object, update object per email, to create batch. Really just depends on your design.

Maybe the cheapest way is to put a delay in between your workflows in the tight send loop, to spread Bubble load over a longer period. Actually I’d start there before I started any big speculative performance design changes :slightly_smiling_face:

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.