rnjai
rnjai

Reputation: 1135

TCP Connection For Devices in same network

When two devices D1 and D2(on different networks) have processes P1 and P2 running respectively on them then if P1 wants to get data from P2 then -

P1 establishes TCP connection with P2 . P1 sends SYN packet.
P2 sends SYN-ACK packet.
P1 answers with ACK packet, concluding the three-way TCP connection establishment. After this HTTP request is sent over this TCP connection.

Lets say D1 and D2 are on the same network, will this process be faster and why.

Upvotes: 0

Views: 510

Answers (1)

Malt
Malt

Reputation: 30285

The less time it takes for P1's message to reach P2 and vice versa, the faster this process will be. That time depends on a variety of factors, among them is the physical distance between the machines and the number and capacity of networking equipment and links along the way.

Since machines in a local network are typically close, with little networking equipment between them, a connection between should faster than if the machines are further apart.

Of course one could imagine scenarios in which that's not the case, but those would be atypical edge cases.

Upvotes: 1

Related Questions