Running Jetty websockets on a server to an android client. Typically the traffic flows fine, however sometimes things lag and a simple text message takes minutes to be received. It also often appears that if I send another message a previous in transit message will be received immediately, and the new message will be in limbo.
Also a message from client A to client B through the server may be slow but client B to client A is still performing normally, so it doesnt appear to be a general bandwidth issue.
Has anyone seen this? Could this be a jetty or websocket configuration issue?
Hristo Iliev Messages: 156 Registered: May 2010 Location: Sofia, Bulgaria
Just a guess: TCP sockets have TCP_NODELAY option  that can cause such problems if not set. I have no proof that this can be the problem however.
Some VMs have a system property that can be set to disable Nagle's algorithm for all connections so if you can find the property you should set it to test if this is the problem or I'm completely wrong.