[Koha-bugs] [Bug 20582] Turn Koha into a Mojolicious application

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Oct 7 01:53:45 CEST 2020


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20582

--- Comment #97 from David Cook <dcook at prosentient.com.au> ---
Ah, it looks like Wildfly's undertow system overrides the transferTo() method
from java.nio.channels.FileChannel, which uses sendfile under the hood (at
least on Linux/UNIX).

Hypnotoad seems to use the same file handling libraries as the rest of
Mojolicious (see
https://github.com/mojolicious/mojo/blob/master/lib/Mojo/Asset/File.pm), and it
does a read/write, which is less efficient than letting the kernel copy
directly from the file to the network socket. 

Since Apache httpd doesn't use sendfile either, both Apache and hypnotoad would
have to buffer the contents of files to serve them, so hypnotoad's ability to
handle many connections via non-blocking I/O probably would make the
performance difference negligible. 

And like I was saying... I'd love to run Koha in containers just using
hypnotoad as the only process running. One could then add a caching proxy/CDN
in front of Koha to further improve performance. (I also think sometimes about
packaging Koha's static assets to make it so you could upload/push to a CDN
ahead of time and totally remove static assets from the Koha backend, but
that's a more complex scenario...)

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list