go-coap icon indicating copy to clipboard operation
go-coap copied to clipboard

No `NSTART` parameter in TCP transport

Open dvn0 opened this issue 1 year ago • 2 comments

Latency between client and server appears to negatively impact throughput when using the TCP transport. After some discussion, and testing I think allowing for adjusting the NSTART parameter could improve the situation.

It's implemented in the UDP client, but not TCP. https://github.com/plgd-dev/go-coap/blob/51f2671073d2e2aa918716911961459cb23dbf46/udp/client/conn.go#L168

dvn0 avatar Feb 15 '24 13:02 dvn0

@dvn0 When CoAP is used over TCP, it relies on the congestion control mechanisms provided by the underlying TCP transport layer. TCP itself has well-established congestion control algorithms, and CoAP benefits from these without introducing specific congestion control parameters like "Nstart."

If you employ BlockWise transfer via TCP, it becomes a bottleneck. However, for TCP, BlockWise transfer is unnecessary for large payloads.

jkralik avatar Mar 01 '24 11:03 jkralik

Thank you for the response and info @jkralik. I followed your advice and disabled the blockwise transfer, but this actually incurred a significant throughput penalty.

I think I'm disabling it correctly: https://codeberg.org/eris/eris-go/commit/870f6471c0076dcf820a45bdd897a3cb97198b42

Any ideas?

dvn0 avatar Mar 01 '24 14:03 dvn0