0

What's the relationship between the two concepts?

Is one HTTP Keep-Alive connection always over a long persistent TCP connection? When the HTTP connection is closed, will the TCP connection be closed at the same time?

Or can multiple HTTP requests, including Keep-Alive ones, run over a single TCP connection?

asked Feb 10, 2015 at 8:39

1 Answer 1

2

Is one http keepalive connection always over a long persistent tcp connection

There is no such thing as a "persistent" TCP connection. All TCP connections persist from connection start to close.

When the http connection closed , will the tcp connection be closed at the same time?

There is no concept of "close connection" for HTTP. HTTP knows only requests and responses and an exchange is done the request is fully send and the response is fully received. With keep-alive you can have multiple such exchanges inside a single TCP connection.

Close of TCP connection means close of HTTP connection, but there is no explicit close of the HTTP connection.

answered Feb 10, 2015 at 9:05

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.