K
K
Kayako2020-06-28 12:37:47
Browsers
Kayako, 2020-06-28 12:37:47

How is downloading in the browser different from BitTorrent?

In BitTorrent, when downloading a popular file, the speed exceeds 1 mb / s, while in other applications a maximum of 150 kb / s

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Korotenko, 2020-06-28
@Kayako

It's better to explain with an example. Let's say you have a 20 mb file.
Http/s
Get /files/file.mp3
and the server gives 20 megabytes. If a break occurs, then the client can send a request to give me a file with 10 megabytes. The problem is that not all servers support it.
As a result, the load on the server FileSize * N * 1.5
In the case of a torrent. The file is divided into chunks (parts), where both the entire hash of the file and the hashes of the parts are considered.
What happens next.
Seeder splits the file into chunks, let it be 2 mb each.
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
Lecher 1
downloads 0 and downloads 1
Lecher 2 Asks
everyone around, they say who has it? starts downloading from Lecher 1 chunk 0
Lecher 3
He asks everyone around, they say who has it? starts downloading from Lecher 2 chunk 1
So ideally the load on Seeder will be FileSize.
Everything else will be passed on to each other by the lychee. Therefore, you can often see the message do not leave the distribution. That is, you downloaded the file and if there is no seeder, then they will download through you.
In general, if it is simplified.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question