The problem of lost messages in the WebSocket stream can be identified:
- directly on the stream by the gaps in the sequence number
Possible causes are limited and are related to the:
- Bandwidth bottleneck
- Lack of the separation between the receiving thread and parsing, processing operations
- No CPU affinity on the receiving thread
- CPU bottleneck on the receiving thread
- Infrequent collection of the data from the TCP stack
- Heap allocation per message and Garbage Collector pressure
If your client is unable to receive messages fast enough because of the issues listed above then these things will happen:
- Your client TCP stack will be full, and TCP window will be closed to inform us that you can't receive more data and we should not send to you
- Our TCP stack queue will be full because we couldn't send you more data
- We will internally create a limited queue of the messages to deliver when the channel is available again (this could cause the delay on the real-time data before the gaps will appear)
- We will start dropping the messages
More information is available by googling "TCP Flow Control".
Comments
0 comments
Article is closed for comments.