Avi Kav
Avi Kav

Reputation: 5

GCP PubSub's new cross-region billing in the case of cross-project topics

For topics that are cross-region and cross-project, who gets billed for egress pricing?

If the subscriber pays, what happens when multiple subscribers are in the same region? Is the cost paid by each? Split between them?

Upvotes: 0

Views: 350

Answers (1)

Mahesh Gattani
Mahesh Gattani

Reputation: 359

For topics that are cross-region and cross-project, who gets billed for egress pricing?

https://cloud.google.com/pubsub/pricing#cross-project-billing

"If you are using Cloud Pub/Sub across projects, Cloud Pub/Sub fees are billed to the project that contains the requested resource (e.g., subscription). For example, a service account in project A might be given subscriber access to a subscription in Project B (that is under billing account B). Billing account B will be billed for the data that is pulled from the subscription by service account A. Alternatively, if the subscription resides in project A (even if it is attached to a topic in project B), account A will be billed for data that is pulled from the subscription."

This is true irrespective of in-region or cross-region access.

If the subscriber pays, what happens when multiple subscribers are in the same region? Is the cost paid by each? Split between them?

As stated above, the project with subscription will be billed for usage.

  1. If there are multiple subscribers for the same subscription, they will be billed as per usage by each of the subscribers (in the project associated with the subscription). For example, Topic T1 in project P1 has one subscription S1 in project P2. And Subscription S1 has two subscriber clients C1 and C2. The usage for S1 (C1 and C2) will be billed to P2.
  2. If there are multiple subscriptions for the same topic, each of them will be billed as per usage in the project they exist. For example, Topic T1 in project P1 has two subscriptions attached to it. The two subscription are S1 in project P1 and S2 in project P2. The usage for S1 will be billed to P1 and usage for S2 will be billed to P2.

Upvotes: 2

Related Questions