Forum Academy Marketplace Showcase Pricing Features

Which is better: Monthly recurring workflows or Compute on the fly for subscriptions?

My app resets usage credits every month. For example, if a user signs up on Aug 30th, his/her usage credits will be reset every 30th of the month.

Which is a better implementation?

  1. Monthly recurring workflows.
    Keep track using these fields: Current Month Credits Used, Current Month Start Date, Current Month End Date

  2. Compute on the fly.
    Sum up current month’s credits used every time it’s needed, from the day of sign up + current/previous month, up till now.

#1 seems to be simpler, but I’m not sure if there are computational concerns (say if there are thousands of users) or surprises (will there be a case where the workflow fails to run?). And if there’s a bug in my implementation, it’ll be harder to fix.

I’d suggest 1. You shouldn’t run into any issues (thousands of users) as these are backend workflows that run on a queue (and are quick). Shouldn’t be any case where the workflow fails. Test every edge scenario beforehand to make sure there aren’t any bugs or weird actions.

Computing on the fly will actually put more stress on your app (thousands of users).

T
Learn no code → nocodify.com

1 Like