• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HTTP and concept of connectionless

 
Jack Zhou
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I encoutnered some discusssion regarding wether or not http is a connectionless protocoal. I thought the TCP over IP is connection oriented.
Connection oriented vs connectionless is a characteristic of transport layer not the high level application protocal. So asking whether or not http is connection less protocal simply does not make sense. Please correct me if I am wrong.
Thanks,
 
stevens sun
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HTTP is connectionless protocol, although TCP is connection.
 
Steve Agarwal
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http is like make a conneciton and get the ack and then dont maintaint the socket connection.
Its more like Fed Ex rather than Telephone conversation.
Abhishek
 
Jack Zhou
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks guys but not convinced.
The request and response cycle is completed in a connecton, right?
Then, how can say http is connectionless. Wekk it certainly stateless. So Http is like you make phone call but the receiver and you each only talk once. You have to dial gain if you wan to talk more.
dial number (connect)
caller:"hello"
receiver:" hello back"
disconnected;
dial number (connect).
caller: "how are you?"
receiver:"Very good thank and how are you?"
disconnected;
dial number (connect)
caller: "Just so so"
.............
When you want to brows a page and browser send the request. A connetion
is created and a response is sent back to you and connection is closed.
I got see the page and business id done. You can't say this is a connection less communication.
However I am only interested to know if such question exists and what the ansser will be accepted on on Part I exam.
 
THANGAMANI Vaiyapuri
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HTTP is a stateless(Application level) and connection oriented (Transport layer level) protocol.
 
Ade Barkah
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jack,
The short answer is: for the exam you need to know that HTTP is a stateless protocol; TCP is connection-oriented; and that UDP is connectionless. Also, with HTTPS a web container can leverage the SSL's SessionID to maintain client state.
For the long answer:
The concept of "connectionless" is not limited to only the transport layer but apply throughout the protocol stack. A protocol is connection-oriented if each party maintains communication state between multiple requests or packets. So HTTP is clearly a connectionless protocol. In general, stateless protocols are by definition connectionless.
HTTP/1.1 introduced the notion of "persistent connections" where the underlying connection may be "kept-alive" between requests. Requests may also be "pipelined" (where multiple requests are sent before responses are received.) However, HTTP/1.1 makes no guarantee that the connection will remain open, does not maintain any state between request-response pairs, and therefore it is still a connectionless protocol.
HTH,
-Ade
 
Ade Barkah
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jack,
The short answer is: for the exam you need to know that HTTP is a stateless protocol; TCP is connection-oriented; and that UDP is connectionless. Also, with HTTPS a web container can leverage the SSL's SessionID to maintain client state.
For the long answer:
The concept of "connectionless" is not limited to only the transport layer but apply throughout the protocol stack. A protocol is connection-oriented if each party maintains communication state between multiple requests or packets. So HTTP is clearly a connectionless protocol. In general, stateless protocols are by definition connectionless.
HTTP/1.1 introduced the notion of "persistent connections" where the underlying connection may be "kept-alive" between requests. Requests may also be "pipelined" (where multiple requests are sent before responses are received.) However, HTTP/1.1 makes no guarantee that the connection will remain open, does not maintain any state between request-response pairs, and therefore it is still a connectionless protocol.
HTH,
-Ade
 
Jack Zhou
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ade and THANGAMANI,
I am much clear about the concept now. Especially I was, I don't know why, under the impression that the concept of connection does not apply to application layer protocol. I also learned that HTTP spec does not require it to be implemented on top of a connection oriented transport layer. Now I can conlucde that one cannot say that HTTP is connection oriented.
 
Satya Kondur
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
------------------------------------------------------------
I also learned that HTTP spec does not require it to be
implemented on top of a connection oriented transport layer.
------------------------------------------------------------
Are you sure about that ? The RFC says HTTP MUST be implemented over a Reliable Transport Layer. Does a Connection less protocol provide a reliable transport layer ? I guess NO.
 
Ade Barkah
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Satya,
There are indeed reliable-yet-connectionless protocols. The Wireless Transaction Protocol (WTP) used in millions of WAP-enabled mobile phones is one example. The ESRO protocol is another.
In fact HTTP itself can be classified as a reliable connectionless protocol. It can reliably transport, for example, SOAP messages, without prior setup or teardown.
-Ade Barkah
 
Satya Kondur
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ade,
Connection-less protocol like say UDP doesn't by itself provide a reliable transport. However, you can build application layer protocol over UDP that provides this reliability. Your example of ESRO Protocol is built over non-reliable connectionless transport UDP. The reliability aspect is handled by ESRO Protocol and not by the underlying transport layer. Likewise WTP also runs over an connectionless unreliable datagram transport layer.
 
Ade Barkah
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No one is saying that UDP is reliable. The point is there are reliable-yet-connectionless protocols. As mentioned WTP and ESRO fall into this category, hence the HTTP spec is correct in requiring a reliable protocol but not necessarily a connection-oriented one.
Also, the concept of "reliability" is not limited to just (layer 4) transport protocols, and reliability is not synonymous with connection-oriented.
Some examples:
- X.25 is a reliable network (layer 3) protocol. LAPB and LLC (802.2) are reliable data-link protocols. Various multicasting protocols (such as REALM) and so called "overlay" protocols (such as RON) are reliable at the application layer.
- As mentioned there are many protocols which are connectionless but reliable. Besides WTP & ESRO... Novell's NCP, MTP (used in telecom), Lucent's RAL, etc.
- Frame Relay and ATM are examples of connection-oriented protocols which are in fact unreliable. With both of these technologies, a connection ("virtual circuit") must be established, yet frames/cells can still be lost.
I think we're far beyond the exam's objectives by now.
Regards,
-Ade Barkah
 
Rams alak
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
jack,
Can you explian how when browser send request to server, the HTTP, tcp, Ip protocals are interrelated
 
Jack Zhou
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http is on top of tcp that is on top ip. In OSI terms, http is an "application protocol" and tcp is a "transport layer protocol", ip is a "network protocol".
here is a related link about osi model.
http://www.acm.org/sigcomm/standards/iso_stds/OSI_MODEL/ISO_IEC_7498-1.TXT
 
Ajith Kallambella
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Excellent discussion!
Unfortunately we are indeed beyond the exam's objectives. I am transferring this thread to Sockets and Internet Protocols forum. Feel free to continue the discussion there.
Cheers
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See if this sounds right ... I got a good grade in my network class, but we had open book tests
HTTP is connectionless. So after a single request & response, the HTTP server does not remember anything about the client. (Servlet servers do, of course, but their session management is J2EE business, nothing specified in HTTP.)
To accomplish that single request and response, HTTP makes a TCP/IP connection and carries on a little conversation with the server. Connect. Are you there? Yes, I am. Here's some stuff. Ok, here's something back. Disconnect. During this conversation, the server holds information about the client and the state of the conversation, which is really all any connection is.
So TCP is connection oriented, but the connections and sessions are VERY short. On a good day. HTTP uses TCP, but that doesn't make HTTP connection oriented.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic