How Peer to Peer (P2P) Network works | System Design Interview Basics

  Рет қаралды 28,696

ByteMonk

ByteMonk

Жыл бұрын

In this video I explain how a typical Peer to peer network works with examples, which you must know for system design interview.
Example Peer to Peer (P2P) Network Kraken: github.com/uber/kraken
System Design Interview Basics Playlist:
► • System Design Intervie...
AWS Certification:
►AWS Certified Cloud Practioner: • How to Pass AWS Certif...
►AWS Certified Solution Architect Associate: • How to Pass AWS Certif...
►AWS Certified Solution Architect Professional: • How to Pass AWS Certif...

Пікірлер: 41
@subhajitadhikary-99
@subhajitadhikary-99 10 күн бұрын
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.
@vanilla_bryce
@vanilla_bryce Жыл бұрын
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!
@tanishq2766
@tanishq2766 Жыл бұрын
You are doing really great, just do not stop making videos! Thank You So Much For This!
@ByteMonk
@ByteMonk Жыл бұрын
Thank you! Hope you checked the system design playlist (Links in description). More to come :)
@ecoholic84
@ecoholic84 2 ай бұрын
this blew my mind! thanks for making learning fun again,
@dhruvasahasrabudhe3159
@dhruvasahasrabudhe3159 Жыл бұрын
Awesome visualisations, keep up the good work! You definitely earned a subscriber today. I would've loved some more discussion about different gossip protocols :)
@ByteMonk
@ByteMonk Жыл бұрын
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!
@hemantkapila4317
@hemantkapila4317 10 ай бұрын
Really kickass explanation. Spot on!
@harshkaneria
@harshkaneria Жыл бұрын
Outstanding explanation and visualisation
@siyaram2855
@siyaram2855 9 ай бұрын
Peer to Peer is such an underrated architecture for building apps. It is so good to develop a messaging apps, file sharing, etc
@alonhalimi
@alonhalimi Жыл бұрын
Super-clear, thanks a lot !
@alonhalimi
@alonhalimi Жыл бұрын
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 :)
@anonymous........
@anonymous........ 6 ай бұрын
Very well explained 👍
@sde.mahesh.kasana
@sde.mahesh.kasana 9 ай бұрын
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.
@ByteMonk
@ByteMonk 9 ай бұрын
thank you for the support
@govardhanreddy690
@govardhanreddy690 Жыл бұрын
Thank you 💖😊
@ArjunAnil93
@ArjunAnil93 Жыл бұрын
Thank you for this amazing video with clear explanation ❤️
@ByteMonk
@ByteMonk Жыл бұрын
Thank you 🙏. Please check out my system design playlist for similar videos, more coming soon.
@ArjunAnil93
@ArjunAnil93 Жыл бұрын
Sure, waiting for new videos 👍
@mukuljaitu
@mukuljaitu 10 ай бұрын
Very helpful
@hexa345
@hexa345 7 ай бұрын
Great video 👍
@ahmetkarakartal9563
@ahmetkarakartal9563 Жыл бұрын
thank you so much
@alberts6096
@alberts6096 Жыл бұрын
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.
@shirish2005
@shirish2005 Жыл бұрын
Nice explanation keep it up .
@ByteMonk
@ByteMonk Жыл бұрын
Thanks for liking
@siyaram2855
@siyaram2855 Жыл бұрын
🔥
@ahmedshakeel17
@ahmedshakeel17 7 ай бұрын
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.
@sameerkrbhardwaj7439
@sameerkrbhardwaj7439 Жыл бұрын
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.
@ByteMonk
@ByteMonk Жыл бұрын
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!
@sameerkrbhardwaj7439
@sameerkrbhardwaj7439 Жыл бұрын
@@ByteMonk thanks
@amanbhardwaj5318
@amanbhardwaj5318 10 ай бұрын
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.
@ByteMonk
@ByteMonk 10 ай бұрын
Thank you and all the best! I use FCP and Adobe
@Biggie-bq5bk
@Biggie-bq5bk 7 ай бұрын
I'm here after multiple payment processors sent me through tunnels just to transfer money to people
@ByteMonk
@ByteMonk 7 ай бұрын
Video on payment processors coming soon :)
@Biggie-bq5bk
@Biggie-bq5bk 7 ай бұрын
@@ByteMonk Need it got those notifications on 🔥
@srawat1212
@srawat1212 9 ай бұрын
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.
@ByteMonk
@ByteMonk 9 ай бұрын
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.
@ByteMonk
@ByteMonk 9 ай бұрын
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 🤘
@srawat1212
@srawat1212 9 ай бұрын
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 ?
@ByteMonk
@ByteMonk 9 ай бұрын
@@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.
@lightsupmedia739
@lightsupmedia739 10 ай бұрын
🔥
How CDN Works | System Design
5:57
ByteMonk
Рет қаралды 26 М.
Мы никогда не были так напуганы!
00:15
Аришнев
Рет қаралды 6 МЛН
1.3.1 Client Server vs Peer to Peer - Revise GCSE Computer Science
6:53
Revise Computer Science
Рет қаралды 14 М.
UDP Peer-To-Peer Messaging With Python
7:20
Engineer Man
Рет қаралды 56 М.
When Blackmailing A Drug Lord Goes Terribly Wrong
32:14
KiraTV
Рет қаралды 4,6 МЛН
How Web Sockets work | System Design Interview Basics
5:28
ByteMonk
Рет қаралды 188 М.
Top 6 Most Popular API Architecture Styles
4:21
ByteByteGo
Рет қаралды 853 М.
Basic System Design for Uber or Lyft | System Design Interview Prep
16:18
Real World P2P Energy Trading on Blockchains EXPLAINED
3:37
HERO Energy & Engineering
Рет қаралды 14 М.