Just curious how do file hosts (e.g. Rapidgator) control the speed at which you are able to download a file?
For example, if you choose a free option, you download the file at X hours. However when you’re a Premium user, the file is downloaded 10x faster.
Like it’s the same file with the same file size, right? What do they do so that there will be difference at which a user will be able to download a file depending on their subscription? If it’s feasible, would also like a visualization of what happens when your browser downloads via free vs. via premium account.
Thank you!
Edit: grammar
In: 18
The world wide web is built upon two major protocols: Transmission Control Protocol (TCP), and Internet Protocol (IP). Or collectively referred to as TCP/IP. These protocols determine how data (the *payload*) is encapsulated for sending over a network, including things like adding *headers* that help get the traffic to its destination, and replies to be sent back.
Under TCP/IP, any data exchanged between two devices is send using packets. The postal system is a popular analogy for computer networks, it’s literally influenced how they’re designed; in this analogy, the payload is the letter you want to send, and the TCP/IP packet is the envelope you put it in. The size of the chunks is determined by the Maximum Transmission Unit (MTU), which can be configured in the network hardware. An MTU of around 1500 bytes is common. This means that no individual TCP/IP packet will be larger than 1500 bytes.
But pretty much anything you want to download today is much larger than 1500 bytes. So larger files are broken up and sent as a stream of multiple packets, which are reassembled at the receiving end. Like if your letter has too many pages, you might have to send separate envelopes. TCP records sequence numbers so you can put them in the right order and ensure no packets get lost.
A network connection generally cannot control how fast a packet is sent. Electricity goes as fast as the copper wire allows. Light travels as fast as the fibre optic cable allows. A router or switch will route packets to their destination as fast as its hardware allows, though they can prioritise certain types of traffic over others. But overall these speeds are pretty much fixed.
But what a web server *can* do is control how quickly it sends each subsequent packet. So a file hosting service might choose to limit how quickly it streams the packets to any given user. It can easily incorporate a system that sends packets faster if a user pays for a premium account. Just like if you’re sending a series of letters, you don’t really have any control over how quickly the mail truck picks it up, or the processing centre sorts it, or the mailman delivers it. But you can certainly wait a few days before posting the next letter in the sequence.
Latest Answers