How Fast of Upload Speed Do You Need for P2p

In this article, we will discuss the overview of client-server and peer to peer and will understand both with the aid of example and will talk over how P2P can calibration by itself in both cases. Let'southward discuss it 1 by 1.

Overview :
To sympathise how peer-to-peer tin calibration and to know why information technology is ameliorate than client-server architecture in some ways permit'south commencement empathise what is customer-server.

Client-Server :
Think of servers as a source and client every bit a receiver. Whatever receiver wants it can ask source and source in most of the cases will reply. But this receiver tin can't reply to the aforementioned query if asked by any other receiver (client). So the source (server) here deals with all these queries from different clients lonely. Now, this stuff asked by the client need not be just some text, but can be large size files may be of GBs. Now things are going to get a little interesting. Let's try to understand with assistance of some graphics.

This will help a niggling-bit

Case –

  • Presume in that location is n number of clients who each wants a file of size F bits (for simplicity) simultaneously which is sitting there on the server. The speed at which the server tin can upload files is let'due south say Uₛ bits/sec (U subscript south). So, the server will be uploading n × F bits as it will be uploaded to every continued link simultaneously.
So, under ideal status time taken = (n × F / Uₛ) sec...... equation-1
  • Above we take discussed the time it volition take for the server to upload on every link connected. But what if the upload speed of the server is not a business organization, but the download speed of the customer. Let's once more use some graphics.

Same as above with download speeds of clients added

  • At present suppose the server's upload speed is more than enough required. Now fourth dimension taken will exist decided past client-side download speeds (denoted as d₁, d₂, d₃, ….dₙ in our diagram) to be precise the minimum of download speed.
i.east. Dₘᵢₙ = min (d₁, d₂, d₃, ….dₙ)
  • To download F $.25 size file the slowest download speed client(slowest) volition
Take time = (F/Dₘᵢₙ) sec……………...equation-2
  • Now, these 2 observation will help u.s. take out the fourth dimension it will take from server to client to distribute the file.
Distribution fourth dimension for client-server  (D ꜀₋ₛ) ≥ max {north × F / Uₛ, F/Dₘᵢₙ}sec. This means max  {due north × F / Uₛ, F/Dₘᵢₙ}  will give the lower leap.
  • Or in another word we can say the minimum time for file distribution to all the clients won't be less than the maximum of {n × F / Uₛ, F/Dₘᵢₙ}.
  • From here we can a decision that the fourth dimension required to distribute the file volition increase linearly with the number of clients downloading files simultaneously given by (n × F/ Uₛ). So, if say one solar day at that place are 100 people downloading the aforementioned file at one time information technology is taking t time, and if on some other day at that place are 1000 people it will accept 10 × t fourth dimension (or more than).

Peer to Peer :
If you understood client-server architecture then this is non any harder. We practise have a server here too, which initiates a new connection. Now again, let'southward apply a graphic to get things clearer.

A peer to peer architecture

Example –

  • From higher up, we can run across that in peer to peer every client is connected with some other clients besides, which obviously shows that they can share among themselves too, the converse of what stated in customer-server where every client was asking file from the server. Clients, here are what we too telephone call peers (peers and clients can be used interchangeably) look they will also work equally a server by sending data that they received to other peers resolving some traffic which otherwise server side alone had to handle. Also, U₁, U₂, … Uₙ show the upload speeds of these peers.
  • Starting with file which is again resting on server here server only sends each bit once into link(under platonic condition). And so, we tin can say that minimum distribution time from this end will exist (F/ Uₛ) (not less than this at least)… (three)
  • At present again peer with the slowest download speed tin can't obtain all F bits of file in less than (F/Dₘᵢₙ) ….(4)
  • At concluding observe full upload speed which will be upload speed of server along with upload speed of every continued individual peer.
  • i.e. Uₜₒₜₐₗ = Uₛ + U₁ + U₂+…. + Uₙ besides the combine file size to be uploaded by entire system would be due north × F $.25 once again so, each peer receives one re-create of that file. This distribution time won't be less than (n × F / Uₜₒₜₐₗ)….(5)
  • Now, putting observation 3,four and 5 together
Distribution time(Dₚ₂ₚ) ≥ max {F/ Uₛ, F/Dₘᵢₙ, n × F / Uₜₒₜₐₗ}.
  • Further to compare both architectures let'south take the minimum distribution time of each architecture equal to their lower bound
i.e. D ꜀₋ₛ = max {n x F / Uₛ , F/Dₘᵢₙ} - for client server Dₚ₂ₚ = max {F/ Uₛ, F/Dₘᵢₙ, north x F / Uₜₒₜₐₗ} - for peer to peer
  • Permit's start making some assumption again for simplicity — Dₘᵢₙ is not an effect if it is large enough and in peer to peer instance Uₛ is enough to upload entire file into link very fast. Now if we plot a graph between number of peers (clients) and minimum distribution time we volition go something similar

Client-server vs peer to peer

  • Now from above diagram we tin can detect that as number of peers increases the minimum distribution time in customer server is increasing linearly whereas in peer to peer with increasing number of peers it is scaling past itself. Moreover, we tin also find in client server the minimum distribution fourth dimension is unbounded whereas in instance of p2p the curve is getting bounded i.e. showing no affair how many peers information technology won't exceed that limit. This scalability in p2p is due to peers being consumer and redistributors at same time.

References :
The book I used for reference -" Computer Networking a Top-Down Arroyo" -6th edition by James F. Kurose and Keith W. Ross.

meyerpallarcups.blogspot.com

Source: https://www.geeksforgeeks.org/how-p2p-can-scale-by-itself/

Related Posts

0 Response to "How Fast of Upload Speed Do You Need for P2p"

Enregistrer un commentaire

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel