This is a bit of a strange case ... file throttling.
In the file transfer service that we launched many years ago, files were sent from 10 Mbps upstream servers. To prevent network linking, the script download tracked how many users downloaded at a time, and then counted how many bytes it could send per second to the user. He would send part of this amount, and then a sleeping moment (1/4 second, I think), then send more ... etc.
Thus, the servers worked continuously at approximately 9.5 Mbps without problems with uplink saturation ... and always dynamically changed the download speed.
I would not do it this way or in PHP, now ... but it worked fine at the time.
XediDC Mar 28 '17 at 21:58 2017-03-28 21:58
source share