可持续的每秒查询 [QPS],不会产生超时错误

发布于 2024-10-13 08:29:05 字数 948 浏览 7 评论 0原文

您知道哪个是最安全每秒查询数更新率吗在单个实体上而不引起写争用?
阅读有关分片的文档清楚地表明:

值得注意的是,您可以 只期望更新任何一个 实体或实体组大约五个 每秒多次。这是一个估计 和实际更新率 实体依赖于几个 实体的属性,包括 它有多少个属性,有多大 是的,需要多少个索引 正在更新。

我有 即使每秒更新一次并在 这个答案让我感到困惑:

您仍然可以获得写入争用 个别实体,如果你正在做 超过约 1QPS 的修改 给他们

我错过了什么吗?
如果我什至无法每秒更新一个实体而不引发超时错误,我的 GAE 应用程序如何扩展?

Do you know which is the safest Queries Per Second rate in update on a single entity without incurring in write contention?
Reading this document about sharding it clearly says:

it is important to note that you can
only expect to update any single
entity or entity group about five
times a second
. That is an estimate
and the actual update rate for an
entity is dependent on several
attributes of the entity, including
how many properties it has, how large
it is, and how many indexes need
updating.

I'm having timeout problem even with one update per second and a comment in this answer has baffled me:

You can still get write contention on
individual entities if you're doing
more than about 1QPS of modifications
to them

Am I missing something?
How could my GAE app scale if I can't even update a single entity per second without incurring in Timeout errors?

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

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

发布评论

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

评论(1

南街女流氓 2024-10-20 08:29:05

差异的原因是因为这不是硬性限制。如果您对实体组进行 1 QPS 更新,您可能根本不会注意到超时或延迟有任何显着增加。如果 QPS 为 5,您可能会看到超时率增加,并且延迟明显更高。除此之外,争用问题将会变得更糟。

一般来说,我认为 1 QPS 是围绕 1 QPS 构建的设计目标,为峰值提供合理的误差范围。

The reason for the variance is because this isn't a hard limit. If you do 1 QPS of updates to an entity group, you probably won't notice any significant increase in timeouts or latency at all. If you do 5 QPS, you'll probably see an increased rate of timeouts, and noticeably higher latency. Beyond that, contention issues will get worse.

Generally, I think of 1 QPS as the design goal to build around, to give a reasonable margin of error for spikes.

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