Split-Billing / Chargeback in a multi-tenant Database / RDS Server

0

Hi,

I've fielded a question a few times that's generally along the lines of:

I have a single RDS (or EC2) instance for my multi-tenant SaaS application. I know the total spend by department/system based on cost allocation tags, but I want to know cost by tenant for a chargeback model.

My response is that - well, there are a lot of way to do this but it ultimately comes down to combining data from the server. For example, you could use any one (or combination of) query counts, query times, storage usage, etc. by database user (or group/schema/etc), export that to S3, and combine that with the cost and usage report from AWS using Athena/Spectrum/etc. There's no "out-of-the-box" AWS solution for split billing / chargebacks in RDS... this would be custom development

My question is: has anyone seen any good open source examples or partner solutions for this scenario?

Though question is focused on database billing, if you've seen things for related services (e.g. EC2, ECS, Lambdas, etc.), that would also be of interest.

1개 답변
0
수락된 답변

I would design for one lead metric, which is the main driver for infrastructure costs (infrastructure in this case is the underlying shared DB instance). Then you can have secondary metrics, if user behavior needs to be limited / steered also regarding a second factor. An example for this is EBS, where capacity is the main metric that determines the pricing, while IOPS are a secondary metric.

The advantage of this use case is, that the tenants are (presumably) all using the same SaaS application, so the load which they are generating is probably comparable, making it easier to define a lead metric.

When you have your lead metric you can use that to split the costs of the service to the individual users. For that you have multiple inputs:

  • The direct costs from the instance, where the DB is hosted
  • The indirect/non-tagable costs from the account, where the DB is hosted (e.g. network traffic)
  • The indirect costs form the platform operations (e.g. direct connect, identity provider connection, central logging account, ...)
  • The non-AWS costs for running the service (e.g. license, personnel costs, ...)

That means they have to build it by themselves but it can be partially automated, e.g. if they can import their personnel costs form their ERP system, or provide the CURs to the account owners.

전문가
답변함 5년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠