-
Notifications
You must be signed in to change notification settings - Fork 473
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve author image performance #3584
Conversation
Do we want to add the X-Accel redirect to the author images to be consistent with the cover images? I don't know if X-Accel is still useful due to these two PRs greatly reducing the response time for image fetch requests, so maybe we can just get rid of the X-Accel entirely. |
Do we actually have users using X-accel? I've never used this, but from what I read, this requires an Nginx web server running in front of Audiobookshelf to handle the X-accel-redirect responses. I haven't seen any example of how to do this in our codebase or documentation, so this would likely only be used by advanced users, on systems that need to deal with a high throughput. For those who do use it, there might still be some (?) performance gain by offloading the actual serving of those files to Nginx, but I wouldn't keep support for it unless there's a substantial portion of our userbase using it. |
It is implemented here for the cover cache. audiobookshelf/server/managers/CacheManager.js Lines 70 to 74 in 654b1d6
@itzexor is the only one I know who uses it, I don't know if anyone else uses it. If these changes to the API makes the performance difference negligible I would say we can get rid of it. |
My opinion is that X-accel support is an undocumented feature that only benefits very specific (undocumented) setups. It also provides a level of optimization that is not matched by our server's capabilities (I mean, we've just seen how the server has issues dealing with 30 requests in parallel before sending even a single byte back). I would gladly remove it altogether. |
@itzexor is the only user I'm aware of that is using it |
Thanks! |
This is the same as PR #3580, for author images.