App Engine 中每个用户的资源使用情况

发布于 2024-09-13 06:20:06 字数 465 浏览 3 评论 0原文

Google App Engine 是否可以获取每个用户的资源使用情况。

基本上,该应用程序由每个用户单独使用。用户之间没有共享数据(这里稍微简化一下,因为它的项目是独立的,用户所属的项目)。我不想盲目地向用户收取相同的费用,而是找出每个用户实际使用资源的情况,并按相同的价格向他们收取费用。这怎么能在 Google App Engine 中完成呢?

另外,假设我在 App Engine 中为 Google Apps Marketplace 创建了一个应用程序。而且,我希望每家公司都为应用程序的使用付费。在这种情况下问题是否仍然相同?

澄清: 每个用户的资源使用情况可能会有很大差异。甚至可能大多数资源都由单个用户使用(例如:大量使用并不意味着滥用应用程序,只是需要为使用付费)。这就是为什么我试图找到每个用户的资源使用情况。

为每个用户/项目提供单独的应用程序是一种选择(如下建议)。但应用程序的更新并不容易。

Is it possible in Google App Engine to get resource usage by each user.

Basically, the app is to be used by each user separately. There is no data thats shared between users (Simplifying a bit here, as its projects which are separate, to which users belong). I dont want to blindly charge users the same value, but rather find out the actual usage of resources by each of them, and charge them for the same. How could this be done in Google App Engine.

Also, lets say I create an app in App Engine for Google Apps Marketplace. And, I want each of the companies to pay for there usage of app. Does the problem remain the same in this context also ?

Clarification:
The resource usage by each user might vary a lot. It might even be, that most of the resources are being used by a single user (ex: heavy usage doesnt mean abuse of app, just that one would have to pay for the usage). Thats why I am trying to find per user resource usage.

Having separate apps for each user/project is an option (as suggested below). But then updates to the apps wont be easy.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

子栖 2024-09-20 06:20:06

您可以使用配额 API 来评估其中的一些内容。但是,这仅记录应用程序中使用的 CPU,而不是 API 调用中使用的 CPU。 Appstats 功能< /a> 记录 API 调用的 CPU 使用情况,因此通过一些工作,您可以对其进行逆向工程以达到您自己的目的。对于其他配额 - 带宽进出、存储的数据和发送的电子邮件 - 您需要自己手动记录这些。

一个更简单的选择是按用户或活跃用户向客户计费。只需将这些价格设置为一个阈值,您就可以从典型用户那里获得合理的利润。您的客户可能也会感谢您,因为他们可以更轻松地通过这种方式预测成本。

You can assess some of this using the quota API. This only records CPU used in your app, not in API calls, however. Appstats is capable of recording CPU usage for API calls, so with some work you could reverse-engineer that for your own purposes. For other quotas - bandwidth in and out, data stored, and emails sent - you'd need to record these yourself, manually.

A much simpler option would be to bill your customers per user, or per active user. Simply set those prices at a threshold where you make a reasonable profit off typical users. Your customers will probably thank you, too, as it's much easier for them to predict costs this way.

擦肩而过的背影 2024-09-20 06:20:06

对于第二个问题,您可以为每个公司创建不同的 APPID 并专门部署该应用程序。

for your second question you can create a diffrent APPID for each comany and deploy the app exclusively.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文