Google App Engine HRD - 如果我写入实体组的写入次数超过1次写入限制,该怎么办? [英] Google App Engine HRD - what if I exceed the 1 write per second limit for writing to the entity group?

查看:79
本文介绍了Google App Engine HRD - 如果我写入实体组的写入次数超过1次写入限制,该怎么办?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据Google App Engine文档,使用高复制数据存储时,写入到一个实体组的写入限制为每秒一次写入。所以...


  1. 如果超过此限制,会发生什么情况?某种异常?我应该怎么做?

  2. 我如何知道我已接近超过此限制?我可以通过某种方式设计应用程序(添加实体...)不太可能经常发生,但我自然不能保证。


解决方案

每秒一次写入量有点低。它实际上支持更多。我甚至会说每秒5到10次写入,但我当然不能保证。如果你达到这个限制,你将得到一个例外是。

异常消息将是:

对这些数据存储实体的争用太多。请重试。



但我不知道/记住确实会引发异常。



您可以选择重试,继续或任何您认为适合的时间点。



您无法分辨您是否接近每秒写入1次的限制。它发生了,你处理它。


According to the Google App Engine documentation, writing to one entity group is limited to one write per second when using High Replication Datastore. So...

  1. What happens if I exceed this limit? Some kind of exception? And what should I do?
  2. How do I know that I'm close to exceeding this limit? I can design the application in a way that particular actions (adding an entity...) are not likely to happen often but naturally I can't guarantee that.

解决方案

one write per second is a little low. it actually supports more than that. i would even say between 5 and 10 writes per second but i can't guarantee that of course.

if you hit that limit you will get an exception yes. the exception message will be:
Too much contention on these datastore entities. please try again.

but i don't know/remember the exact Exception that will raise.

you have the choice to retry, continue or whatever else you think is right to to at that point.

you can't tell if you are close to a 1 write per second limit. it happens and you deal with it.

这篇关于Google App Engine HRD - 如果我写入实体组的写入次数超过1次写入限制,该怎么办?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆