title: What is the cause of websocket latency spikes?
body: <p>I am running a server (that uses tornado python) on a single AWS instance and I am running into spikes in websocket latency. </p>
  
  <p>Profiling the round trip time from when a websocket message is sent to the client, which then immediately sends an ack message back to the server, to when the server receives the ack message yields an average of &lt;.1 second, however I note sometimes it goes up to 3 seconds. Note: there are no spikes when running the server locally.</p>
  
  <p>What could be the cause or fix for this? I looked at the CPU usage and it only goes up to 40% max. The spikes are not correlated with heavy traffic (2 or 3 clients usually) and the client's internet seems fine. I find it hard to believe the instance is going beyond capacity with such low usage.</p>