Requesting database wise billing data in a shared cluster
Currently we developing a portal to provide cost details to each customer who are using our platform. We have shared clusters in out pre environment and need to calculate cost for each customer for lower environment.
Better if you can provide an API call to get this database wise cost details.
Yes this is very desirable so as to determine the cost by database. Shared cluster involves multiple databases/applications/groups. Billing by database would help during budgeting so that application teams/groups/databases may know how much resources they consume, hence, cost and plan for that effectively.
The alternative is to have a cluster per database/application which is not realistic since it is cost prohibitive.
Great concept but it's not straight forward to be able to deduce the amount of a particular cluster's cost that each constituent database/namespace is responsible for. For example, is storage usage the key driver, or workload intensity, or some combination therefore?
For what it's worth, we do have a billing API as well as monitoring metrics API so you could use together to do some of what you're aiming to do but you'll need to come up with the logic yourself.
Have you looked into using the MongoDB Atlas M2 and M5 cluster tiers to offer low-priced starter tier clusters with multi-tenant economics? I can see that this might not be workable depending on your goal cost per tenant, but wanted to point it out as an option.