November 25th, 2009
We are happy to announce the first public open source release of 'WebROaR - Ruby Application Server'. This product is available for free use under GPL v3.
WebROaR aims to make the deployment of Ruby on Rails™ applications more simple, and provide an integrated solution to monitor the performance of the application and track its exceptions. This is facilitated by a simple and easy to use admin panel of the server.
It also is the best performing server as per "our" benchmarks. We absolutely encourage you to perform your own tests and then arrive at a conclusion. :-)
- Simplified Deployment for Ruby on Rails™ as well as other Rack compliant applications
- Beats all other deployment stacks in benchmarks
- Runs multiple applications simultaneously
- Implements HTTP/1.1 grammar as per RFC 2616 including support for persistent, and chunked requests
- Provides run time performance data for the deployed applications
- Generates notifications in case any exceptions occur in any of the deployed applications
- Intelligent load balancing and dynamic reaping of stuck Ruby processing instances
- SSL support
I am sure some of you would be keen to know about the design of the server. Here is a primer:
WebROaR has a head process that accepts connections, parses the HTTP request, and passes it to the appropriate worker process (that has the corresponding Ruby Web Application code loaded in it). Head and worker are both written in C, and use the terrific libev event loop for all the asynchronous and non-blocking socket communication with each other as well as the clients. The server smartly manages its pool of worker processes for each deployed application based on the request load. (For each deployed application, both minimum and maximum number of worker processes limits can be configured.)
Obviously, rather than writing HTTP handler on our own, we decided to use the brilliant libebb library that implements HTTP/1.1 grammar as per RFC 2616 including support for persistent, and chunked requests. Libebb’s HTTP Parser itself was inspired by Mongrel’s awesome Ragel based parser. (Beauty of open source software, one inspires the other and all of them keep getting better.)
Worker loads up (aka embeds) the Ruby interpreter, the web framework and the application code in it. In case any exception occurs while processing a request or if analytics have been enabled for that application, the worker process dispatches a message packet to Starling Message Queue.
WebROaR Analyzer daemon takes its own sweet time to dequeue messages, analyze them and stores the required data to a database.
A nice and simple Admin Panel Rails application running in one of the workers itself, helps in easy UI driven deployment. It also shows all the run time numbers stored in the database in a variety of useful views, along with the list of exceptions that occur in the deployed applications.
All the server processes talk to each other (whenever required) using SCGI.
Overall, we have used C for asynchronous network communication stuff, and Ruby to write the more fancy things quickly.
Of course the first and foremost thing is to see how the server fares for all the Rails applications out there in the wild. We have tested it with our internal/customer applications and a number of open source ones. But obviously as more apps are (hopefully) run on it, and encountered issues are fixed, we hope the server would become more stable and robust.
As far as new features go, we have a few things on top of our mind but would be keen to hear from the community on how we can improve this product and make it more useful.
If you have some time, please do give it a spin and see how your Rails application performs on WebROaR. You can refer the install instructions on the site home page.
We would look forward to your comments/feedback.