Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Itemised per-customer billing across shared VM instances

Hi everyone.  Our decentralised architecture consists of dedicated services for each of our enterprise customers; they do not share the same service, however they share VM instances that operate under our (the tech vendor's) GCP account. 

In our GCP project for the production deployments, there are three VM instances used by Compute Engine.  These three VM instances handle between four to seven of our enterprise customers.

Our goal is to make itemised billing cost breakdowns for each enterprise customer.  That seems very difficult as the nature of dynamic cloud computing is that the hosting of each enterprise customer is automatically divided by GCP’s software across the three available VM instances.

Is it technically feasible to do either of the following solutions?

(A) — At deployment time, the GCP deployment config file for each service tells GCP (via a label or other meta-data) the name of the enterprise customer e.g. ‘gcp-client:ABC’ means ABC Ltd enterprise customer exclusively used that service or "owns" that service.
or
(B) — Alternatively, at runtime, every request on ABC Ltd's dedicated services contains an indicator -- such as gcp-client=ABC as an HTTPS URL parameter of the incoming REST API call -- and if GCP were to offer a way to subdivide the billing report based on that runtime meta-data?  e.g. our server code could invoke a GCP API — if it existed — to write “request category = ‘ABC’” when the HTTPS REST API call is first received, to inform GCP to subdivide billing of that request by “ABC” token)

Or, please could you comment if you have any other ideas on achieving itemised per-customer billing across shared VM instances?   Many thanks.

Solved Solved
0 2 658
1 ACCEPTED SOLUTION

I must admit that I am a bit confused and my answer may not be the one you're looking for.

Looking at the big picture this kind of approach sounds a bit like shared hosting - it's not, but the approach sounds like this. If I was one of your Enterprise customer I would probably involve the legal teams of both parties and make sure that I am not sharing any resources with any other of your customers.

You mentioned that they're not sharing any services, data etc. between them and I don't understand why you're trying to cramp them all on a shared platform and bill them by usage / individually.

I'd say that this will be a problem in the future and you should start thinking of decoupling these customers unless you have some licensing concerns behind the scene.

If you don't have a license issue then why don't you split these customers across multiple GCP Projects, completely isolated and easy to track in terms of billing and resources? I mean GCP really shines when it comes to security, billing and large scale projects, it's kinda the right Cloud provider for exactly this kind of project that you have. I think you're overengineering things if you go down the route of labels and / or tags and I'd say you'll kill your product. I'd recommend go the KISS (keep it simple, stupid) way and don't call a VM (GCP / real world) like for example EC2 (AWS / stretched... sorry elastic), it's just a VM isn't it?

I'll simply split this across multiple GCP projects and I'll take advantage of:

- Individual billing for each customer

- Individual / "dedicated" resources for each customer, isolation

- Avoid things like for example a customer wants its own data within the EU walls due to some regulations or internal policies etc.

- Avoid impacting (or losing) all users at once due to a breach.

... and the list can go on, but I think you got the point. They are Enterprise customers, they should get the same level of services.

View solution in original post

2 REPLIES 2

I must admit that I am a bit confused and my answer may not be the one you're looking for.

Looking at the big picture this kind of approach sounds a bit like shared hosting - it's not, but the approach sounds like this. If I was one of your Enterprise customer I would probably involve the legal teams of both parties and make sure that I am not sharing any resources with any other of your customers.

You mentioned that they're not sharing any services, data etc. between them and I don't understand why you're trying to cramp them all on a shared platform and bill them by usage / individually.

I'd say that this will be a problem in the future and you should start thinking of decoupling these customers unless you have some licensing concerns behind the scene.

If you don't have a license issue then why don't you split these customers across multiple GCP Projects, completely isolated and easy to track in terms of billing and resources? I mean GCP really shines when it comes to security, billing and large scale projects, it's kinda the right Cloud provider for exactly this kind of project that you have. I think you're overengineering things if you go down the route of labels and / or tags and I'd say you'll kill your product. I'd recommend go the KISS (keep it simple, stupid) way and don't call a VM (GCP / real world) like for example EC2 (AWS / stretched... sorry elastic), it's just a VM isn't it?

I'll simply split this across multiple GCP projects and I'll take advantage of:

- Individual billing for each customer

- Individual / "dedicated" resources for each customer, isolation

- Avoid things like for example a customer wants its own data within the EU walls due to some regulations or internal policies etc.

- Avoid impacting (or losing) all users at once due to a breach.

... and the list can go on, but I think you got the point. They are Enterprise customers, they should get the same level of services.

Many thanks. We have multi-tenant VM instances for cost-saving reasons.  Although I mentioned multiple enterprise customers, what I didn't mention was that we have an unusual billing approach where one enterprise customer pays hosting costs on behalf of companies they have closely partnered with; such companies are the other tenants.

A separate GCP project per customer means separate VM instances mean higher costs.  We will consider that as one of our options, thank you.

Top Labels in this Space
Top Solution Authors