CloudLinux - CloudLinux Blog - Beta: mod_lsapi - supercharge your Apache PHP hosting
Blog

Beta: mod_lsapi - supercharge your Apache PHP hosting

Beta: mod_lsapi - supercharge your Apache PHP hosting

I had been unhappy with existing ways to serve PHP under Apache for a number of reasons:
  • RUID2 + mod_php - is a giant security hole that lets any user get a root account
  • MPM ITK - is very slow, as it kills processes after each request
  • suPHP & CGI - are both slow, as they start PHP on each request. They are also incompatible with opcode caching.
  • FastCGI - creates a lot of stability issues, hard to configure due to the way it handles processes, and doesn't use opcode caching optimally.
  • PHP FPM - needs a socket/startup per customer, not that stable with Apache and creates a mess when we tried to integrate it with PHP Selector - as now PHP selector would have to restart PHP FPM processes.
After a long period of research we figured out that what we really want is to serve PHP the way it is served by LiteSpeed web server.
Luckily - LiteSpeed Tech open sourced parts of it PHP process management & communication protocol.
So, we went to work - and did the rest. The result of our work is mod_lsapi - an Apache module to serve PHP. While your Apache will still be slower then LiteSpeed API, it will be much faster then with any other way to serve PHP.

Some of the benefits of mod_lsapi comparing to other ways to serve PHP:
  • Speed - it is faster than any other way to serve PHP with Apache
  • Stability - it doesn't suffer from stability issues in process management like PHP FPM
  • Utilizes full benefits of opcode caching
  • MPM Worker & Event compatible
  • Support for PHP directives in .htaccess files
  • Drop in replacement for existing ways to serve PHP
  • Fully compatible with PHP Selector
The software is currently in beta stage, and you can find more info on how to deploy it here:
http://docs.cloudlinux.com/index.html?apache_mod_lsapi.html

While mod_lsapi already outperforms anything available for serving PHP on Apache - there is a lot more that we plan to add to it, like:
  • PHP version per directory settings
  • Faster first page response
  • Higher density
  • Adaptive process spawning
Small FAQ:

Q: Is it available now?
A: Yes, it is available now to current CloudLinux customers

Q: Is it open source?
A: Parts of mod_lsapi are opensourced, but not everything. We closed source lsapi library that allows mod_lsapi to communicate with lsphp.

Q: Does it require PHP Selector?
A: Yes

Q: Does it require CageFS?
A: Yes

Q: Do I have to use it?
A: No, you can continue using whatever way to serve PHP you have used before

Q: Can I switch it off if I don't like it?
A: Yes

Q: Has it been used in production environment?
A: Yes, we have piloted it with a number of customers for the past two months to get rid of majority of issues.
Updates to CageFS, LVE Manager & LVE Stats
CL6/Hybrid kernel 2.6.32-531.17.1.lve1.2.60 fixes ...
 

Комментарии 6

litespeed works with optimumcache -> so it would benefit both.

litespeed works with optimumcache -> so it would benefit both.

Great news!
Really looking forward for this to become stable with optimumcache

Great news! Really looking forward for this to become stable with optimumcache :)

Hi Igor,

When will it become availible for DirectAdmin users?

With kind regards,

Robin

Hi Igor, When will it become availible for DirectAdmin users? With kind regards, Robin

It is available for DirectAdmin now. See installation instructions for DirectAdmin:
http://docs.cloudlinux.com/index.html?installation_mod_lsapi.html

It is available for DirectAdmin now. See installation instructions for DirectAdmin: http://docs.cloudlinux.com/index.html?installation_mod_lsapi.html

Thank you Igor!

I was confused with the following lines in the documentation:
Command Line Tools (cPanel only)

I am going to install this on a server this week!
Keep up the good work CloudLinux team!

Thank you Igor! I was confused with the following lines in the documentation: Command Line Tools (cPanel only) I am going to install this on a server this week! Keep up the good work CloudLinux team!
Уже зарегистрированны? Войти на сайт
Guest
02.04.2020

Изображение капчи