Routing – How do networks duplicate packets en route

internetrouting

I am sorry if this isn't a great place to ask this but I'm not sure which stackexchange to use. I'm not a network engineer but I am curious about one aspect of how the internet functions but I can't find anything about it.

I understand that when a user, say, visits a website, they send a data request to the host server which then responds with a stream of data packets, getting routed through however many datacentres, ISPs and routers as needed. My question is what happens when two relatively-nearby clients both request the same data at the same time. Does the host server send twice the amount of data, one to each client, or is there a protocol that sends a single packet which is then duplicated at some node down the line, closer to the end clients.

Such as during a livestream by a country's prime minister being watched by a million of their citizens. Does the server in the capital need to send the same stream of data to all of the people, or is there maybe one stream to each city and is then duplicated and split up as needed? I understand in this specific case there's probably a selected ISP that is hosting the stream and they probably handle some system like this between their datacentres, but I'm asking in a more general sense.

Best Answer

what happens when two relatively-nearby clients both request the same data at the same time. Does the host server send twice the amount of data, one to each client, or is there a protocol that sends a single packet which is then duplicated at some node down the line, closer to the end clients.

The former. Different requests use different connections and bear no relation to each other, even if they're carrying completely identical data. There's no deduplication of application-layer data on any lower layer. This method is called unicast.

As @manish_ma has explained, multicast is a special distribution form to send the same server data to multiple clients. The difference is that it is not a request-response model but the transmission is initiated by the server (may be triggered by a client event). Clients can then subscribe to the multicast - and get a copy - or not.

However, multicast does not work on the open Internet, only in private networks. Sites like Youtube actually stream a separate flow to each client, even if many watch the same (live) video.

Related Topic