tags:

views:

4418

answers:

5
+2  Q: 

Does HTTP use UDP

this might be a silly question:

Does http use the user datagram protocol ever? for example if one is streaming a mp3 or a video over the web using http does it internally use UDP for the transportation?

+4  A: 

No. Streaming does not use HTTP, even if HTTP might be used to request a stream, the stream itself does not use HTTP. Look up RTP.

unwind
Obviously wrong, there is nothing in HTTP that prevents streaming it is just not as efficient as a dedicated protocol would be.HTTP Dyanmic Streaming using chunks:http://www.adobe.com/products/httpdynamicstreaming/HTTP Pseudo-Streaming:http://www.longtailvideo.com/support/jw-player/jw-player-for-flash-v5/12534/video-delivery-http-pseudo-streaming
Steve-o
+2  A: 

No, HTTP runs over TCP.

Barry Kelly
-1. Not always.
brickner
@brickner In the context of the discussion, HTTP is normally run over TCP rather than UDP, 1% oddball cases aside. I might add it's the worst kind of pedantry to downvote an answer in this context so late, when it won't help the asker at all.
Barry Kelly
@Barry Kelly, it might help other askers. That's why the question is still available - to help other askers. If I was looking for that question, I wouldn't like to do a mistake because of a wrong answer. It seems that the accepted answer didn't even talked about HTTP so all answers about HTTP didn't really help the asker, it doesn't mean it won't help other askers.
brickner
+8  A: 

Maybe just a bit of trivia, but UPnP will use HTTP formatted messages over UDP for device discovery.

Frank Schwieterman
+1  A: 

If you are streaming an mp3 or video that may not necessarily be over HTTP, in fact I'd be suprised if it was. It would probably be another protocol over TCP but I see no reason why you cannot stream over UDP.

If you do you have to take into account that there is no certainty that your data will arrive at the other end, but I can take it that you know about UDP.

To answer you question, No, HTTP does NOT use UDP. For what you talk about though, mp3/video streaming COULD happen over UDP and in my opinion should never happen over HTTP.

PintSizedCat
"streaming" over HTTP is commonly called (what I consider most accurately) "pseudo streaming"--a regulated bit rate of data over HTTP. As is much in our world, the marketing types have abused the nomenclature leaving details-oriented folks like ourselves grasping for specifics.
Stu Thompson
+12  A: 

From RFC 2616:

HTTP communication usually takes place over TCP/IP connections. The default port is TCP 80, but other ports can be used. This does not preclude HTTP from being implemented on top of any other protocol on the Internet, or on other networks. HTTP only presumes a reliable transport; any protocol that provides such guarantees can be used; the mapping of the HTTP/1.1 request and response structures onto the transport data units of the protocol in question is outside the scope of this specification.

So although it doesn't explicitly say so, UDP is not used because it is not a "reliable transport".

Alnitak
Are there any webservers that can be configured to accept connections that aren't TCP?
Spidey