Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am a bit confused with HTTP lately.

Some facts are that TCP can operate connection orientated or connectionless, this I understand. TCP though is connection-oriented while UDP is connectionless which is used when the message itself can fit into a single message.

Question:

If HTTP uses TCP, and TCP provides reliable connections for multiple message exchange, and HTTP is said to be connectionless then how is this possible?

TCP is connection-oriented? So how is HTTP connectionless????

share|improve this question

1 Answer 1

up vote 11 down vote accepted

HTTP (1.0 without connection keep alive) is connectionless because once a single HTTP request is serviced, the connection is closed and not reused. HTTP requests are not TCP protocol data units, so that TCP is connection-oriented with respect to TCP protocol data units doesn't stop HTTP from being connectionless with respect to HTTP protocol data units.

When we look at the HTTP protocol itself, we don't care what protocol it's layered on top of. It could be TCP, but theoretically, it could be something else. So the properties of TCP are completely irrelevant.

share|improve this answer
    
Good answer! ++ –  Simon Catlin Sep 16 '12 at 21:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.