如果一个应用程序调用10多个异步网址在谷歌App Engine的获取会发生什么? [英] What happens if an application calls more than 10 asynchronous URL Fetch on Google App Engine?

查看:175
本文介绍了如果一个应用程序调用10多个异步网址在谷歌App Engine的获取会发生什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

读谷歌应用程序引擎的文件异步网址提取:

Reading the Google App Engine documentation on asynchronous URL Fetch:

该应用程序最多可以有10个同时
  异步网址提取调用

The app can have up to 10 simultaneous asynchronous URL Fetch calls

如果一个应用程序调用10余同时异步获取该怎么办?结果
谷歌是否App Engine上引发异常或者干脆排队等候为他们服务保持通话?

What happens if an application calls more than 10 async fetch at a time?
Does Google App Engine raise an exception or simply queue the remain calls waiting to serve them?

推荐答案

嗯,Swizzec不正确。很容易测试:

Umm, Swizzec is incorrect. Easy enough to test:

rpc = []
for in range(1,20):
    rpc.append(urlfetch.createrpc())
    urlfetch.make_fetch_call(rpc[-1],"http://stackoverflow.com/questions/3639855/what-happens-if-i-call-more-than-10-asynchronous-url-fetch")

for r in rpc:
    response = r.get_result().status_code

这不返回任何异常。其实,这工作就好了!请注意,您的结果可能不计费的应用有所不同。

This does not return any exceptions. In fact, this works just fine! Note that your results may vary for non-billable applications.

什么是Swizec报告是一个不同的问题,涉及到最大同时连接到应用程序中。对于计费应用程序是没有实际限制在这里顺便说一句,它只是扩展了(受1000毫秒规则)。

What Swizec is reporting is a different problem, related to maximum simultaneous connections INTO your application. For billable apps there is no practical limit here btw, it just scales out (subject to the 1000ms rule).

GAE无法知道你的请求处理程序会发出一个阻塞网址提取的方式,所以连接500的他看到的是不涉及他的应用实际上是这样做(这是一个过于简单化顺便说一句,如果你的平均请求响应时间是什么> 1000毫秒您的500的增加的情形产生)。

GAE has no way of knowing that your request handler will issue a blocking URL fetch, so the connection 500's he is seeing are not related to what his app is actually doing (that's an oversimplification btw, if your average request response time is > 1000ms your likelyhood of 500's increases).

这篇关于如果一个应用程序调用10多个异步网址在谷歌App Engine的获取会发生什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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