6

我正在使用 JMeter 运行一些负载测试,以了解我的应用程序在 Google App Engine (Java) 负载下的性能。

当我达到大约 100 个虚拟用户时,我的响应时间开始下降,并且我注意到 GAE 日志文件中出现“throttle_code=4”(见下文)。

有谁知道这意味着什么?我从同一个 IP 发出多个请求是否会遇到某种自动 DDOS 保护?

谢谢

---- 请求“throttle_code=4”;从 JMeter 连接时
07-05 05:11AM 58.917 /market/1234/history?pricebars=240 200 3651ms 19cpu_ms 35kb Java/1.5.0_16,gzip(gfe)
75.101.226.4 - - [05/Jul/2010:05:12:02 -0700] "GET /market/1234/history?pricebars=240 HTTP/1.1" 200 35566 - "Java/1.5.0_16,gzip(gfe) " "ci-pricehistory.appspot.com" ms=3652 cpu_ms=19 api_cpu_ms=0 cpm_usd=0.004527 pending_ms=3570 throttle_code=4
我 07-05 05:12AM 02.532
uk.co.cityindex.CandleServlet fetch:正在从缓存中加载 240 条柱...
我 07-05 05:12AM 02.558
uk.co.cityindex.CandleServlet 获取:时间:47

---- 没有“限制”日志的请求;从浏览器连接时
07-05 06:28AM 10.993 /market/1234/history?pricebars=240 200 69ms 19cpu_ms 7kb Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0. 375.99 Safari/533.4,gzip(gfe)
80.169.172.178 - - [05/Jul/2010:06:28:11 -0700] "GET /market/1234/history?pricebars=240 HTTP/1.1" 200 7572 - "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.99 Safari/533.4,gzip(gfe)" "ci-pricehistory.appspot.com" ms=69 cpu_ms=19 api_cpu_ms=0 cpm_usd=0.001423
我 07-05 06:28 上午 11.031
uk.co.cityindex.CandleServlet fetch:正在从缓存中加载 240 条柱...
我 07-05 06:28 上午 11.055
uk.co.cityindex.CandleServlet 获取:时间:45
4

1 回答 1

4

请参阅(显然)官方谷歌答案here,尽管我不确定它是否完全回答了这个问题。

看起来您的请求需要 3500 毫秒。只要您将平均毫秒/请求保持在 1000 毫秒或以下(我们建议 800 毫秒,最好低于 400 毫秒),我们就会自动扩展为您的请求提供服务的实例数量。如果您运行大量长时间运行的请求,我们将不会为您启动新实例,您将达到扩展上限。

http://osdir.com/ml/GoogleAppEngine/2010-07/msg00165.html

显然,它们会根据您的“效率”进行节流,但看起来您的原始请求只有 69 毫秒。由于其他请求,您的应用程序的平均 ms/req 是否可能更高?如果您的应用程序很慢,因为它还没有启动,这似乎是一种奇怪的策略,因为您的应用程序很慢,所以不会启动...

我注意到的另一件事是,您通过 JMeter 的测试请求是 35kb,而另一个请求是 7kb - 您的应用程序的数据在测试负载下会增加吗?标题堆积如山?

于 2010-07-28T01:41:02.467 回答