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.
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.