I am currently doing some research on implementing a chat system using java on the server side.
I read a code example for tomcat on : http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/chat/ChatWebSocketServlet.java?view=markup 1. Horizontal scaling I imagine that this example would work great for one server, but if i had to add more servers to scale more users in the chat system, what would be the reasonable strategy to get all existing connections between multiple tomcat servers ? I am currently having a plan to run multiple sessionless tomcat servers behind a load balancer like haproxy (which they say is very performant) 2. Resource I would also consider using periodic polling instead of realtime 2-way communication if using websocket will consume much resource on the tomcat instance and therefore will be limited in the ability to serve other requests other than chat. Could anybody share his/her experience on this ? Or perhaps is there any 'normal' numbers on how many active connections can be served by a tomcat instance on RAM of 4G ? -- Do not pursue the past. Do not lose yourself in the future. The past no longer is. The future has not yet come. Looking deeply at life as it is in the very here and now, the practitioner dwells in stability and freedom. (Thich Nhat Hanh) --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org