Hi all,

I'm pleased to announce that after much persistent next'ing in gdb,
fighting build systems and bug-fixing, we have a httpd (Hiawatha Webserver)
+ FastCGI + PHP stack running on rumprun-xen.

Excepting trivial workarounds to known issues (#21, #22) the actual amount
of code changes made to the software itself is zero :-)

The repo, along with instructions on how to build and run, can be found
here: https://github.com/mato/rump-php

Issues found along the way:

- Build systems are a pain (#21, and various fixes to app-tools).
- Applications love shared libraries and dynamic linking. See above.
- A bug in our implementation of realloc().
- Applications love to use lots of stack space (#22).
- I originally wanted to use Monkey HTTPD, so along the way we gained
  support for __thread -style TLS (#19).
- An obscure crash provoked by setuid().

Many thanks to Antti for helping with the above!

This work is ongoing and as such there are still unresolved issues. Eg.
php-cgi "helpfully" exits after serving 500 requests due to
FCGI_MAX_REQUESTS not being set in the environment :-)

Personally, I think this is a major step in demonstrating that Rump Kernels
and rumprun-xen can be used to run non-trivial software stacks with minimal
effort, and are viable as Unikernels for running POSIX applications.

For those that are curious behind the initial choices of PHP and Hiawatha
(why not Node.js? why not nginx?):

- There are many useful applications written in PHP. At the same time, the
  security of most PHP applications is, in my opinion, questionable. Such
  applications are thus perfect candidates for firewalling off from an
  operating system -- coming back to my talk at operatingsystems.io in
  November, if there is nothing to break out to, most drive-by exploits
  will fail.

- It is relatively easy to build PHP plus extensions as one big static
  binary. This is important, as we don't do dynamic linking.

- Given that the standard way to run PHP is using FastCGI, I needed a
  suitable minimalist and non-forking webserver to use as a front-end.
  
  Nginx is not particulary good at cross-compiling, and also actually quite
  big these days. Lighttpd likewise appears to have grown a kitchen sink.
  Apache... well...

  That left more obscure choices; I tried to port Monkey HTTPD for a day or
  so but gave up due to its reliance on dynamically loading everything as
  modules. Tried Hiawatha and got it building in about an hour.

Cheers,

Martin

------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
rumpkernel-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rumpkernel-users

Reply via email to