GCP PubSub在跨项目主题的情况下新的跨区域计费

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?

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."

无论是区域内还是跨区域访问都是如此。

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

如上所述,订阅的项目将按使用量计费。

  1. 如果同一个订阅有多个订阅者,他们将按每个订阅者的使用量(在与订阅关联的项目中)计费。例如,项目 P1 中的主题 T1 在项目 P2 中有一个订阅 S1。订阅 S1 有两个订阅者客户端 C1 和 C2。 S1(C1 和 C2)的使用量将计入 P2。
  2. 如果同一主题有多个订阅,则每个订阅都将根据它们在项目中的使用情况计费。例如,项目 P1 中的主题 T1 附加了两个订阅。这两个订阅是项目 P1 中的 S1 和项目 P2 中的 S2。 S1 的使用将向 P1 收费,S2 的使用将向 P2 收费。