For products priced or tiered around usage (e-mails sent, GB stored, users added, etc) we need some way to compute and show users how far along they are in their current plan.
- How do you implement this?
- Does your product have a dedicated area for that?
- Do you run count queries against your main database or use product metrics as the source of data for this interface?
- What is the behavior of your app when users reach their limits?
- Do you alert them before they are about to reach the limit? Or the product stops working and you ask them to upgrade?
This kind of usage data is a great fit for a time series database. I built Hyprcubd to handle things like this and we actually "dog-food" our own product as well. As queries come in, we use an internal Hyprcubd table to track queries and usage. Check us out here https://www.hyprcubd.com/
We have a dedicated Usage area that shows users how much they have consumed for the month. Metrics in your case would be counts for emails and users and yes we run simple count queries for those. For GB stored it is a little more tricky. You have to calculate the average over a specified time period such as a day, hour, etc then sum it across all your items. For us, we calculate usage per table broken down by the minute.
We run count queries because Hyprcubd is designed to handle this. Depending on your scale, you might have to do rollups in another database rather than operating on raw data.
We haven't set limits yet, however I would prefer to notify the user if they reach their limit or even go over rather than blocking them. I would rather not want to upset a paying customer that forgot to pay than to block them and interrupt their service. At that point, communicate with the customer.
Cool! thanks for sharing, can you share some screenshots of the usage UIs? I'll check hyprcubd out!
I guess the UIs were built by yourself, right? Do you have an API in front of hyprcubd for the usage UI or is it reaching hyprcubd directly?
Yes, I built the user interface. It's a pretty simple table for now. I'll probably change it to a graph in the future but wanted to keep it simple for the MVP.
I can't post screen shots here but our docs show the Usage page: https://www.hyprcubd.com/docs/reference/console/usage/
The console itself is an API which then interfaces with Hyprcubd for the data.
Thanks for checking us out! Email me anytime nick@hyprcubd.com