How do I configure Tomcat and HAProxy to work with the WebSocket Framework Atmosphere?

Deadly 提交于 2019-12-06 01:41:08

Okay here is what I would do. Install the APR Connector on your Tomcat server. This will speed up the production environment. Download APR and follow the install instructions to compile it on your os. You do not need the NIO Connector anymore.

Edit your server.xml:

<Connector port="8080" 
            protocol="org.apache.coyote.http11.Http11AprProtocol" 
            URIEncoding="UTF-8" 
            maxThreads="250"
            redirectPort="8443" />  

Do not use the org.atmosphere.interceptor.AtmosphereResourceLifecycleInterceptor this causes errors for me.

Your HAProxy config is fine. You should also use the atmosphere-runtime-native.jar instead of the atmosphere-runtime.jar.

Your errors might occur because you connect with a browser that does not support websockets to your application which uses websockets.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!