Wednesday, March 04, 2009

Inside Zend Server: Linux


In my previous “Inside Zend Server” post I wrote about Zend Server’s significant differentiation on the Windows platform. Although Windows is the most popular development platform for PHP it has by far less footprint in production compared to Linux.

The majority of our customers run PHP on Linux - most of them on Redhat variants. Therefore, it was critical for us to deliver the best possible experience for Zend Server on Linux. In order to show our commitment to Linux we made a strategic decision and decided to release the product in the de-facto, native format for Linux installations so that Zend Server fits into the Linux distributions like a glove.

The advantages that led to this decision were many, to name just a few:

- Using the native installation method means users can install Zend Server just as they would any other software from the distribution's repository. This allows users to utilize the tools they are accustomed to, be it yum, aptitude, synaptic or Kpackage; any tool that supports the DEB or RPM formats will work for the purpose of installing Zend Server.

- Any automation tools used for RPM or DEB installation purposes will work equally well, thus saving the user manual labor and integrating into company’s deployment infrastructures. This also includes making it easy to integrate into solutions like Virtuozzo (we have worked on creating Virtuozzo Templates for Zend Server).

- PHP and Zend Server require many third party libraries in order to work properly. Thanks to the RPM and DEB package managers we are able to leverage an easy way to declare dependencies and use packages officially tested by the distribution as opposed to bundling them. This means Zend Server works consistently with the operating system’s libraries and also benefits from security fixes the distros send out for these 3rd parties.

- Last but not least, the ability to receive Zend hot fixes via the standard OS mechanism means that updates are easier to detect, to manage, to log and to install.

Zend Server on Linux also includes support for PEAR and PECL (and phpize). For example, installing the PEAR package phpDocumentor is as easy as doing /usr/local/zend/bin/pear install PhpDocumentor. Support for PECL enables you to automatically download and build PHP extensions, e.g. you can install ncurses by just running /usr/local/zend/bin/pecl install ncurses. Sweet!

Another feature which is unique to Zend Server on Linux (commercial version only) is Zend Download Server (ZDS). ZDS is capable of offloading the process of sending large files from Apache, freeing it to handle the more complicated PHP-based requests. While one can accomplish similar results with lighttpd and X-Sendfile: the big advantage of ZDS is that it plugs right into multi-process Apache. It is able to take over serving certain file types automatically and serve specific files via a PHP API extremely efficiently and at the same time free up Apache to serve PHP requests. For sites which serve large files this can deliver a significantly more scalable setup and enables the user to better utilize system resources. All of this under the most common setup – multi-process Apache.

Besides that there are just lots of little things we did to make sure this is the best Linux experience; we do significant performance and stress tests on various Linux distributions, we offer a tar download for the Community Edition, we have Linux optimized watchdogs for our daemons, Optimizer+ our acceleration component has been optimized on Linux, and a lot more...

I have no doubt that Linux users will find Zend Server a very refreshing experience. I can assure you that there are very few commercial solutions which have this level of integration with Linux distributions.