Phusion Passenger now supports Nginx
blog.phusion.nl
blog.phusion.nl
This is the best of both worlds and pretty much puts Passenger at the top of any deployment best practise list. Well done to them.
In relation to the comment to which I responded, I think it is a big boost to the Ruby community (especially the Rails community) that Passenger and Nginx are playing nicely with each other.
Perhaps I shouldn't have been so bombastic in my statement that the MagLev claims have "gone up in smoke"...that's just my response to the fact that they have demonstrated some pretty amazing stuff but are a little short on delivery.
To be clear Phusion's release today not only promises on a performance boost for Rails, but it also delivers it.
Everybody is 100% right in pointing out that technically speaking, MagLev and Passenger/Nginx are totally separate technologies to solve separate problems, but the goals are the same in my view (delivering better performance for Ruby apps). So I don't think drawing an allusion to the MagLev promises of increased performance for Ruby is unwarranted in relation to what it would mean to the Ruby community at large.
My reasoning prior to today's announcement? The convenience of the deploy. The fact that I don't have to dive into Ebb/Thin/Mongrel and figure that out (probably easy for 99% of the people on this thread) means more time to think about other things.
It's also exciting from the perspective that I'm interested in seeing what the Ebb/Thin/Mongrel teams are going to do. Competition is great!
I do think it may be a bit premature to call MagLev vaporware though; it was only announced last year, no?
Anyways, thank you for following up, it did help illustrate your point for me.
I've been playing with Gemstone and Seaside lately, it's freaking blazing fast and persistence is automatic, no mapping code at all. You put objects somewhere and they just stay there. No mapping at all beats the crap out of mappings + migrations.
Gemstone is going to make one hell of a web app platform. Especially since you can just add more boxes to the db cluster for scaling it. Only one server can write, but reads are distributed automatically across all servers in the cluster.
Gemstone is like a smart memcached + relational db. They call it a shared page cache, but it's basically like memcached but not just a cache and with brains.
A transaction commits through the cache to disk and the same object format is used by every layer removing the need to constantly re-serialize. The client talks to the cache, the cache talks to the back end store when it decides it needs to page something in.
As for change tracking, I'm fairly certain there's a write barrier at the vm level, change anything and the barrier is broken causing the object to added to a commit list.
As for larger than memory queries, no different than a relational store, you work in batches paging in data as necessary. If you're talking about a single transaction that modifies more than will fit in ram, I have no idea, I've never had to do something like that.
You could for example add a new instance variable and change the way something is calculated and as long as the public interface of the class doesn't change you don't have to migrate the old instances; the new calculation could apply from this date forward.
But it is an important point, because DB migration is always around, not something that happens magically.
Second graph here illustrates: http://blog.webfaction.com/a-little-holiday-present
Personally, I also find Nginx more straightforward to configure, but I know that is mostly personal preference.
As an aside: I really love Engine Yard for sponsoring the development of this.
The difference in resource usage is due more to the fact that Apache is written to be a sort of generic network service platform, rather than a lean-and-mean HTTP server. It allows plug-in modules (whether written in C, or any of the mod_perl/python/ruby/etc. dynamic language bindings) to interact with just about any stage of request processing. In addition, a default Apache install will usually link a large number of other modules in each worker
That being said, tuning Apache for performance + minimal resource usage is a bit of a black art. If you're not comfortable configuring + building your own server package from source, it's probably easier to just grab Nginx and be done with it.
I can't wait to try Passenger on Nginx.
How many Rails apps out there can handle more than, say, 200-300 concurrent clients without either pegging the CPU or bringing the database to its knees?
Putting Passenger behind Nginx just removes a need to install + configure Apache for folks who are already use and like Nginx. It may also have some benefit on memory-constrained environments like entry-level VPS hosts.
That being said, I personally think that folks who spend days or weeks tweaking their deployment to run in <256MB of RAM to save a few bucks a month on hosting should probably reevaluate their priorities.