It has a routing function, with the purpose of delivering packets, from the source host to the destination, based on IP addresses. IP: Internet Protocol
with a server, the TCP protocol opens a connection, that allows HTTP data to be transferred reliably TCP: Transfer Connection Protocol TCP’s reliability derives mostly from it being full duplex, which means that communication is bidirectional, and for every packet sent, an acknowledgement is sent back, in the same order. Other protocols interesting to us
keep-alive, multiple TCP connections are open in parallel, to send several requests. ✱ PERSISTENT Introduced with HTTP 1.1 in 2000, and also known as keep-alive, enables the use of a single TCP connection to send and receive multiple requests and responses
Server Web Server DNS Lookup Connect Send Wait Load Client tries to resolve the domain name for the request by sending the DNS query, to which the DNS Server responds with the IP address.
Wait Load Client opens TCP connection with IP address of host. Three way handshake occurs. (SYNC, ACK-SYNC, ACK = circa 90 milliseconds.) And how does an HTTP transaction work?
Wait Load Client waits for response. Server looks for resource and sends response with first byte of first packet (headers and content of response) And how does an HTTP transaction work?
for packets to travel from origin to destination ✱ TRANSMISSION Delays caused by media, repetition, packet size, etc. ✱ ROUTER AND OTHER GATEWAY NODES Examination and processing of headers, for example
negotiation mechanisms to elect the protocol to be used ✱ Maintain high level of compatibility with HTTP/1.1 ✱ Support common existing cases of HTTP (such as desktop browsers, mobile browsers, web API’s, web servers, proxies, firewalls and CDN’s)
connection, through which the request/response takes place Anatomy of an http/2 connection ✱ ...has a weight, that defines what resources are in charge of it ✱ ...may have a dependency to another stream, that indicate what resources are more important than others ✱ ...also have states
data frames, that map to a request/response Anatomy of an http/2 connection Please notice that this mapping between binary and text, is what makes HTTP/2 work over HTTP/1.x (clear-text) although they’re not compatible, but have compatibility in semantics
involved in the protocol Anatomy of an http/2 connection ✱ ...each of them contain a header section and a data section ✱ ...each of them have a type, a length, a flag and a stream id
the type: it determines the use of the header Anatomy of an http/2 connection ✱ the flag: it’s associated to the type and determines some characteristic of the header ✱ the stream id: which determines to what stream a frame belongs to, and is transported through
The mechanism that allows for several requests to be sent one after another, over the same TCP connection, at the same time that several responses are received, out of order, by combining signals into one.
embedding a necessary resource right in the HTML, right where you need it. If it’s an image, you can do it on BASE-64. CSS and JS can be embedded using the <style> and <script> tags respectively. This technique has negative impact as well
at overriding the max-amount of connections at a time, by downloading resources from different domains or aliases. If a site downloads around 50 resources at the front-page, it could have it more or less covered, by establishing TCP connections to 9 different aliases at a time. Again, there is a downside to this too