HTTP Flashcards
HTTP
-Hyper Text Transfer Protocol
-Transmission of Hyper Text across the World Wide Web
-Request:Response Model between Client:Server
-Stateless: info is not retained about the client on the server and previous interaction data
HTTP Methods
-GET, POST, PUT , PATCH, DELETE, OPTIONS, HEAD
GET
Retrieve data
POST
Send data
PUT
Update or replace resource on a server
PATCH
Partially update a resource on a server
DELETE
Remove resource on a server
OPTIONS
Discover HTTP methods supported by the server
HEAD
Retrieve headers for a resource without a body
1xx Status Code
Processing
2xx
Success
3xx
Redirection
4xx
Client Error
5xx
Server Error
Headers
Convey meta data about the request. Examples: Content-Type, Authorization, Accept, Cookie (contains stateful state from client), Cache-Control
HTTP/1
-1997
-text-based communication
-Persistent connections, no need to re-establish connection on every request. Client can send Connection: close in the header to terminate connection
-Pipelining: sending multiple requests without waiting for responses. Caveat is “head-of-line’ blocking where the slower response blocks other responses
-Chunked Transfer Encoding: sending data in chunks without the server needing to know the final, total data size (e.g., streaming)
-Caching support: Cache-Control and and Expires
-High latency
HTTP/2
-2015
-binary framing communication, more efficient and easier to parse
-multiplexing: multiple concurrent requests over the same connection.
-header compression: HPACK compression to compress redundant headers
-stream prioritization: certain data takes higher-priority eg html over css
-server push: servers proactively push data to the client
-Limitations: relies on TCP so HOL blocking can occur if fragmentation occurs at the transport layer, still SINGLE streams
HTTP/3
-2020
-Essentially rebuilding HTTP /2 to run on QUIC to replace TCP; and QUIC was built on UDP (a bare-bones equivalent of TCP only concerned with port numbers) that is easily deployable and scalable
-QUIC reduces HOL blocking by receiving data via multiple independent streams where order does not matter vs TCP with one continueous, ordered stream