如何估算 GAE 上的托管服务成本?

发布于 2024-12-26 04:38:02 字数 523 浏览 5 评论 0原文

我正在构建一个系统,计划部署在 Google App Engine 上。当前定价如下:

Google App Engine - 定价和功能

我需要估算每项费用由 web 应用程序管理的客户端。在我完成开发之前,成本不会很准确。 GAE 使用如此细粒度的价格计算,例如 READ 和 WRITE,因此估算每个用户的运营成本成为一项非常艰巨的任务。

我有一个敏捷开发人员。这个过程让我在确定成本时更加无能为力。我一直在利用我的用户故事来为每个用户故事创建成本基线。然后我粗略估计用户将如何执行每个故事工作流程,最终计算出一个简单的估计。

在我看来,对于启动项目来说,数据存储 API 的计算估计过于复杂。其他成本更容易掌握。不幸的是,我需要向我的经理提供大概的费用!

有人经历过这样的任务吗?关于工具、示例或任何其他相关信息的任何指示都会很棒。

谢谢。

I'm building a system which I plan to deploy on Google App Engine. Current pricing is described here:

Google App Engine - Pricing and Features

I need an estimate of cost per client managed by the webapp. The cost won't be very accurate until I have completed the development. GAE uses such fine grained price calculation such as READs and WRITEs that it becomes a very daunting task to estimate operation cost per user.

I have an agile dev. process which leaves me even more clueless in determining my cost. I've been exploiting my users stories to create a cost baseline per user story. Then I roughly estimate how will the user execute each story workflow to finally compute a simplistic estimation.

As I see it, computing estimates for Datastore API is overly complex for a startup project. The other costs are a bit easier to grasp. Unfortunately, I need to give an approximate cost to my manager!

Has anyone undergone such a task? Any pointers would be great, regarding tools, examples, or any other related information.

Thank you.

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

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

发布评论

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

评论(3

萌面超妹 2025-01-02 04:38:02

是的,可以对应用程序引擎应用程序进行成本估算分析。根据我的经验,我在分析时遇到的三个主要成本领域是实例小时成本、数据存储读/写成本和数据存储存储数据成本。

当然,YMMV 基于您正在开发的应用程序类型。如果它是一个密集的 OLTP 应用程序,需要对数据记录处理简单但频繁的 CRUD,则大部分成本将花费在数据存储读/写操作上,因此我建议您开始对此资源进行估算。

对于数据存储读/写,写入的成本通常比读取数据的成本昂贵得多。这是因为写入成本不仅考虑写入实体的成本,还考虑写入与实体关联的所有索引的成本。我建议您阅读 Google 撰写的一篇有关数据存储区写入生命周期的文章,特别是有关应用阶段的部分,了解如何根据您的数据模型计算每个实体的写入次数。

要估计您需要的实例时间,最简单的方法(但并不总是可行)是部署一个简单的应用程序来测试特定请求需要多长时间。如果这种方法不理想,您还可以根据 Google App Engine 系统状态页面进行估算(例如,对于特定大小的实体,数据存储写入的延迟是多少)以(非常)粗略地了解处理您的请求需要多长时间。

在我看来,第三个主要成本领域是数据存储区存储数据的成本。当然,这会根据您的数据模型而有所不同,但是您所做的任何估计还需要考虑实体索引将占用的存储空间。快速浏览一下数据存储统计页面,我认为索引可以将存储大小增加 40% 到 400%,具体取决于特定实体拥有的索引数量。

Yes, it is possible to do cost estimate analysis for app engine applications. Based on my experience, the three major areas of cost that I encountered while doing my analysis are the instance hour cost, the datastore read/write cost, and the datastore stored data cost.

YMMV based on the type of app that you are developing, of course. If it is an intense OLTP application that handle simple-but-frequent CRUD to your data records, most of the cost would be on the datastore read/write operations, so I would suggest to start your estimate on this resource.

For datastore read/write, the cost for writing is generally much more expensive than the cost for reading the data. This is because write cost take into account not only the cost to write the entity, but also to write all the indexes associated with the entity. I would suggest you to read an article by Google about the life of a datastore write, especially the part about Apply Phase, to understand how to calculate the number of write per entity based on your data model.

To do an estimate of instance hours that you would need, the simplest approach (but not always feasible) would be to deploy a simple app to test how long would a particular request took. If this approach is undesirable, you might also base your estimate on the Google App Engine System Status page (e.g. what would be the latency for a datastore write for a particularly sized entity) to get a (very) rough picture on how long would it take to process your request.

The third major area of cost, in my opinion, is the datastore stored data cost. This would vary based on your data model, of course, but any estimate you made need to also take into account the storage that would be taken by the entity indexes. Taking a quick glance on the datastore statistic page, I think the indexes could increase the storage size between 40% to 400%, depending on how many index you have for the particular entity.

一笑百媚生 2025-01-02 04:38:02

请记住,大多数成本都是对实际成本的估计确切的事实来源在这里:https://cloud.google.com/pricing /

估算 Appengine 成本的一个好工具是这个很棒的 Chrome 扩展程序:“App Engine 离线统计估算器”。

您还可以查看AppStats包(通过API从应用程序内推断成本)。

回顾一下:

Remember that most costs are an estimation of real costs. The definite source of truth is here: https://cloud.google.com/pricing/.

A good tool to estimate your cost for Appengine is this awesome Chrome Extension: "App Engine Offline Statistics Estimator".

You can also check out the AppStats package (to infer costs from within the app via API).

Recap:

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