Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

We will now consider how long it will take YouTube to serve users under differen

ID: 3590395 • Letter: W

Question

We will now consider how long it will take YouTube to serve users under different architectures. There are N users watching the same video of size F at the same time, download rates are all d , client upload rates are all u . These users all connect to same server at the starting stage. The uploading rate of this server is u . What is the minimum distribution time (to serve all s clients) under the following scenarios?  

1.  In traditional server-client architecture? (show math)

2.  If YouTube moves to a P2P model, in which clients can exchange pieces of the video with each other in parallel with downloading from server?

3. If YouTube replicates to N identical servers? Each server can serve multiple users at the same time, but the total upload rate for each server cannot exceed Us.

4. What is the minimum distribution time if there are M servers in the CDN, where N = kM and k is a positive integer? Each server can serve multiple users at the same time, but the total upload rate for each server cannot exceed Us .

Explanation / Answer

N=Number of users
F=Size of video
d=Download rate
u=Upload rates
*n=is dividing factor
1) In traditional server-client architecture
Here we are considering upload speed of server is >>> download speed of client
The video will be divided into chunks
suppose F/N
each chunk is ditributed to each user.
Total time for one chunk will be (F/n)*u for server.
Total time for one chunk if it is doing it parallelly then it will be same as (F/n)*u
Total time for downloading one chunk for client would be ((F/n)*u)*d
So, total time of distribution in parallel it would be ((F/n)*u)*n
But since server will be multithreaded for paralleism there would be swithiching time between threds. Suppose that time is t which is vesy small in nanoseconds
So total time for one chunk would be [(F/n)*u+Nt]
So total time for all file woild be n*[(F/n)*u+Nt]

2) In P2P model
File gets divided into chunks n.

For one client there would be (F/n*N) number of chunks.
It will take (F/n*N)*u to server to distribute chunks to different clients.
For each cient time required for one chunk would be (F/n*N)*d
Let t be the time for switching between threads for server.
Then distribution time for all chunks would be (F/n*N)*u+Nt
For clients now will have different chunks.They have to get remaining chunks.
So time required for client to upload its chunk would be (F/n*N)*u
So total time for one client for receiving and uploading would be (F/n*N)*d + (F/n*N)*u
So total time for receiving remaining packets for particular client would be (N-1)(F/n*N)*d)+(F/n*N)*u

3)N server added
Each will serve each client. That woild be take like n*(F/n+t)
this t would be difference between upload and download speed of server and client respectively.

4) N=kM

So at a time one server can serve N/k.
(F/n)*(N/k) will be the time for one server for one chunk of distribution.
t will be the swithiching time between threads.
So total time would be [(F/n)*(N/k)]+t for one chunk

And for entire file it would take n*[(F/n)*(N/k)]+t time to server

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote