I posted a while back about the capability of Jetty 9.1’s
HttpClient to speak HTTP over different transports: by default HTTP, but we also provide a SPDY implementation, where the HTTP requests and responses are carried using the SPDY transport rather than the HTTP transport.
Another transport that is able to carry HTTP requests and responses is FastCGI.
The neat feature about FastCGI is that it is the default way to deploy PHP applications: fire up a proxy server (usually Apache or Nginx) in the front and proxy requests/responses to the FastCGI server (usually the PHP FastCGI Process Manager, or
In this way you can deploy the most used PHP frameworks like WordPress, Drupal and others.
And you are not limited to PHP: FastCGI allows you to easily deploy other dynamic web languages and frameworks such as Django (Python-based), Rails (Ruby-based) and others.
We are happy to announce that Jetty 9.1 can now proxy to FastCGI, enabling deployment of PHP frameworks.
Why this is good, and how different it is from having – say – Apache or Nginx in the front instead of Jetty ?
The first and foremost reason is that Jetty is the only server that supports SPDY Push.
SPDY Push is the biggest performance improvement you can make to your website, without a single change to the application being served, be it a Java web application or WordPress.
Watch our video that shows how the SPDY Push feature that Jetty provides makes a big performance difference.
The second reason is that SPDY version 2 is being deprecated really fast in favor of SPDY version 3 or greater.
Browsers will not speak SPDY/2 anymore, basically reverting your website to HTTPS behaviour, losing all the SPDY benefits if your server does not support SPDY 3 or greater.
As of the time of this writing, only servers like Apache or Jetty implement SPDY version 3 or later of the SPDY protocol, while Nginx only implements SPDY version 2.
At the Jetty Project we like to eat our own dogfood, so the blog site you are reading is WordPress served via Jetty.
If you’re using Firefox or Chrome, just open the browser network console, and you will see something like this:
As you can see from the response headers, the response is served by Jetty (
Server: Jetty(9.1.0.v20131115)) from PHP (
Of course, since both Jetty 9.1’s server and
HttpClient are fully asynchronous, you have a very scalable solution for your PHP-enabled website: currently the JVM that runs this very website only uses 25 MiB of heap.
And of course you get all the SPDY performance improvements over HTTP, along with Jetty’s unique SPDY Push features.
This is good for cloud vendors too, since they can run Jetty and expose PHP applications with a minimal amount of resources, high scalability, and unique features like SPDY Push.
FastCGI for Jetty is sponsored by Intalio. If you are interested in knowing more about how Jetty can speed up your website or how to setup your PHP web application in Jetty, contact us or send an email to Jesse McConnell.
3 thoughts on “WordPress & Jetty: perfect fit”
I’m interested in running my JSP + PHP website with Jetty alone (instead of Nginx + php-fpm + Jetty).
Where can I find the docs on how to configure these things?
Wim, we are considering to open source the Jetty FCGI work. If you are interested, please email firstname.lastname@example.org, that will provide you with information about the status of Jetty FCGI.
Thanks for your interest !
kudos simon! 😉