tyrus icon indicating copy to clipboard operation
tyrus copied to clipboard

Several packets arriving at once

Open glassfishrobot opened this issue 8 years ago • 4 comments

I have a websocket MMO game server, which sends packets every +/- 70ms with world info to the players.

Everything works fine until there are 130+ players playing, as the clients will receive sometimes 5 packets in 5 milliseconds, what the player sees as stuttering.

I've searched on google, and some people says it may be related to Nagle's algorith (TCP_NODELAY in Grizzly). Could it be that it's enabled in Tyrus? Or it's a client only setting?

Also, I send the packets with getAsyncRemote().sendBinary(), the packets are in average 250bytes long ( I also send other smaller packets, less that 20bytes ).

Could it be that I should first check if the message has been sent before sending another message? If so, how should I do it?

Environment

Debian 8 64bit 4GB Ram 2 Cores Xeon

Affected Versions

[1.14]

glassfishrobot avatar Dec 01 '16 00:12 glassfishrobot