Closed SpComb closed 7 years ago
Worked around the #14 issue with write timeouts onr ead deadlocks by having the server drop messages instead. The benchmarks now show that the client write thread starves the read thread, as the write rate keeps increasing while the read rate plummets, and the drop ratio goes up.
Preliminary results show a ~100% performance improvement from using the native
websocket_mask
extension: ~3000/s -> ~6000/s before overloadResults (non-dropping mode)
The benchmarks fail with write timeouts once the client saturates. This is caused by the read thread deadlocking on the blocked socket write with the driver mutex held: #14
With
websocket-driver
fromwebsocket-driver-kontena
(pure-rubywebsocket/mask
)With
websocket-driver
fromwebsocket-driver
(nativewebsocket_mask
extension)Results (drop mode)
Running the
websocket-echo-server
in-drop
mode, where the server drops messages if it reads them faster than the client reads the echo responses. This shows that the client write thread is starving the read thread, as the write rate keeps increasing, but the read rate declines and messages start getting dropped.With
websocket-driver
fromwebsocket-driver-kontena
(pure-rubywebsocket/mask
)With
websocket-driver
fromwebsocket-driver
(nativewebsocket_mask
extension)