Open ansell opened 5 years ago
The code has been changed to avoid proxying thumbnails and serve them from the filesystem from the grails application. This has been loaded tested with positive results.
Reopening as this as an enhancement as it hasn't actually been done. It is still something useful to improve the architecture. in future
Load testing on image-service-1.0.5 shows that it consistently runs out of file descriptors at a particular query rate in our current images-beta setup, about 140 requests per second, which is not unreasonable in the long term that it would be hit outside of load testing given we show 20 images at a time to biocache users, and we want to load images at high capacity.
This could be improved by using a pooled or limited HTTP client to request the
/store/
URLs, where the JVM goes out and back in through nginx to fetch the images, rather than accessing them directly.The relevant code where it looks like this can be improved for a large number of cases at once is the following:
https://github.com/AtlasOfLivingAustralia/image-service/blob/a188c9462d25f4eb046c1669c32a04aaa86a5af3/grails-app/controllers/au/org/ala/images/ImageController.groovy#L137-L170