Commit ecc1709
committed
perf(tcp): disable Nagle's algorithm on accepted connections
Set TCP_NODELAY on all accepted TCP connections for both the Electrum
RPC server and the REST HTTP server. Nagle's algorithm interacts poorly
with TCP delayed ACKs on request/response protocols, adding up to
200ms of latency per round trip on otherwise idle connections. Unix
socket path in rest.rs is correctly left unchanged as TCP_NODELAY
does not apply to Unix domain sockets.1 parent 69fcfc5 commit ecc1709
2 files changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
789 | 789 | | |
790 | 790 | | |
791 | 791 | | |
| 792 | + | |
792 | 793 | | |
793 | 794 | | |
794 | 795 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
601 | 601 | | |
602 | 602 | | |
603 | 603 | | |
604 | | - | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
605 | 608 | | |
606 | 609 | | |
607 | 610 | | |
| |||
0 commit comments