HTTP uses TCP for its transport protocol. Hence, a three-way handshake is performed before a connection is established. What if there are parallel HTTP connections? Must a three-way handshake must be performed for each connection or will one suffice?
Tcp – How many handshakes for parallel http connection
tcp
Related Solutions
There is no conversion, what you have is Encapsulation
Ex: you use wireshark on your local PC to capture your HTTP session. Basically, what you end up with looks like:
[Ethernet Frame [IP Packet [TCP Segment [HTTP Request]]]]
- The Ethernet frame has the EtherType field of 0x0800 that gives us the encapsulated protocols as IP
- The IP Packet has the Protocol Field of "6" that tells us the next level is TCP (ICMP is Protocol "1")
- TCP has the Destination port of 80, on which normally a Web Server is listening to
- HTTP is what is actually understood by a Web Server
I would give an answer of "no, but it is remarkably similar."
Here's some history and a largely complete explanation.
Circuits 101
Information networks can route traffic, basically, in terms of circuit switching or in terms of packet switching. Circuit switching offers many more guarantees than packet switching, but this comes at a cost, and so circuit switched networks can't degrade gracefully. The classic circuit-switched network is the PSTN, and a virtual circuit would be something like a DS0 on the PSTN.
A DS0 basically works as part of a bundle of connections, usually in a DS1. In a DS1, you will have a bundle of DS0's which are transmitted together, frame-by frame in time-division manner, so each DS0 is guaranteed a specific bandwidth, timeliness, etc. by the underlying network transport.
Another way to look at this is that a physical circuit would be something like a cat6 cable running between two terminals. You can send data back and forth over the wires at guaranteed speeds, and no other communications are going to interfere with that. Indeed the early telephone networks worked by connecting physical circuits (that is copper wires) using manual or electromechanical switches. As this was computerized, the circuits were virtualized and digital (as opposed to analog) information was sent down wires on a time division basis again with a circuit reserving a slot in the time division schedule.
What this means is that circuit switching is more about bandwidth reservation than it is about routing. The former leads to the latter. I.e. a circuit reserves bandwidth for the entire connection.
Why TCP Connections are not Virtual Circuits
TCP/IP is fully packet-switched. It makes no provisions for virtual circuits. This is why things like QoS are often necessary when trunking VOIP (a virtual circuit has built-in QoS guarantees). You have no guarantee that all packets will be routed alike. They may not come through in the same order. They may not come through in a timely manner (from a connection-oriented perspective). So you can't really build virtual circuits per se on top of a packet switched protocol like IP.
TCP comes somewhat close and in fact can work as a somewhat imperfect substitute. It offers as many of the guarantees as it can. This is why, when implemented on TCP/IP, H.323 uses TCP connections instead of the virtual circuits the protocol prefers.
But TCP connections still aren't circuits, because they don't reserve bandwidth during connection on every switch between the two nodes.
Of course TCP connections are more than just datagrams. They include routing information (as does UDP) but they also include the accounting information necessary to reconstruct the stream on the other side in order.
The Answer
Both TCP and UDP are datagram protocols. They send a packet of data with routing information to routers with none of the guarantees of that a circuit offers. TCP offers a subset of guarantees on the end points of what a circuit would offer by adding accounting information to allow the end points to handle errors and a series of data in order, but it is only a subset. Of datagram protocols, TCP is the closest thing one will find to a virtual circuit but it is still conceptually and operationally very different.
Best Answer
Yes, parallel HTTP connections requires separate three-way handshakes.
Multiple HTTP requests can be handled in one TCP connection. This can happen sequentially, but since HTTP/1.1, the concept of pipelining allows sending multiple HTTP requests in one TCP connection without waiting for the responses. This results in a seemingly parallel handling of HTTP requests, but note HTTP/1.1 requires the server to send the responses sequentially and in the same order as it received the corresponding requests.