I am new to comet,and have two questions:
-
I think comet will cause the TCP connection between client and server become long(than normal request/response),this will reduce server performance?(server has TCP connection size limit)
-
And sometimes the nature of the device or network can prevent an application from maintaining a long-lived TCP connection to a server.how comet aviod this issue?
On Linux (epoll) or BSD (kqueue), you can have hundreds of thousands of idle connections without a performance pennalty (except memory usage). The same is not true on other systems which hit the wall much earlier: because of the limited pool of Windows handles allocated for this purpose in the kernel, your applications will suffer (unless you invest in an ‘unlimited’ Windows Server license).
Proxy servers notably (low-end routers also), will cut idle connections after a short delay but the usual workaround is to use connection keep-alives.
Hope it helps.