uoregon-libraries / rais-image-server

RAIS: A IIIF-compliant, 100% open source image server for blazing-fast deep zooming
Creative Commons Zero v1.0 Universal
78 stars 6 forks source link

Look into limiting incoming requests #33

Open jechols opened 4 years ago

jechols commented 4 years ago

Go's standard http package is a little too willing to accept requests, so when concurrency reaches absurd levels (say 20+ concurrent requests), all the requests are fighting for very limited resources, which can cause responses to take a very long time.

We could implement a worker queue of some sort in the image processing code, perhaps. Kind of hacky, but it would prevent the server from getting into a death spiral where the slowness causes requests to keep piling up, which makes things even slower, etc.

Then again, this has never caused problems outside of extreme load testing - real-world use just doesn't get that heavy. Definitely not a major priority.