View Single Post
Old 10-06-2004, 05:58 AM  
Syrinx
Junior Member
 
Join Date: Jun 2004
Posts: 25
Default bandwidth control

Assume an httpd is coded in the easy model(multi-threaded and blocking socket,one client per thread model).

Assume the bandwidth control is 5000 KB(the total downloaded bytes per second must be no more than 5000 KB per second)

Assume there are 100 con-current clients downloading.

Method:
5000 KB / 100 clients = 50 KB / Client
so if the appliction controls every client's download speed no more than 50 KB per second,it will control the bandwidth.

Problem:
all the clients(100 clients) have different download speed.Assume only 50 of them can reach 50 KB per second(they can have higher download speed only because they all are limited by the 50 KB download speed),the half rest onl have 20 KB per second. If so,there bandwidth is 50 KB * 50 + 20 KB * 50 = 3500 KB,which is much less than 5000 KB.

Any good method?

Thx in advance

Regard
Syrinx is offline