Google App Engine应用程序实例回收和响应时间 [英] Google App Engine application instance recycling and response times

查看:101
本文介绍了Google App Engine应用程序实例回收和响应时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在GAE上发布了这个Java组,但我希望在这里更快地获得一些答案:)我决定对我做一些长期性能测试应用。我
每5-30分钟创建一个小客户端应用程序,并且每分钟运行3-5
线程。



我注意到巨大的在响应时间不同,并开始
调查问题。我发现原因很快。
我遇到了以下主题中所述的相同问题:

连接到服务器到发送第一个字节时的不一致响应时间



应用程序实例似乎太过于积极地被回收了



获取'请求在等待后中止太久以致无法尝试为您的请求提供服务。'申请空闲后



I a如果使用Springframework,它会在18-20s左右启动应用程序
实例,这会导致响应时间从1s(当
请求触及正在运行的应用程序 - 非常罕见)到22s时新的应用程序
已创建。



有没有解决方案?
我正在考虑创建执行关键
任务(服务API调用)的最基本的servlet,并保持原样。
但是我会放弃Springframework的所有好处。



有没有解决方案?



在解决(黑客攻击)App Engine的许多限制之后,我在开发我的应用程序时碰到
,这是我认为会让我移出
的App Engine的一部分......这对于所有现在想想如何以
赢得GAE问题,而不是如何解决我的应用程序问题......


有什么帮助吗?



问候
Konrad

解决方案

我知道一些人正在运行让他们的应用程序的实例始终运行。我的意思是,有一个客户端每隔X秒发送一次请求,所以你的应用程序不会被回收。



这是一个很快实现的东西,但似乎违背了平台的精神。制作你的电话号码并检查它是否值得。

另外一个选择是重构你的应用程序以利用更多的延迟加载,而不是像现在这样并不需要很长时间才能开始。



我不知道您是否有其他选择,除了这两个。


I posted this on GAE for Java group, but I hope to get some answers here quicker :)

I decided to do some long-run performance tests on my application. I created some small client hitting app every 5-30 minutes and I run 3-5 of threads with such client.

I noticed huge differenced in response times and started to investigate issue. I found reason very quick. I am experiencing same issues as described in following topics:

Uneven response time between connection to server to first byte sent

Application instances seem to be too aggressively recycled

Getting 'Request was aborted after waiting too long to attempt to service your request.' after application idle

I am using Springframework, it tkes around 18-20s to start app instance, which is causing response times to take from 1s (when requests hits running app - very rare) to 22s when fresh application is created.

Is there any solution for this? I was thinking about creating most basic servlet performing critical tasks (serving API call) and leave UI as is. But then I would loose all benefits of Springframework.

Is there any solution for this?

After solving (hacking) numerous constrains of App Engine which I hit while developing my app that is the one I think will make me move out of App Engine... that's simply to much to all the time think how to win with GAE problems than how to solve my application problems...

Any help?

Regards Konrad

解决方案

I know of some people having a keep-alive thing running in order to have an instance of their app always running. I mean, have a client that sends a request every X seconds so your app doesn't get recycled.

This is a quick thing to implement but seems to go against the spirit of the platform. Make your numbers and check if it is worth it.

Another option would be to refactor your application to make use of more lazy-loading than it does at the moment so it doesn't take that long to kick off.

I don't know if you have any other option apart from these 2.

这篇关于Google App Engine应用程序实例回收和响应时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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