WebROaR v0.3.1 - Supports Zero Downtime Application Upgrades
March 22nd, 2010
We are happy to announce the release of WebROaR v0.3.1 that supports Zero Downtime Application Upgrades.
The previous versions of the server already allowed restart of a single application at a time without affecting the other apps hosted on it. We have further improved the logic now, to ensure even the particular application being restarted, does not become unavailable at any time.
Here is the sequence of events when an application is restarted:
The head process receives a request to restart one particular application. This can happen through sudo webroar restart [APPNAME] command triggered via console or a Capistrano script. The application can also be restarted through the Admin Panel.
Head forks off a new worker asking it to load the upgraded application from the disk.
As soon as the new worker successfully connects back, the head kills off the free old workers.
If current worker count is less than the minimum number of workers configured for an application, head instantiates the desired number of new workers to reach this threshold limit.
All new/pending requests are sent to the new worker(s).
The busy old workers gracefully exit after processing their current request. A new worker is instantiated for each busy worker that exits. (This controlled spawning of new workers ensures judicious use of system resources especially the RAM.)
Essentially, the aim is to ensure that the server processes all the requests properly without any error(s) or any kind of slow down.
Of course, this strategy would not work well for upgrades involving migrations. But it does come in handy for on-the-fly code updates without throwing yet another 'Under Maintenance' notice for the customers.
Here is the list of changes after v0.2.6 release:
New Features
- Support for Zero Downtime Application Upgrades.
- Full support for adding/removing applications from command line. (Earlier it was only possible through the Admin Panel.)
- Full support for non interactive installation of the server.
- Support for passing additional include and library paths for server compilation.
- Display error trace directly on the Admin Panel or the console if the application start/stop/restart command fails.
Fixes
- Moved Admin Panel to our vendor Rails to fix ActionPack 2.3.5 and Rack dependency issue.
- Fixed unit tests to make them run on Mac OS and Arch Linux.
- Query optimizations on exception listing page of the Admin Panel.
- Usability improvements on exception listing page of the Admin Panel -
Pagination and multiple selects. - Stopped sending email notifications for ignored exceptions.
- Fixed overruling of the '--ssl-support' option while importing configuration file from a previous installation.
- Fixed service script generation issue for Arch Linux (Ticket #4).
- Handled Memcache client's timeout error by overriding timeout value to 15 seconds when sending worker's PID (Ticket #14).
- Handled application control signal connection breaking issue.
- Fixed multiple host name resolving issue (Ticket #15).
- Fixed the handling of static files with extensions in Upper Case.
- Fixed flash crash issue when viewing URL graphs for the applications having data for 40K or more requests.
- Fixed overruling of access log setting while updating the SSL configuration.
- Removed dependency of starling-starling gem on Github. The server now uses starling gem on Gemcutter.
- Removed application from server's in-memory list if all of it's workers
fail to connect back to the head. - Solved the Admin Panel menu options vanishing issue by setting color of the links on the top menu bar.
- Set default value of minimum and maximum numbers of workers to 4 and 8 respectively in wr_config.h
- Code cleanup in Analyzer and 'lib' modules.
Install Commands:
sudo gem install webroar
sudo webroar install
In case you have a previous installation of WebROaR, the install would give an option to import previous configuration, logs and admin panel data. Or you can also choose to install afresh and deploy your application(s) again.
You can also refer the WebROaR User Guide for more detailed information.
We are thankful to all the people who reported the issues on Lighthouse and the mailing list. We would be very happy to receive more feedback/comments and bug-reports. If you have some time, please run your ruby web application on it and let us know how it goes.
Sorry, comments are closed for this article.