Enable Plack with Koha and improve the performance

Plack (the modern web server interface for Perl) is a performance booster for Perl web applications. Plack can improve Koha's performance across various operations. Koha is currently running via CGI (Common Gateway Interface). In this mode, the server starts a new process for every single request. While functional, it is inefficient and, more importantly, lacks the built-in security middleware required to prevent CSRF (Cross-Site Request Forgery) attacks.

Without Plack, Koha cannot properly validate that the requests coming to the server are intentional and authorised. CGI is significantly slower than Plack, which keeps the application "pre-loaded" in memory.

An attacker could trick a logged-in librarian into clicking a malicious link, which could then execute actions (such as deleting records or changing settings) without the user’s knowledge.

To resolve this, you need to enable the Plack service for your Koha instance. This is typically done via the command line on your server.

Apply the following commands after the installation of Koha:

sudo koha-plack --enable library
sudo a2enmod headers proxy_http
sudo koha-plack --start library
sudo service apache2 restart

Note: Plack creates a cache for speed. Make sure the PC has a good amount of RAM, if you are going to enable Plack.

References

1 comment:

  1. Even at 4GB host memory (windows 7 64 bit), Guest VM(VMware 2GB RAM) I have got excellent speed. Thanks VIMALKUMAR.... Salute to you

    ReplyDelete