You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WebSocket writes (eventually calling tranport_ws.c's _ws_write() function) tend to create more packets than needed. This increases single packet upload latency from 1 packet to 3 packets:
Server->Client: TCP ACK for WebSocket header packet, unblock Nagler
Client->Server: TLS send WebSocket payload
Describe the solution you'd like.
I'd like _ws_write() to either batch writes to esp_transport_write(), or to add something like esp_transport_cork() and esp_transport_push() to the transport layer so that higher layer transports can combine writes that would then be sent only when esp_transport_push() is called.
Describe alternatives you've considered.
Nagle's algorithm doesn't help here - the first TLS packet containing the WebSocket frame headers is sent immediately, and the TLS packet containing the WebSocket payload deferred until the other side aknowledges the first TLS packet. Once the acknowledgement is received, the Nagler is disabled and the payload is uploaded.
Additional context.
The text was updated successfully, but these errors were encountered:
github-actionsbot
changed the title
[WebSocket Transport]: aggregate or cork writes to underlying transport
[WebSocket Transport]: aggregate or cork writes to underlying transport (IDFGH-14105)
Nov 20, 2024
Is your feature request related to a problem?
WebSocket writes (eventually calling tranport_ws.c's _ws_write() function) tend to create more packets than needed. This increases single packet upload latency from 1 packet to 3 packets:
Describe the solution you'd like.
I'd like _ws_write() to either batch writes to
esp_transport_write()
, or to add something likeesp_transport_cork()
andesp_transport_push()
to the transport layer so that higher layer transports can combine writes that would then be sent only whenesp_transport_push()
is called.Describe alternatives you've considered.
Nagle's algorithm doesn't help here - the first TLS packet containing the WebSocket frame headers is sent immediately, and the TLS packet containing the WebSocket payload deferred until the other side aknowledges the first TLS packet. Once the acknowledgement is received, the Nagler is disabled and the payload is uploaded.
Additional context.
The text was updated successfully, but these errors were encountered: