Does HTTP use UDP?

Sesh picture Sesh · Nov 27, 2008 · Viewed 174.5k times · Source

This might be a silly question:

  • Does HTTP ever use the User Datagram Protocol?

For example:

If one is streaming MP3 or video using HTTP, does it internally use UDP for transport?

Answer

Alnitak picture Alnitak · Nov 27, 2008

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".

EDIT - more recently, the QUIC protocol (which is more strictly a pseudo-transport or a session layer protocol) does use UDP for carrying HTTP/2.0 traffic and much of Google's traffic already uses this protocol. It's currently progressing towards standardisation as HTTP/3.