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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With