I have this weird issue when using JS webscokets with tornado (tornado being server). I've been battling with this for days, and I have no idea what is causing this, but I suspect it might have something to do with tornado.
The tornado server simply adds all connections to a list, and sends a message to them each x sec (0.01 sec). Each JS client simply changes some html code "onmessage". Short and simple code of both
The issue being: when the client connects via "localhost", and is obviously on the server machine, the JS updates as fast as expected (I can see each 0.01sec tick). When the JS connects trough my external IP (even on server machine), I get this weird "lag", like if JS only updated about ~1sec instead of the expected 0.01sec. I did some testing by making JS make a list of all the data, and it looks like the data isn't actually lost, but JS just updates each 1 sec instead of 0.01sec.