开发者

Jetty Continuations/AJAX Push: Timeout best-practices?

开发者 https://www.devze.com 2023-03-03 02:58 出处:网络
I am using Jetty Continuations for a collaboration application. I was wondering if there are any reasons for a smaller continuation timeout? Doesn\'t it make sense to have a very high timeout set?

I am using Jetty Continuations for a collaboration application. I was wondering if there are any reasons for a smaller continuation timeout? Doesn't it make sense to have a very high timeout set? The examples I have seen so far are开发者_高级运维 between 5 secs-30 secs. Is there anything to keep in mind when I go higher (e.g. 2-5 minutes)?

Thanks


You should remember that while continuation is suspended in your Servlet the HTTP socket will be hold. As long as you're not going to perform a long-lasting push to a Web client, timeout should be set to the estimated maximum time of the operation that your Servlet does. Otherwise, you may run out of sockets.

0

精彩评论

暂无评论...
验证码 换一张
取 消