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
{{ message }}
This repository was archived by the owner on Aug 27, 2024. It is now read-only.
Appears there will be a [SYN] at the beginning of each inquiry are made, and [FIN] after it.
This is acceptable when communicating locally directly on the server.
But when we rent a server and would like to setup a nginx and perform such inquiries under TLS, such SYN, FIN action will cause tons of handshakes and overheads eventually cause performance issues.
I wish the connection logic could be adjusted to only make one SYN and keep using this the connection until FIN is a must.
The text was updated successfully, but these errors were encountered:
You're at the wrong layer of the OSI model (layer 3). This is just how TCP/IP works. First SYN, SYN/ACK, ACK handshake and then a bunch of PSH or PSH/ACK until the connection is torn town with FIN or RST.
You seem to be talking about using HTTP Keep-Alive, which is further down the OSI model and refers to persistent HTTP connections that use one SYN, SYN/ACK, ACK handshake and then leave the TCP stream open for further HTTP requests so that the TCP/IP handshake isn't required for every transaction, thereby reducing latency.
Let's see what the TCP/IP SYN, SYN/ACK handshake does for latency:
Round trip is approx 7.5ms per SYN request and SYN/ACK response, but omits the additional latency of the final ACK that's sent by the client, which would be another 7.5ms RTT. This makes 15ms in all, just to setup an HTTP connection.
Given that on my modest system (single RTX 3090) a typical completion request from Fauxpilot server takes 30ms to complete, then 15ms represents a fairly significant latency if you're running a system for multiple users who need fast response times.
It may well make sense to change the HTTP connection to persistent using keep-alive. Interesting post!
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Appears there will be a [SYN] at the beginning of each inquiry are made, and [FIN] after it.
This is acceptable when communicating locally directly on the server.
But when we rent a server and would like to setup a nginx and perform such inquiries under TLS, such SYN, FIN action will cause tons of handshakes and overheads eventually cause performance issues.
I wish the connection logic could be adjusted to only make one SYN and keep using this the connection until FIN is a must.
The text was updated successfully, but these errors were encountered: