#dred - Metered Subscriptions
1 messages · Page 1 of 1 (latest)
Hi dred. Are you looking for a way to improve efficiency in your application to record usage? How are you currently doing things?
@candid flame sorry for not responding. I am currently in the early development stage of a product and am trying to figure out what the most scalable solution is
codename_duchess had to step out but I can help you. Can you expand a bit upon what you are trying to decide here scalability-wise?
sure. lets say I have a single product, called product x, which has metered billing in monthly periods. Product x represents a service that customers will be able to use on my platform. When a user signs up for the service, I will create a subscription entity and store the subscription_id in my db. Then, every subsequent day that the user is using the service, I want to record usage. So, if I have 1,000 users all using my service every day, I need to record their usage. My initial thought is just to query the db for all active subscriptions and iteratively record usage for each one, but I don't think that will scale so well
@river karma did that clarify my question?
I think so though I am still unsure what alternatives there might be.
Usage does need to be recorded individually for each
alright that's what I thought
Yeah, unfortunately I don't think there is a part to optimize away here for the Stripe API