Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to determine the maximum number of parallel / simultaneous file downloads a play framework server can handle.for a fixed bandwidth

I am using play 1.2.4. I am providing a link to download images. A number of clients maybe trying to download the same image at the same time.I would like to know, how to determine the number of simultaneous clients 'n' that can download the image file( 200-300 KB). what are the various factors ?

Suppose I know that I am getting 't' requests, but I know i can handle 'n' requests for a file size 's', i will render the binary image to 'n' clients immediately. remaining "t-n" clients I will send a "interval time" as response to send a request after interval time.

is this even possible?

like image 324
shrth Avatar asked Nov 04 '22 10:11

shrth


1 Answers

I would advise against serving images with Play in a high-volume setting and instead use a CDN. There's even a hosted solution inclusive file upload at https://transloadit.com/ which does all the work for you.

The biggest factor is the play.pool configuration variable. You can read about it in the documentation.

Generally after that, the HTTP requests will queue up, so your idea of implementing "interval times" doesn't really make sense.

like image 103
Samuel Avatar answered Nov 09 '22 11:11

Samuel