This was an amazing explanation. I can't think of a way better than this to explain such a complex concept in such a simple way. Truly appreciated, keep doing amazing work.
I have always been intrigued by p2p because I know the internet was originally designed to be decentralized to improve its resilience during a nuclear war. Great video!
Awesome visualisations, keep up the good work! You definitely earned a subscriber today. I would've loved some more discussion about different gossip protocols :)
Thank you 🙏. I agree, gossip protocol deep dive can be interesting, I avoided it discussing any further because that is not expected in FAANG/MAANG system design interviews. Please let me know if you have any tech topics in mind that I should cover. Thanks for subscribing!
Impressive video presentation featuring a highly informative exposition with meticulous elucidation and captivating graphical animations, especially for the intricate subject of peer-to-peer network protocols. Your adept simplification of this challenging topic is commendable.
I have not much knowledge about networking but I can't believe the p2p solution is better in this case. Each peer needs the 999 pieces. That means for one client 999 downloads and 999 uploads. Also a little time extra: A server has to cut the videos and sent each piece to a client (even though this process will work in parallel to clients sending pieces to each other). I didn't checked your math, I don't say you are wrong, I just can't believe it.
I have a question In your example, why do you say step 2 takes 0.001 second? The Red server sends 5MB to node 1, but at the same time Node 1 sends 5BM to Node 2 So this means that 10MB are simultaneously transmitted on the SAME 5GB/sec LAN, which should take 10/5000 = 0.002 second Same for step 3 - the following operation happen simultaneously: - Red sends 5MB to Node 1 - Node 1 sends 5MB to Node 2 - Node 2 sends 5MB to Node 3 So this means that 30MB are simultaneously transmitted on the SAME 5GB/sec LAN, which should take 15/5000 = 0.003 second etc... Did I miss anything? Thanks in advance for your answer :)
Hi I have one doubt here the time to send file from server to pear and pear to pear will same ? my understanding says that network throughput of server is much much higher than peer machine network through put. For eg peer machine 1 and peer machine 2 will not have same network throughput as big company infrastructure have.
Great question, its a little long answer which I haven't covered in the video In a peer-to-peer (P2P) network, sending a file from a server to a peer and sending a file from one peer to another can be different processes, depending on the type of P2P network and the file-sharing application being used. In a decentralized P2P network, where there is no central server, files are shared directly between peers. In this case, sending a file from one peer to another is the same as sending a file from a server to a peer, as both involve transferring the file between two connected devices. The file is typically split into smaller pieces and distributed among multiple peers, allowing for faster and more efficient sharing. In a centralized P2P network, where there is a central server that facilitates file sharing, the process of sending a file from a server to a peer may be different from sending a file from one peer to another. In this case, the file may be first uploaded to the central server, which then distributes the file to the requesting peer. Sending a file from one peer to another may still involve splitting the file into smaller pieces and distributing them among multiple peers. Overall, the method of sending files in a P2P network depends on the specific network architecture and file-sharing application being used. Hope this helps!
Hi, I have a question. 5 Giga bytes / second = 5 mega bytes / 0.001 second. So in other words the total network throughput is 5 mega bytes per 0.001 second. In that case how are we able to transfer more than one 5 mega byte chunk between the time interval 0.001 and 0.002? Does that mean that the throughput we are talking about is for each device and not the sum of all? PS: My apologies if I said something dumb, it's just that I have been really trying to get my head around this calculation.
How do you make these animation videos?? I do have a youtube channel around system design as well and continuously strive to improve the quality with content and editing, i use final cut pro x. You videos seems high in quality in content and with cool animations as well. Your inputs will help me.
I believe 0.999 seconds calculation is wrong. The peers won't have the network bandwidth of 5GBps so they cannot download the 999 - 5MB files in ~1sec.
The total network throughput of a data center typically depends on the size and scale of the data center, as well as the types of applications and workloads that are running. For example, Google's data centers have a total network capacity of over 100 Tbps. This means that all of the servers in Google's data centers can communicate with each other at a rate of over 100 Tbps. The total network throughput of a data center is not the same as the bandwidth of each individual server. The bandwidth of each server is the maximum rate at which that server can communicate with other devices on the network. However, the total network throughput is the sum of the bandwidth of all of the servers in the data center.
To clarify further, the network throughput speed of a data center is not necessarily based on the number of machines in the network. The network throughput is the maximum rate at which data can be transferred between any two points in the network. Time taken = File size / Network throughput * Number of machines Time taken = 5 GB / 5 Gbps * 1000 machines Time taken = 1000 seconds To calculate the time it would take one machine to receive a 5MB file from a data center with a total network throughput of 5 Gbps, we can use the following formula: Time taken = File size / Network throughput Time taken = 5 MB / 5 Gbps Time taken = 0.0009765625 seconds To calculate the time it would take one machine to get all 1000 5MB files from a data center with a total network throughput of 5 Gbps, we can use the following formula: Time taken = Total file size / Network throughput Time taken = (1000 files * 5 MB/file) / 5 Gbps Time taken = 0.9765625 seconds This means that it would take one machine about one second to get all 1000 5MB files from a data center with a total network throughput of 5 Gbps. However, it is important to note that this is just a theoretical calculation. In practice, the actual time taken may be slightly longer due to factors such as network overhead and the performance of the machine. Hope this helps 🤘
Thanks for the response. That makes sense but I believe in most practical scenarios P2P is a good choice when all the peer machines are not situated at the same data center. Thoughts ?
@@srawat1212 Whether or not peer machines should be stored in different data centers depends on a number of factors, including the size of the file, the number of peers, and the location of the peers. If you are downloading a huge file from a large number of peers, it can be beneficial to have the peers stored in different data centers. This is because it will help to reduce the load on any one data center. Additionally, it can help to improve the performance of the download, as the peers will be able to access the file from multiple data centers. However, if you are downloading a smaller file from a small number of peers, it may not be necessary to have the peers stored in different data centers. In fact, it may be faster to download the file if the peers are all stored in the same data center. Here we have split the file into small chunks for the same reason. if you have peers in different parts of the world, you may want to choose a data center that is centrally located to minimize latency. This is especially important if you are downloading a file that is sensitive to latency, such as a streaming video file.
This was an amazing explanation. I can't think of a way better than this to explain such a complex concept in such a simple way. Truly appreciated, keep doing amazing work.
Very well explained 👍
Peer to Peer is such an underrated architecture for building apps.
It is so good to develop a messaging apps, file sharing, etc
I have always been intrigued by p2p because I know the internet was originally designed to be decentralized to improve its resilience during a nuclear war. Great video!
P2p doesn't necessarily mean decentralized
Awesome visualisations, keep up the good work! You definitely earned a subscriber today. I would've loved some more discussion about different gossip protocols :)
Thank you 🙏. I agree, gossip protocol deep dive can be interesting, I avoided it discussing any further because that is not expected in FAANG/MAANG system design interviews. Please let me know if you have any tech topics in mind that I should cover. Thanks for subscribing!
Really kickass explanation. Spot on!
this blew my mind!
thanks for making learning fun again,
Outstanding explanation and visualisation
Impressive video presentation featuring a highly informative exposition with meticulous elucidation and captivating graphical animations, especially for the intricate subject of peer-to-peer network protocols. Your adept simplification of this challenging topic is commendable.
thank you for the support
You are doing really great, just do not stop making videos! Thank You So Much For This!
Thank you! Hope you checked the system design playlist (Links in description). More to come :)
I have not much knowledge about networking but I can't believe the p2p solution is better in this case. Each peer needs the 999 pieces. That means for one client 999 downloads and 999 uploads. Also a little time extra: A server has to cut the videos and sent each piece to a client (even though this process will work in parallel to clients sending pieces to each other).
I didn't checked your math, I don't say you are wrong, I just can't believe it.
It's reminds me of the difference between direct and alternating current...
Thank you for this amazing video with clear explanation ❤️
Thank you 🙏. Please check out my system design playlist for similar videos, more coming soon.
Sure, waiting for new videos 👍
Super-clear, thanks a lot !
I have a question
In your example, why do you say step 2 takes 0.001 second?
The Red server sends 5MB to node 1, but at the same time Node 1 sends 5BM to Node 2
So this means that 10MB are simultaneously transmitted on the SAME 5GB/sec LAN, which should take 10/5000 = 0.002 second
Same for step 3 - the following operation happen simultaneously:
- Red sends 5MB to Node 1
- Node 1 sends 5MB to Node 2
- Node 2 sends 5MB to Node 3
So this means that 30MB are simultaneously transmitted on the SAME 5GB/sec LAN, which should take 15/5000 = 0.003 second
etc...
Did I miss anything?
Thanks in advance for your answer :)
Great video 👍
Amazing
Very helpful
🔥
Nice explanation keep it up .
Thanks for liking
Hi I have one doubt here the time to send file from server to pear and pear to pear will same ? my understanding says that network throughput of server is much much higher than peer machine network through put.
For eg peer machine 1 and peer machine 2 will not have same network throughput as big company infrastructure have.
Great question, its a little long answer which I haven't covered in the video
In a peer-to-peer (P2P) network, sending a file from a server to a peer and sending a file from one peer to another can be different processes, depending on the type of P2P network and the file-sharing application being used.
In a decentralized P2P network, where there is no central server, files are shared directly between peers. In this case, sending a file from one peer to another is the same as sending a file from a server to a peer, as both involve transferring the file between two connected devices. The file is typically split into smaller pieces and distributed among multiple peers, allowing for faster and more efficient sharing.
In a centralized P2P network, where there is a central server that facilitates file sharing, the process of sending a file from a server to a peer may be different from sending a file from one peer to another. In this case, the file may be first uploaded to the central server, which then distributes the file to the requesting peer. Sending a file from one peer to another may still involve splitting the file into smaller pieces and distributing them among multiple peers.
Overall, the method of sending files in a P2P network depends on the specific network architecture and file-sharing application being used.
Hope this helps!
@@ByteMonk thanks
Thank you 💖😊
thank you so much
Hi,
I have a question.
5 Giga bytes / second = 5 mega bytes / 0.001 second.
So in other words the total network throughput is 5 mega bytes per 0.001 second.
In that case how are we able to transfer more than one 5 mega byte chunk between the time interval 0.001 and 0.002?
Does that mean that the throughput we are talking about is for each device and not the sum of all?
PS: My apologies if I said something dumb, it's just that I have been really trying to get my head around this calculation.
I second this.. maybe someone could clarify?
How do you make these animation videos?? I do have a youtube channel around system design as well and continuously strive to improve the quality with content and editing, i use final cut pro x. You videos seems high in quality in content and with cool animations as well.
Your inputs will help me.
Thank you and all the best! I use FCP and Adobe
I didnt get how it takes 0.9s to get other chunks. The peers wouldnt have 5gbps bandwidth right?
I believe 0.999 seconds calculation is wrong. The peers won't have the network bandwidth of 5GBps so they cannot download the 999 - 5MB files in ~1sec.
The total network throughput of a data center typically depends on the size and scale of the data center, as well as the types of applications and workloads that are running.
For example, Google's data centers have a total network capacity of over 100 Tbps. This means that all of the servers in Google's data centers can communicate with each other at a rate of over 100 Tbps.
The total network throughput of a data center is not the same as the bandwidth of each individual server. The bandwidth of each server is the maximum rate at which that server can communicate with other devices on the network. However, the total network throughput is the sum of the bandwidth of all of the servers in the data center.
To clarify further, the network throughput speed of a data center is not necessarily based on the number of machines in the network. The network throughput is the maximum rate at which data can be transferred between any two points in the network.
Time taken = File size / Network throughput * Number of machines
Time taken = 5 GB / 5 Gbps * 1000 machines
Time taken = 1000 seconds
To calculate the time it would take one machine to receive a 5MB file from a data center with a total network throughput of 5 Gbps, we can use the following formula:
Time taken = File size / Network throughput
Time taken = 5 MB / 5 Gbps
Time taken = 0.0009765625 seconds
To calculate the time it would take one machine to get all 1000 5MB files from a data center with a total network throughput of 5 Gbps, we can use the following formula:
Time taken = Total file size / Network throughput
Time taken = (1000 files * 5 MB/file) / 5 Gbps
Time taken = 0.9765625 seconds
This means that it would take one machine about one second to get all 1000 5MB files from a data center with a total network throughput of 5 Gbps.
However, it is important to note that this is just a theoretical calculation. In practice, the actual time taken may be slightly longer due to factors such as network overhead and the performance of the machine.
Hope this helps 🤘
Thanks for the response. That makes sense but I believe in most practical scenarios P2P is a good choice when all the peer machines are not situated at the same data center. Thoughts ?
@@srawat1212 Whether or not peer machines should be stored in different data centers depends on a number of factors, including the size of the file, the number of peers, and the location of the peers.
If you are downloading a huge file from a large number of peers, it can be beneficial to have the peers stored in different data centers. This is because it will help to reduce the load on any one data center. Additionally, it can help to improve the performance of the download, as the peers will be able to access the file from multiple data centers.
However, if you are downloading a smaller file from a small number of peers, it may not be necessary to have the peers stored in different data centers. In fact, it may be faster to download the file if the peers are all stored in the same data center.
Here we have split the file into small chunks for the same reason. if you have peers in different parts of the world, you may want to choose a data center that is centrally located to minimize latency. This is especially important if you are downloading a file that is sensitive to latency, such as a streaming video file.
I'm here after multiple payment processors sent me through tunnels just to transfer money to people
Video on payment processors coming soon :)
@@ByteMonk Need it got those notifications on 🔥
Thanks brthr
🔥